aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-14drm/radeon: fix check order in radeon_bo_moveChristian König1-30/+24
Reorder the code to fix checking if blitting is available. Signed-off-by: Christian König <[email protected]> Fixes: 28a68f828266 ("drm/radeon/ttm: use multihop") Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/403847/
2020-11-26drm/imx/dcss: allow using nearest neighbor interpolation scalingLaurentiu Palcu3-10/+50
This patch adds support for using NN interpolation scaling by setting the SCALING_FILTER plane property to 1. Otherwise, the default method is used. Signed-off-by: Laurentiu Palcu <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-26drm/imx/dcss: fix coccinelle warningLaurentiu Palcu1-2/+1
This small patch fixes a warning that I got while running coccinelle: CHECK drivers/gpu/drm/imx/dcss/dcss-plane.c drivers/gpu/drm/imx/dcss/dcss-plane.c:107:21-23: WARNING !A || A && B is equivalent to !A || B Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Laurentiu Palcu <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-26drm/imx/dcss: fix rotations for Vivante tiled formatsLaurentiu Palcu1-2/+9
DCSS supports 90/180/270 degree rotations for Vivante tiled and super-tiled formats. Unfortunately, with the current code, they didn't work properly. This simple patch makes the rotations work by fixing the way the scaler is set up for 90/270 degree rotations. In this particular case, the source width and height need to be swapped since DPR is sending the buffer to scaler already rotated. Also, make sure to allow full rotations for DRM_FORMAT_MOD_VIVANTE_SUPER_TILED. Fixes: 9021c317b770 ("drm/imx: Add initial support for DCSS on iMX8MQ") Signed-off-by: Laurentiu Palcu <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-25drm/mcde: fix masking and bitwise-or on variable valColin Ian King1-1/+1
The masking of val with ~MCDE_CRX1_CLKSEL_MASK is currently being ignored because there seems to be a missing bitwise-or of val in the following statement. Fix this by replacing the assignment of val with a bitwise-or. Fixes: d795fd322063 ("drm/mcde: Support DPI output") Signed-off-by: Colin Ian King <[email protected]> Addresses-Coverity: ("Unused valued") Signed-off-by: Linus Walleij <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-25dma-buf/dma-resv: Respect num_fences when initializing the shared fence list.Maarten Lankhorst1-1/+1
We hardcode the maximum number of shared fences to 4, instead of respecting num_fences. Use a minimum of 4, but more if num_fences is higher. This seems to have been an oversight when first implementing the api. Fixes: 04a5faa8cbe5 ("reservation: update api and add some helpers") Cc: <[email protected]> # v3.17+ Reported-by: Niranjana Vishwanathapura <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Thomas Hellström <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24panel-simple: add Innolux N125HCE-GN1Lukas F. Hartmann1-0/+28
The Innolux N125HCE-GN1 display is used in the MNT Reform 2.0 laptop, attached via eDP to a SN65DSI86 MIPI-DSI to eDP bridge. Signed-off-by: Lukas F. Hartmann <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24dt-bindings: display/panel: add Innolux N125HCE-GN1Lukas F. Hartmann1-0/+2
The Innolux N125HCE-GN1 display is used in the MNT Reform 2.0 laptop, attached via eDP to a SN65DSI86 MIPI-DSI to eDP bridge. This patch contains the DT binding for "innolux,n125hce-gn1". Signed-off-by: Lukas F. Hartmann <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> [reorder so comments comes before the compatible] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm: fix kernel-doc warnings for SCALING_FILTERSimon Ser2-7/+7
This patch fixes the following kernel-doc warnings: /home/simon/src/linux/Documentation/gpu/drm-kms:466: ./drivers/gpu/drm/drm_crtc.c:236: WARNING: Unexpected indentation. /home/simon/src/linux/Documentation/gpu/drm-kms:466: ./drivers/gpu/drm/drm_crtc.c:237: WARNING: Block quote ends without a blank line; unexpected unindent. /home/simon/src/linux/Documentation/gpu/drm-kms:472: ./drivers/gpu/drm/drm_blend.c:203: WARNING: Unexpected indentation. /home/simon/src/linux/Documentation/gpu/drm-kms:472: ./drivers/gpu/drm/drm_blend.c:204: WARNING: Block quote ends without a blank line; unexpected unindent. Signed-off-by: Simon Ser <[email protected]> Fixes: 5c759eda9b04 ("drm: Introduce plane and CRTC scaling filter properties") Cc: Pankaj Bharadiya <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Ville Syrjälä <[email protected]> Cc: Uma Shankar <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Acquire modeset lock around shadow-buffer flushingThomas Zimmermann1-2/+18
Flushing the fbdev's shadow buffer requires vmap'ing the BO memory, which in turn requires pinning the BO. While being pinned, the BO cannot be moved into VRAM for scanout. Consequently, a concurrent modeset operation that involves the fbdev framebuffer would likely fail. Resolve this problem be acquiring the modeset lock of the planes that use the fbdev framebuffer. On non-atomic drivers, also acquire the mode-config lock. This serializes the flushing of the framebuffer with concurrent modeset operations. v2: * only acquire struct drm_fb_helper.lock in damage blitter (Daniel, Christian) Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Copy dma-buf map before flushing shadow fbThomas Zimmermann1-2/+3
Copy the vmap()'ed instance of struct dma_buf_map before modifying it, in case the implementation of vunmap() depends on the exact address. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Restore damage area upon errorsThomas Zimmermann1-3/+20
If the damage handling fails, restore the damage area. The next invocation of the damage worker will then perform the update. v3: * Use drm_WARN_ONCE() with an error message to print warning v2: * print a single warning if dirty callback fails (Daniel, Sebastian) * update comment Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Move damage blit code and its setup into separate routineThomas Zimmermann1-6/+21
Introduce a separate function for the blit code and its vmap setup. Done in preparation of additional changes. No functional changes are made. v3: * Use drm_WARN_ONCE() with an error message to print warning v2: * print a single warning if damage blitter fails Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Separate shadow-buffer flushing and calling dirty callbackThomas Zimmermann1-3/+1
Flushing the shadow framebuffer and invoking the dirty callback are two separate operations, so do them separately. The flush operation is paired with calls to vmap and vunmap. They are not needed for the dirty callback, which performs its own invocations if necessary. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Return early in damage workerThomas Zimmermann1-16/+15
Returning early in the damage worker if no update is required. Makes the code more readable. No functional changes are being made. v3: * s/dirty/damage in commit message (Sam) Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Rename dirty worker to damage workerThomas Zimmermann2-43/+36
The dirty worker handles all damage updates, instead of just calling the framebuffer's dirty callback. Rename it to damage worker. Also rename related variables accordingly. No functional changes are made. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/client: Depend on GEM object kmap ref-countingThomas Zimmermann1-4/+0
DRM client's vmap/vunmap functions don't allow for multiple vmap operations. Calling drm_client_buffer_vmap() twice returns the same mapping, then calling drm_client_buffer_vunmap() twice already unmaps on the first call. This leads to unbalanced vmap refcounts. Fix this by calling drm_gem_vmap() unconditionally in drm_client_buffer_vmap(). All drivers that support DRM clients have to implement correct ref- counting for their vmap operations, or not vunmap at all. This is the case for drivers that use CMA, SHMEM and VRAM helpers, and QXL. Other drivers are not affected. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Unmap client buffer during shutdownThomas Zimmermann1-4/+9
The fbdev helper's generic probe function establishes a mapping for framebuffers without shadow buffer. The clean-up function did not unmap the buffer object. Add the unmap operation. As fbdev devices are usally released during system shutdown, this has not been a problem in practice. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/fb-helper: Call dirty helper after writing to fbdevThomas Zimmermann1-0/+3
If fbdev uses a shadow framebuffer, call the damage handler. Otherwise the update might not make it to the screen. v2: * mark virtual screen as dirty (Ville) Signed-off-by: Thomas Zimmermann <[email protected]> Fixes: 222ec45f4c69 ("drm/fb_helper: Support framebuffers in I/O memory") Acked-by: Maxime Ripard <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/shmem-helper: Removed drm_gem_shmem_create_object_cached()Thomas Zimmermann5-33/+0
Cached page mappings are now the default for SHMEM GEM objects. Remove the obsolete create function for cached mappings. Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/shmem-helper: Use cached mappings by defaultThomas Zimmermann6-12/+13
SHMEM-buffer backing storage is allocated from system memory; which is typically cachable. The default mode for SHMEM objects is writecombine though. Unify SHMEM semantics by defaulting to cached mappings. The exception is pages imported via dma-buf. DMA memory is usually not cached. DRM drivers that require write-combined mappings set the map_wc flag in struct drm_gem_shmem_object to true. This currently affects lima, panfrost and v3d. The drivers mgag200, udl, virtio and vkms continue to use default shmem mappings. The drivers cirrus and gm12u320 change caching flags. Both used writecombine and now switch over to shmem defaults. Both drivers use SHMEM objects as shadow buffers for internal video memory, so cached mappings will not affect them negatively. v3: * set value of shmem pointer before dereferencing it in __drm_gem_shmem_create() (Dan, kernel test robot) v2: * recreate patch on top of latest SHMEM helpers * update lima, panfrost, v3d to select writecombine (Daniel, Rob) Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/mcde: Fix uninitialized valueLinus Walleij1-1/+1
"val" isn't initialized on the default: errorpath. Just return from the function if this happens. Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/mcde: Support DPI outputLinus Walleij7-47/+595
This implements support for DPI output using the port node in the device tree to connect a DPI LCD display to the MCDE. The block also supports TV-out but we leave that for another day when we have a hardware using it. We implement parsing and handling of the "port" node, and follow that to the DPI endpoint. The clock divider used by the MCDE to divide down the "lcdclk" (this has been designed for TV-like frequencies) is represented by an ordinary clock provider internally in the MCDE. This idea was inspired by the PL111 solution by Eric Anholt: the divider also works very similar to the Pl111 clock divider. We take care to clear up some errors regarding the number of available formatters and their type. We have 6 DSI formatters and 2 DPI formatters. Tested on the Samsung GT-I9070 Janice mobile phone. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: Stephan Gerhold <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/mcde: Break out DSI set-up routineLinus Walleij1-60/+75
To be able to support DPI without messing things up we first break out the DSI set-up to a separate function. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Sam Ravnborg <[email protected]> Cc: Stephan Gerhold <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-24drm/mcde: Fix RGB/BGR bugLinus Walleij2-14/+13
I was confused when the graphics came out with blue penguins on the DPI panel. It turns out that the so-called "packed RGB666" mode on the DSI formatter is incorrect: this mode is the actual RGB888 mode, and the mode called RGB888 is BGR888. The claims that the MCDE had inverse RGB/BGR buffer formats was wrong, so correct this and the buggy register and everything is much more consistent, and graphics look good on all targets, both DPI and DSI. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Cc: [email protected] Cc: Stephan Gerhold <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-22video: fbdev: pm2fb: Fix fall-through warnings for ClangGustavo A. R. Silva1-0/+1
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a fallthrough pseudo-keyword. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/0eedb3972a0032da4997a2a47cf0665fbe9c56ca.1605896060.git.gustavoars@kernel.org
2020-11-22video: fbdev: lxfb_ops: Fix fall-through warnings for ClangGustavo A. R. Silva1-0/+1
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/9c1dcb12aae7c7ff0907ffb99ffd227656cbe444.1605896060.git.gustavoars@kernel.org
2020-11-22drm/via: Fix fall-through warnings for ClangGustavo A. R. Silva1-0/+1
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/c21a588bf9e222826f6b138db91de26a2b21df33.1605896060.git.gustavoars@kernel.org
2020-11-22drm: Fix fall-through warnings for ClangGustavo A. R. Silva1-0/+1
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/111e9d3d55c686892357aa5269022024b4d48330.1605896059.git.gustavoars@kernel.org
2020-11-22dma-buf: system_heap: Allocate higher order pages if availableJohn Stultz1-18/+71
While the system heap can return non-contiguous pages, try to allocate larger order pages if possible. This will allow slight performance gains and make implementing page pooling easier. Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Brian Starkey <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-22dma-buf: heaps: Skip sync if not mappedJohn Stultz2-0/+20
This patch is basically a port of Ørjan Eide's similar patch for ION https://lore.kernel.org/lkml/[email protected]/ Only sync the sg-list of dma-buf heap attachment when the attachment is actually mapped on the device. dma-bufs may be synced at any time. It can be reached from user space via DMA_BUF_IOCTL_SYNC, so there are no guarantees from callers on when syncs may be attempted, and dma_buf_end_cpu_access() and dma_buf_begin_cpu_access() may not be paired. Since the sg_list's dma_address isn't set up until the buffer is used on the device, and dma_map_sg() is called on it, the dma_address will be NULL if sync is attempted on the dma-buf before it's mapped on a device. Before v5.0 (commit 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code")) this was a problem as the dma-api (at least the swiotlb_dma_ops on arm64) would use the potentially invalid dma_address. How that failed depended on how the device handled physical address 0. If 0 was a valid address to physical ram, that page would get flushed a lot, while the actual pages in the buffer would not get synced correctly. While if 0 is an invalid physical address it may cause a fault and trigger a crash. In v5.0 this was incidentally fixed by commit 55897af63091 ("dma-direct: merge swiotlb_dma_ops into the dma_direct code"), as this moved the dma-api to use the page pointer in the sg_list, and (for Ion buffers at least) this will always be valid if the sg_list exists at all. But, this issue is re-introduced in v5.3 with commit 449fa54d6815 ("dma-direct: correct the physical addr in dma_direct_sync_sg_for_cpu/device") moves the dma-api back to the old behaviour and picks the dma_address that may be invalid. dma-buf core doesn't ensure that the buffer is mapped on the device, and thus have a valid sg_list, before calling the exporter's begin_cpu_access. Logic and commit message originally by: Ørjan Eide <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Brian Starkey <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-22dma-buf: heaps: Remove heap-helpers codeJohn Stultz3-328/+0
The heap-helpers code was not as generic as initially hoped and it is now not being used, so remove it from the tree. Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Brian Starkey <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-22dma-buf: heaps: Move heap-helper logic into the cma_heap implementationJohn Stultz1-49/+270
Since the heap-helpers logic ended up not being as generic as hoped, move the heap-helpers dma_buf_ops implementations into the cma_heap directly. This will allow us to remove the heap_helpers code in a following patch. Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Brian Starkey <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-22dma-buf: system_heap: Rework system heap to use sgtables instead of pagelistsJohn Stultz1-46/+303
In preparation for some patches to optmize the system heap code, rework the dmabuf exporter to utilize sgtables rather then pageslists for tracking the associated pages. This will allow for large order page allocations, as well as more efficient page pooling. In doing so, the system heap stops using the heap-helpers logic which sadly is not quite as generic as I was hoping it to be, so this patch adds heap specific implementations of the dma_buf_ops function handlers. Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Reviewed-by: Brian Starkey <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm/meson: dw-hdmi: Enable the iahb clock early enoughMarc Zyngier1-2/+6
Instead of moving meson_dw_hdmi_init() around which breaks existing platform, let's enable the clock meson_dw_hdmi_init() depends on. This means we don't have to worry about this clock being enabled or not, depending on the boot-loader features. Fixes: b33340e33acd ("drm/meson: dw-hdmi: Ensure that clocks are enabled before touching the TOP registers") Reported-by: "kernelci.org bot" <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Tested-by: Guillaume Tucker <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> [narmstrong: changed reported by to kernelci.org bot] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm/meson: dw-hdmi: Disable clocks on driver teardownMarc Zyngier1-14/+29
The HDMI driver request clocks early, but never disable them, leaving the clocks on even when the driver is removed. Fix it by slightly refactoring the clock code, and register a devm action that will eventually disable/unprepare the enabled clocks. Signed-off-by: Marc Zyngier <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm/panel: s6e63m0: Fix init sequenceLinus Walleij1-8/+10
The init sequence consist of a number of unknown settings for the display controller. This patch achieves two things: - Fix an error that must have happened when the driver was converted from the backlight subsystem: the 0xb8 configuration command was lost and added as a tail to the previous command. - Update some minor settings in some bytes here and there according to changes in the Samsung GT-I9070 and Samsung GT-S7710 code dumps. Since two other devices use these settings they probably reflect trimmings later found to be better for the display rather than customizations for these devices. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Guido Günther <[email protected]> Cc: Stephan Gerhold <[email protected]> Cc: Paweł Chmiel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm/panel: s6e63m0: Implement 28 backlight levelsLinus Walleij1-53/+257
A later version of the s6e63m0 driver in the Samsung GT-I9070 vendor tree provides 28 different backlight levels making use of elaborate control of the ACL and ELVSS regulator. Implement this more fine-grained backlight control. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Guido Günther <[email protected]> Cc: Stephan Gerhold <[email protected]> Cc: Paweł Chmiel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm/panel: s6e63m0: Fix and extend MCS tableLinus Walleij1-8/+9
Fix up the format of the manufacturer command set table to be TAB-indented and lowercase. Add the MCS_TEMP_SWIRE command that we will make use of. Signed-off-by: Linus Walleij <[email protected]> Reviewed-by: Guido Günther <[email protected]> Cc: Stephan Gerhold <[email protected]> Cc: Paweł Chmiel <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm: Pass the full state to connectors atomic functionsMaxime Ripard7-18/+31
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Now that the CRTCs have been converted, let's move forward with the connectors to provide a consistent interface. The conversion was done using the coccinelle script below, and built tested on all the drivers. @@ identifier connector, connector_state; @@ struct drm_connector_helper_funcs { ... struct drm_encoder* (*atomic_best_encoder)(struct drm_connector *connector, - struct drm_connector_state *connector_state); + struct drm_atomic_state *state); ... } @@ identifier connector, connector_state; @@ struct drm_connector_helper_funcs { ... void (*atomic_commit)(struct drm_connector *connector, - struct drm_connector_state *connector_state); + struct drm_atomic_state *state); ... } @@ struct drm_connector_helper_funcs *FUNCS; identifier state; identifier connector, connector_state; identifier f; @@ f(..., struct drm_atomic_state *state, ...) { <+... - FUNCS->atomic_commit(connector, connector_state); + FUNCS->atomic_commit(connector, state); ...+> } @@ struct drm_connector_helper_funcs *FUNCS; identifier state; identifier connector, connector_state; identifier var, f; @@ f(struct drm_atomic_state *state, ...) { <+... - var = FUNCS->atomic_best_encoder(connector, connector_state); + var = FUNCS->atomic_best_encoder(connector, state); ...+> } @ connector_atomic_func @ identifier helpers; identifier func; @@ ( static struct drm_connector_helper_funcs helpers = { ..., .atomic_best_encoder = func, ..., }; | static struct drm_connector_helper_funcs helpers = { ..., .atomic_commit = func, ..., }; ) @@ identifier connector_atomic_func.func; identifier connector; symbol state; @@ func(struct drm_connector *connector, - struct drm_connector_state *state + struct drm_connector_state *connector_state ) { ... - state + connector_state ... } @ ignores_state @ identifier connector_atomic_func.func; identifier connector, connector_state; @@ func(struct drm_connector *connector, struct drm_connector_state *connector_state) { ... when != connector_state } @ adds_state depends on connector_atomic_func && !ignores_state @ identifier connector_atomic_func.func; identifier connector, connector_state; @@ func(struct drm_connector *connector, struct drm_connector_state *connector_state) { + struct drm_connector_state *connector_state = drm_atomic_get_new_connector_state(state, connector); ... } @ depends on connector_atomic_func @ identifier connector_atomic_func.func; identifier connector_state; identifier connector; @@ func(struct drm_connector *connector, - struct drm_connector_state *connector_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_state @ @@ #include <drm/drm_atomic.h> @ no_include depends on !include && adds_state @ @@ + #include <drm/drm_atomic.h> #include <drm/...> Signed-off-by: Maxime Ripard <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Acked-by: Thomas Zimmermann <[email protected]> Acked-by: Harry Wentland <[email protected]> Cc: Leo Li <[email protected]> Cc: Alex Deucher <[email protected]> Cc: "Christian König" <[email protected]> Cc: Jani Nikula <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Rodrigo Vivi <[email protected]> Cc: Ben Skeggs <[email protected]> Cc: Rodrigo Siqueira <[email protected]> Cc: Melissa Wen <[email protected]> Cc: Haneen Mohammed <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm: document drm_mode_modeinfoSimon Ser2-0/+24
This allows `struct drm_mode_modeinfo` references to be linkified. Some descriptions are borrowed from struct drm_display_mode. Signed-off-by: Simon Ser <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm: document drm_mode_get_connectorSimon Ser1-5/+73
Document how to perform a GETCONNECTOR ioctl. Document the various struct fields. Also document how to perform a forced probe, and when should user-space do it. Signed-off-by: Simon Ser <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Cc: Pekka Paalanen <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-20drm/virtio: rename sync_seq and last_seqGurchetan Singh3-8/+9
To be clearer about our intentions to associate sequence numbers and fence IDs, let's rename these variables. Signed-off-by: Gurchetan Singh <[email protected]> Reviewed-by: Anthoine Bourgeois <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
2020-11-20drm/virtio: use fence_id when processing fencesGurchetan Singh2-4/+4
Currently, the fence ID, which can be used to identify a virtgpu fence, is the same as the fence sequence number. Let's use the fence_id name to clearly signal this. Signed-off-by: Gurchetan Singh <[email protected]> Reviewed-by: Anthoine Bourgeois <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
2020-11-20virtio-gpu api: Add a comment on VIRTIO_GPU_SHM_ID_HOST_VISIBLEAnthoine Bourgeois1-0/+4
This provides a description of how the kernel driver uses the shmid to determine capabilities. Signed-off-by: Anthoine Bourgeois <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
2020-11-20drm/virtio: fix a file name comment referenceAnthoine Bourgeois1-1/+1
Easier to find where declarations are implemented. Signed-off-by: Anthoine Bourgeois <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
2020-11-20drm/virtio: suffix create blob call with _ioctl like any ioctlAnthoine Bourgeois1-3/+4
For coherency, all ioctls are suffixed Signed-off-by: Anthoine Bourgeois <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Gerd Hoffmann <[email protected]>
2020-11-20drm: improve kernel-docs in drm_mode.hSimon Ser1-34/+32
- Remove duplicate doc-comments for struct members - Add missing @member markers for in-line member comments Signed-off-by: Simon Ser <[email protected]> Acked-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2020-11-19drm/ttm: fix DMA32 handling in the global page poolChristian König1-0/+22
When we have mixed DMA32 and non DMA32 device in one system it could otherwise happen that the DMA32 device gets pages it can't work with. Signed-off-by: Christian König <[email protected]> Reviewed-by: Huang Rui <[email protected]> Link: https://patchwork.freedesktop.org/patch/401317/
2020-11-19mm: introduce vma_set_file function v5Christian König10-19/+26
Add the new vma_set_file() function to allow changing vma->vm_file with the necessary refcount dance. v2: add more users of this. v3: add missing EXPORT_SYMBOL, rebase on mmap cleanup, add comments why we drop the reference on two occasions. v4: make it clear that changing an anonymous vma is illegal. v5: move vma_set_file to mm/util.c Signed-off-by: Christian König <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> (v2) Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: Andrew Morton <[email protected]> Link: https://patchwork.freedesktop.org/patch/399360/