[PATCH v6] backlight: lms283gf05: Convert to GPIO descriptors

2020-08-25 Thread Linus Walleij
This converts the lms283gf05 backlight driver to use GPIO descriptors and switches the single PXA Palm Z2 device over to defining these. Since the platform data was only used to convey GPIO information we can delete the platform data header. Notice that we define the proper active low semantics i

Re: [RFC v4 09/20] drm/i915/dp: Extract drm_dp_has_mst()

2020-08-25 Thread Jani Nikula
On Tue, 25 Aug 2020, Lyude Paul wrote: > Just a tiny drive-by cleanup, we can consolidate i915's code for > checking for MST support into a helper to be shared across drivers. > > Signed-off-by: Lyude Paul > Reviewed-by: Sean Paul > --- > drivers/gpu/drm/i915/display/intel_dp.c | 18 ++-

[v3] drm/nouveau: utilize subconnector property for DP

2020-08-25 Thread Jeevan B
From: Oleg Vasilev Since DP-specific information is stored in driver's structures, every driver needs to implement subconnector property by itself. v2: rebase v3: renamed a function call Cc: Ben Skeggs Cc: nouv...@lists.freedesktop.org Signed-off-by: Jeevan B Signed-off-by: Oleg Vasilev Rev

[PATCH v9 31/32] media: pci: fix common ALSA DMA-mapping related codes

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of entries passed to dma_map_sg. The sg_table->nents in

[PATCH v9 32/32] videobuf2: use sgtable-based scatterlist wrappers

2020-08-25 Thread Marek Szyprowski
Use recently introduced common wrappers operating directly on the struct sg_table objects and scatterlist page iterators to make the code a bit more compact, robust, easier to follow and copy/paste safe. No functional change, because the code already properly did all the scaterlist related calls.

[PATCH v9 24/32] drm: host1x: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 15/32] drm: panfrost: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 23/32] xen: gntdev: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 13/32] drm: omapdrm: use common helper for extracting pages array

2020-08-25 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/omapdrm/omap_gem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omap

[PATCH v9 11/32] drm: mediatek: use common helper for extracting pages array

2020-08-25 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/med

[PATCH v9 30/32] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 29/32] rapidio: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 26/32] dmabuf: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 28/32] misc: fastrpc: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 00/32] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-08-25 Thread Marek Szyprowski
map_sg function. In this patchset I only fixed the sg_table objects exported by dmabuf related functions. I hope that I didn't break anything there. Patches are based on top of Linux next-20200825. The required changes to DMA-mapping framework has been already merged to v5.8-rc1. I would l

[PATCH v9 06/32] drm: exynos: use common helper for a scatterlist contiguity check

2020-08-25 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda Acked-by : Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers

[PATCH v9 20/32] drm: virtio: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 12/32] drm: msm: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 18/32] drm: tegra: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 22/32] drm: xen: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 03/32] drm: core: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 02/32] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-08-25 Thread Marek Szyprowski
Replace the current hand-crafted code for extracting pages and DMA addresses from the given scatterlist by the much more robust code based on the generic scatterlist iterators and recently introduced sg_table-based wrappers. The resulting code is simple and easy to understand, so the comment descri

[PATCH v9 25/32] drm: rcar-du: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 14/32] drm: omapdrm: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 08/32] drm: i915: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 19/32] drm: v3d: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 07/32] drm: exynos: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 10/32] drm: mediatek: use common helper for a scatterlist contiguity check

2020-08-25 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf and do this check before allocating resources, so the error path is simpler. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 28 ++ 1 file changed, 6 insertions(+), 22 delet

[PATCH v9 05/32] drm: etnaviv: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 04/32] drm: armada: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 16/32] drm: rockchip: use common helper for a scatterlist contiguity check

2020-08-25 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gp

[PATCH v9 21/32] drm: vmwgfx: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 17/32] drm: rockchip: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 27/32] staging: tegra-vde: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v9 01/32] drm: prime: add common helper to check scatterlist contiguity

2020-08-25 Thread Marek Szyprowski
It is a common operation done by DRM drivers to check the contiguity of the DMA-mapped buffer described by a scatterlist in the sg_table object. Let's add a common helper for this operation. Signed-off-by: Marek Szyprowski Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/drm_gem_cma_helper.c | 23

[PATCH v9 09/32] drm: lima: fix common struct sg_table related issues

2020-08-25 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

Re: [PATCH 11/23] drm/gem_vram/ttm: move to driver backend destroy function.

2020-08-25 Thread Thomas Zimmermann
Hi Am 26.08.20 um 03:44 schrieb Dave Airlie: > From: Dave Airlie > > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/drm_gem_vram_helper.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c > b/drivers/gpu/drm/drm_gem_vram_

[PATCH 23/23] drm/ttm: change ordering of args to map/unmap helpers.

2020-08-25 Thread Dave Airlie
From: Dave Airlie These tooks the same args in a different order to the dma ones, just make things look nicer. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c| 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- dr

[00/23] ttm tt refactoring.

2020-08-25 Thread Dave Airlie
This is based on top of misc-next with Christians io rework for nouveau. https://github.com/airlied/linux/tree/ttm-tt-cleanup (is a complete tree) The idea is to move towards ttm_tt being just a backing store for system allocated pages + dma info, and not be anything to do with a global TT. Firs

[PATCH 05/23] drm/qxl: move bind/unbind/destroy to the driver function table.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/qxl/qxl_ttm.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index c3530c6e46bd..4970c3450e88 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c

[PATCH 21/23] drm/ttm: store populated status in upper page flag bits.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- include/drm/ttm/ttm_tt.h | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 2aa4cd7d6451..3b87ce43864a 100644 --- a/include/drm/ttm/ttm_tt.h +++ b/include/drm/t

[PATCH 13/23] drm/ttm: get rid of agp specific populate/unpopulate paths.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_agp_backend.c | 17 - include/drm/ttm/ttm_tt.h | 2 -- 4 files changed, 4 insertions(+), 23 de

[PATCH 17/23] drm/ttm: split populated/bound state flags.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Get bound out is the next step. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_mn.c | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c| 4 ++--

[PATCH 20/23] drm/ttm: add populated accessors

2020-08-25 Thread Dave Airlie
From: Dave Airlie next step move populated into upper page flag bits Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c| 4 ++-- drivers/gpu/drm/ttm/ttm_bo_util.

[PATCH 15/23] drm/ttm: drop the tt backend function paths.

2020-08-25 Thread Dave Airlie
From: Dave Airlie These are now driver side. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c | 15 +++--- include/drm/ttm/ttm_tt.h | 39 2 files changed, 3 insertions(+), 51 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/d

[PATCH 02/23] drm/radeon/ttm: don't store driver copy of device pointer.

2020-08-25 Thread Dave Airlie
From: Dave Airlie This can be gotten back from bdev. Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_ttm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index f6311f404db8..092

[PATCH 18/23] drm/ttm: move bound flag and use a utility wrapper

2020-08-25 Thread Dave Airlie
From: Dave Airlie If we move the bound flag out then the tt destroy is much cleaner in a bo level wrapper, the code is in a few places, leave the ttm_tt_destroy just about destroying the backing store. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 + drivers/gpu/d

[PATCH 19/23] drm/ttm: split bind and populate out.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Make populating the backing store an explicit separate step Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ++- drivers/gpu/drm/nouveau/nouveau_bo.c| 6 +- drivers/gpu/drm/radeon/radeon_ttm.c | 7 ++- drivers/gpu/drm/ttm/ttm_

[PATCH 22/23] drm/ttm: two minor struct reorgs to fill holes.

2020-08-25 Thread Dave Airlie
From: Dave Airlie These are just minor changes that fill some obvious holes. Signed-off-by: Dave Airlie --- include/drm/ttm/ttm_placement.h | 2 +- include/drm/ttm/ttm_tt.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/drm/ttm/ttm_placement.h b/include/d

[PATCH 14/23] drm/ttm/agp: remove bdev from agp helpers

2020-08-25 Thread Dave Airlie
From: Dave Airlie Since the agp bind/unbind/destroy are now getting called from drivers rather than via the func table, drop the bdev parameter. Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c | 6 +++--- drivers/gpu/drm/radeon/radeon_ttm.c | 6 +++--- drivers/gpu/drm/

[PATCH 16/23] drm/ttm: move sg pointer into ttm_dma_tt

2020-08-25 Thread Dave Airlie
From: Dave Airlie This is only used by drivers that have a dma tt backing store. Signed-off-by: Dave Airlie --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 32 +-- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 +--

[PATCH 10/23] drm/amdgpu/ttm: move to driver backend binding funcs

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 9592505563bf..f07e7121bcc5 100644 ---

[PATCH 12/23] drm/ttm/agp: drop back end bindings from agp

2020-08-25 Thread Dave Airlie
From: Dave Airlie These aren't used anymore. Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_agp_backend.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c index fbf98cd1a3e5..8072fb7c5bc8 100644 ---

[PATCH 09/23] drm/vmwgfx: move to driver binding functions

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c index a76a7f542dd8..6757be98be14 10

[PATCH 11/23] drm/gem_vram/ttm: move to driver backend destroy function.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/drm_gem_vram_helper.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c index 788557bc5c01..93586a310971 100644 --- a/drivers/g

[PATCH 01/23] drm/amdgpu/ttm: remove unused parameter to move blit

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index d7f668dbc9e0..00b2c0359735 100644 --- a/d

[PATCH 08/23] drm/nouveau/ttm: use driver bind/unbind/destroy functions.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/nouveau_bo.c| 45 + drivers/gpu/drm/nouveau/nouveau_sgdma.c | 54 ++--- drivers/gpu/drm/nouveau/nouveau_ttm.h | 3 ++ 3 files changed, 60 insertions(+), 42 deletions(-) diff

[PATCH 07/23] drm/radeon/ttm: move to driver binding/destroy functions.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Do agp decision in the driver, instead of special binding funcs Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon.h| 7 +- drivers/gpu/drm/radeon/radeon_cs.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c| 6 +- drivers/gpu/drm/radeon/radeon_object.

[PATCH 06/23] drm/ttm/agp: export bind/unbind/destroy for drivers to use.

2020-08-25 Thread Dave Airlie
From: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_agp_backend.c | 15 +-- include/drm/ttm/ttm_tt.h | 6 ++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_ba

[PATCH 04/23] drm/ttm: add optional bind/unbind via driver.

2020-08-25 Thread Dave Airlie
From: Dave Airlie I want to remove the backend funcs Signed-off-by: Dave Airlie --- drivers/gpu/drm/ttm/ttm_tt.c| 15 +++--- include/drm/ttm/ttm_bo_driver.h | 36 + 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/t

[PATCH 03/23] drm/ttm: remove bdev from ttm_tt

2020-08-25 Thread Dave Airlie
From: Dave Airlie I want to split this structure up and use it differently, step one remove bdev pointer from it and pass it explicitly. Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 40 +++ drivers/gpu/drm/drm_gem_vram_helper.c | 2 +- drive

Re: [PATCH 2/3] drm/nouveau: move io_reserve_lru handling into the driver v4

2020-08-25 Thread Dave Airlie
On Sat, 22 Aug 2020 at 02:01, Christian König wrote: > > While working on TTM cleanups I've found that the io_reserve_lru used by > Nouveau is actually not working at all. > > In general we should remove driver specific handling from the memory > management, so this patch moves the io_reserve_lru

linux-next: build failure after merge of the drm-misc tree

2020-08-25 Thread Stephen Rothwell
Hi all, After merging the drm-misc tree, today's linux-next build (x86_64 allmodconfig) failed like this: drivers/gpu/drm/qxl/qxl_display.c: In function 'qxl_display_read_client_monitors_config': include/drm/drm_modeset_lock.h:167:7: error: implicit declaration of function 'drm_drv_uses_atomic_

linux-next: manual merge of the drm-misc tree with the amdgpu tree

2020-08-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-misc tree got conflicts in: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c between commits: cacbbe7c0065 ("drm/amdgpu:

linux-next: manual merge of the drm-misc tree with Linus' tree

2020-08-25 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-misc tree got conflicts in: drivers/video/fbdev/arcfb.c drivers/video/fbdev/atmel_lcdfb.c drivers/video/fbdev/savage/savagefb_driver.c between commit: df561f6688fe ("treewide: Use fallthrough pseudo-keyword") from Linus' tree and commit: a

[PATCH] drm/i915/display: fix uninitialized variable

2020-08-25 Thread trix
From: Tom Rix clang static analysis flags this error intel_combo_phy.c:268:7: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage ret &= check_phy_reg(... ~~~ ^ ret has no initial values,

Re: [PATCH v4 1/2] dt-bindings: display: himax, hx8837: Add Himax HX8837 bindings

2020-08-25 Thread Rob Herring
On Wed, 19 Aug 2020 12:22:45 +0200, Lubomir Rintel wrote: > Himax HX8837 is a secondary display controller used to drive the panel > on OLPC platforms. > > Signed-off-by: Lubomir Rintel > > --- > Changes since v3: > - Moved to bindings/display/ > - Added the ports > - Converted to YAML > - Remov

Re: [PATCH 1/2] dt-bindings: display: simple: add Innolux LS075AT011

2020-08-25 Thread Rob Herring
On Wed, 19 Aug 2020 12:12:05 +0200, Lubomir Rintel wrote: > Add the Innolux LS075AT011 7.5" (1200x900) color/reflective LCD panel to > the panel-simple compatible list. This panel is used in the OLPC laptops. > > Signed-off-by: Lubomir Rintel > --- > .../devicetree/bindings/display/panel/panel-s

Re: [PATCH v4 29/78] drm/vc4: crtc: Add a delay after disabling the PixelValve output

2020-08-25 Thread Stefan Wahren
Hi Maxime, Am 25.08.20 um 17:06 schrieb Maxime Ripard: > Hi Stefan, > > On Wed, Jul 29, 2020 at 05:50:31PM +0200, Stefan Wahren wrote: >> Am 29.07.20 um 16:42 schrieb Maxime Ripard: >>> Hi, >>> >>> On Wed, Jul 29, 2020 at 03:09:21PM +0100, Dave Stevenson wrote: On Wed, 8 Jul 2020 at 18:43, Ma

[PATCH v6.5 14/14] drm/print: Add tracefs support to the drm logging helpers

2020-08-25 Thread Sean Paul
From: Sean Paul This patch adds a new module parameter called drm.trace which accepts the same mask as drm.debug. When a debug category is enabled, log messages will be put in a new tracefs instance called drm for consumption. Using the new tracefs instance will allow distros to enable drm loggi

Re: [PATCH 00/49] DRM driver for Hikey 970

2020-08-25 Thread Sam Ravnborg
Hi Mauro. Laurent and I discussed this driver a little on irc. Some highlights: This parts could use register names: + writel(0x2, noc_dss_base + 0xc); + writel(0x2, noc_dss_base + 0x8c); + writel(0x2, noc_dss_base + 0x10c); + writel(0x2, noc_dss_base + 0x18c); The two no

[RFC v4 19/20] drm/i915/dp: Extract drm_dp_read_dpcd_caps()

2020-08-25 Thread Lyude Paul
Since DP 1.3, it's been possible for DP receivers to specify an additional set of DPCD capabilities, which can take precedence over the capabilities reported at DP_DPCD_REV. Basically any device supporting DP is going to need to read these in an identical manner, in particular nouveau, so let's go

[RFC v4 13/20] drm/i915/dp: Extract drm_dp_downstream_read_info()

2020-08-25 Thread Lyude Paul
We're going to be doing the same probing process in nouveau for determining downstream DP port capabilities, so let's deduplicate the work by moving i915's code for handling this into a shared helper: drm_dp_downstream_read_info(). Note that when we do this, we also do make some functional changes

[RFC v4 12/20] drm/nouveau/kms: Only use hpd_work for reprobing in HPD paths

2020-08-25 Thread Lyude Paul
Currently we perform both short IRQ handling for DP, and connector reprobing in the HPD IRQ handler. However since we need to grab connection_mutex in order to reprobe a connector, in theory we could accidentally block ourselves from handling any short IRQs until after a modeset completes if a conn

[RFC v4 14/20] drm/nouveau/kms/nv50-: Use downstream DP clock limits for mode validation

2020-08-25 Thread Lyude Paul
This adds support for querying the maximum clock rate of a downstream port on a DisplayPort connection. Generally, downstream ports refer to active dongles which can have their own pixel clock limits. Note as well, we also start marking the connector as disconnected if we can't read the DPCD, sinc

[RFC v4 16/20] drm/i915/dp: Extract drm_dp_get_sink_count()

2020-08-25 Thread Lyude Paul
And of course, we'll also need to read the sink count from other drivers as well if we're checking whether or not it's supported. So, let's extract the code for this into another helper. v2: * Fix drm_dp_dpcd_readb() ret check * Add back comment and move back sink_count assignment in intel_dp_get_

[RFC v4 08/20] drm/nouveau/kms/nv50-: Refactor and cleanup DP HPD handling

2020-08-25 Thread Lyude Paul
First some backstory here: Currently, we keep track of whether or not we've enabled MST or not by trying to piggy-back off the MST helpers. This means that in order to check whether MST is enabled or not, we actually need to grab drm_dp_mst_topology_mgr.lock. Back when I originally wrote this, I d

[RFC v4 09/20] drm/i915/dp: Extract drm_dp_has_mst()

2020-08-25 Thread Lyude Paul
Just a tiny drive-by cleanup, we can consolidate i915's code for checking for MST support into a helper to be shared across drivers. Signed-off-by: Lyude Paul Reviewed-by: Sean Paul --- drivers/gpu/drm/i915/display/intel_dp.c | 18 ++ include/drm/drm_dp_mst_helper.h | 22

[RFC v4 18/20] drm/nouveau/kms: Don't change EDID when it hasn't actually changed

2020-08-25 Thread Lyude Paul
Currently in nouveau_connector_ddc_detect() and nouveau_connector_detect_lvds(), we start the connector probing process by releasing the previous EDID and informing DRM of the change. However, since commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") drm_connector_update_edid_prop

[RFC v4 20/20] drm/nouveau/kms: Start using drm_dp_read_dpcd_caps()

2020-08-25 Thread Lyude Paul
Now that we've extracted i915's code for reading both the normal DPCD caps and extended DPCD caps into a shared helper, let's start using this in nouveau to enable us to start checking extended DPCD caps for free. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nou

[RFC v4 11/20] drm/nouveau/kms: Move drm_dp_cec_unset_edid() into nouveau_connector_detect()

2020-08-25 Thread Lyude Paul
For whatever reason we currently unset the EDID for DP CEC support when responding to the connector being unplugged, instead of just doing it in nouveau_connector_detect() where we set the CEC EDID. This isn't really needed and could even potentially cause us to forget to unset the EDID if the conn

[RFC v4 04/20] drm/nouveau/kms/nv50-: Use macros for DP registers in nouveau_dp.c

2020-08-25 Thread Lyude Paul
No functional changes. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_dp.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 8db9216d52c69..4030806

[RFC v4 15/20] drm/i915/dp: Extract drm_dp_has_sink_count()

2020-08-25 Thread Lyude Paul
Since other drivers are also going to need to be aware of the sink count in order to do proper dongle detection, we might as well steal i915's DP_SINK_COUNT helpers and move them into DRM helpers so that other dirvers can use them as well. Note that this also starts using intel_dp_has_sink_count()

[RFC v4 17/20] drm/nouveau/kms/nv50-: Add support for DP_SINK_COUNT

2020-08-25 Thread Lyude Paul
This is another bit that we never implemented for nouveau: dongle detection. When a "dongle", e.g. an active display adaptor, is hooked up to the system and causes an HPD to be fired, we don't actually know whether or not there's anything plugged into the dongle without checking the sink count. As

[RFC v4 10/20] drm/nouveau/kms: Use new drm_dp_has_mst() helper for checking MST caps

2020-08-25 Thread Lyude Paul
Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_dp.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 032afc73e2a33..201c0b4335563 100644

[RFC v4 07/20] drm/nouveau/kms/nv50-: Use drm_dp_dpcd_(readb|writeb)() in nv50_sor_disable()

2020-08-25 Thread Lyude Paul
Just use drm_dp_dpcd_(readb|writeb)() so we get automatic DPCD logging Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers

[RFC v4 03/20] drm/nouveau/kms/nv50-: Just use drm_dp_dpcd_read() in nouveau_dp.c

2020-08-25 Thread Lyude Paul
Since this actually logs accesses, we should probably always be using this imho… Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_dp.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/dr

[RFC v4 02/20] drm/nouveau/kms/nv50-: Remove open-coded drm_dp_read_desc()

2020-08-25 Thread Lyude Paul
Noticed this while going through our DP code - we use an open-coded version of drm_dp_read_desc() instead of just using the helper, so change that. This will also let us use quirks in the future if we end up needing them. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nou

[RFC v4 00/20] drm/dp, i915, nouveau: Cleanup nouveau HPD and add DP features from i915

2020-08-25 Thread Lyude Paul
Most of the reason I'm asking for an RFC here is because this code pulls a lot of code out of i915 and into shared DP helpers. Anyway-nouveau's HPD related code has been collecting dust for a while. Other then the occasional runtime PM related and MST related fixes, we're missing a lot of nice thi

[RFC v4 05/20] drm/nouveau/kms: Don't clear DP_MST_CTRL DPCD in nv50_mstm_new()

2020-08-25 Thread Lyude Paul
Since fa3cdf8d0b09 ("drm/nouveau: Reset MST branching unit before enabling") we've been clearing DP_MST_CTRL before we start enabling MST. Since then clearing DP_MST_CTRL in nv50_mstm_new() has been unnecessary and redundant, so let's remove it. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs

[RFC v4 06/20] drm/nouveau/kms: Search for encoders' connectors properly

2020-08-25 Thread Lyude Paul
While the way we find the associated connector for an encoder is just fine for legacy modesetting, it's not correct for nv50+ since that uses atomic modesetting. For reference, see the drm_encoder kdocs. Fix this by removing nouveau_encoder_connector_get(), and replacing it with nv04_encoder_get_c

[RFC v4 01/20] drm/nouveau/kms: Fix some indenting in nouveau_dp_detect()

2020-08-25 Thread Lyude Paul
Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nouveau_dp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dp.c b/drivers/gpu/drm/nouveau/nouveau_dp.c index 8a0f7994e1aeb..ee778ddc95fae 100644 --- a/driv

Re: [PATCH 00/49] DRM driver for Hikey 970

2020-08-25 Thread Sam Ravnborg
Hi Mauro > Before posting the big patch series again, let me send the new > version folded into a single patch. > > If you'd like to see the entire thing, I'm placing it here: > > > https://gitlab.freedesktop.org/mchehab_kernel/hikey-970/-/commits/hikey970_v2/ Review 3/3 For next submis

Re: [REGRESSION] omapdrm/N900 display broken

2020-08-25 Thread Tomi Valkeinen
Hi Laurent, On 23/08/2020 19:26, Aaro Koskinen wrote: > Hi, > > On Tue, Aug 04, 2020 at 03:39:37PM +0300, Tomi Valkeinen wrote: >> On 04/08/2020 15:13, Tomi Valkeinen wrote: > >>> Can you try to pinpoint a bit where the hang happens? Maybe add >>> DRM/omapdrm debug prints, or perhaps sysrq works

Re: [PATCH] drm/sun4i: lvds: Invert the LVDS polarity

2020-08-25 Thread Chen-Yu Tsai
On Sat, Jul 4, 2020 at 9:38 PM Maxime Ripard wrote: > > The LVDS controller can invert the polarity / lanes of the LVDS output. > The default polarity causes some issues on some panels. > > However, U-Boot has always used the opposite polarity without any reported > issue, and the only currently s

Re: [PATCH] drm/amdgpu/dc: Require primary plane to be enabled whenever the CRTC is

2020-08-25 Thread Kazlauskas, Nicholas
On 2020-08-22 5:59 a.m., Michel Dänzer wrote: On 2020-08-21 8:07 p.m., Kazlauskas, Nicholas wrote: On 2020-08-21 12:57 p.m., Michel Dänzer wrote: From: Michel Dänzer Don't check drm_crtc_state::active for this either, per its documentation in include/drm/drm_crtc.h:   * Hence drivers must n

Re: [Nouveau] [PATCH 1/2] drm/nouveau/kms/nv50-: Program notifier offset before requesting disp caps

2020-08-25 Thread Lyude Paul
On Tue, 2020-08-25 at 08:28 +1000, Ben Skeggs wrote: > On Tue, 25 Aug 2020 at 04:33, Lyude Paul wrote: > > Not entirely sure why this never came up when I originally tested this > > (maybe some BIOSes already have this setup?) but the ->caps_init vfunc > > appears to cause the display engine to th

Re: [PATCH v5 1/3] drm/vkms: Decouple crc operations from composer

2020-08-25 Thread Melissa Wen
On Mon, Aug 24, 2020 at 11:31 PM Rodrigo Siqueira wrote: > > In the vkms_composer.c, some of the functions related to CRC and compose > have interdependence between each other. This patch reworks some > functions inside vkms_composer to make crc and composer computation > decoupled. > > This patch

Re: [PATCH v5 3/3] drm/vkms: Add support for writeback

2020-08-25 Thread Melissa Wen
On Tue, Aug 25, 2020 at 12:45 PM Melissa Wen wrote: > > On 08/24, Rodrigo Siqueira wrote: > > This patch implements the necessary functions to add writeback support > > for vkms. This feature is useful for testing compositors if you don't > > have hardware with writeback support. > > > > Change in

Re: [PATCH v5 0/3] drm/vkms: Introduces writeback support

2020-08-25 Thread Melissa Wen
Hi Rodrigo, Nice work! I tested this on the kms_writeback set of subtests and works fine. I have also checked it on the other IGT tests that I usually uses: - kms_cursor_crc/cursor-alpha-transparent was affected by a small problem in the bitmap_clear of the get_pixel_from_buffer function, th

  1   2   >