Re: [PATCH v4 25/27] drm/vmwgfx: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Zack Rusin
> On Jun 25, 2021, at 04:22, Thomas Zimmermann wrote: > > The field drm_device.irq_enabled is only used by legacy drivers > with userspace modesetting. Don't set it in vmxgfx. All usage of > the field within vmwgfx can safely be removed. > > Signed-off-by: Thomas Zimmermann > Reviewed-by: Lau

Re: [PATCH] drm/amdgpu/dc: Really fix DCN3.1 Makefile for PPC64

2021-06-25 Thread Harry Wentland
On 2021-06-23 6:30 a.m., Michal Suchanek wrote: > Also copy over the part that makes old gcc handling cross-platform. > > Fixes: df7a1658f257 ("drm/amdgpu/dc: fix DCN3.1 Makefile for PPC64") > Fixes: 926d6972efb6 ("drm/amd/display: Add DCN3.1 blocks to the DC Makefile") > Signed-off-by: Michal Suc

[PATCH 2/2] drm/amdgpu: raise error on incorrect mem_type

2021-06-25 Thread Nirmoy Das
Be more defensive and raise error on wrong mem_type argument in amdgpu_gtt_mgr_has_gart_addr(). Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/driver

[PATCH 1/2] drm/amdgpu: return early for preempt type BOs

2021-06-25 Thread Nirmoy Das
Return early for AMDGPU_PL_PREEMPT BOs so that we don't pass wrong pointer to amdgpu_gtt_mgr_has_gart_addr() which assumes ttm_resource argument to be TTM_PL_TT type BO's. Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 + 1 file changed, 5 insertions(+) diff --git

Re: [PATCH] drm/amdgpu: enable sdma0 tmz for RV/RN

2021-06-25 Thread Luben Tuikov
On 2021-06-25 1:58 a.m., Aaron Liu wrote: Without driver loaded, SDMA0_UTCL1_PAGE.TMZ_ENABLE is set to 1 by default for all asic. On RV/RN, the sdma goldsetting changes Ah, that's a good fix! A note, I'd rather have "Raven/Renoir" so that we don'

Re: [PATCH] drm/amdgpu: add non-aligned address supported in amdgpu_device_vram_access()

2021-06-25 Thread Lazar, Lijo
On 6/25/2021 8:54 AM, Kevin Wang wrote: 1. add non-aligned address support in amdgpu_device_vram_access() 2. reduce duplicate code in amdgpu_ttm_access_memory() because the MM_INDEX{HI}/DATA are protected register, it is not working in sriov environment when mmio protect feature is enabled (i

[PATCH 2/2] drm/amd/pm: bump DRIVER_IF_VERSION for Sienna Cichlid

2021-06-25 Thread Evan Quan
To suppress the annoying warning about version mismatch. Change-Id: I7dae1ef90ea3b09e1b378f96136b6ae61cc90696 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/inc/smu11_driver_if_sienna_cichlid.h | 2 +- drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 +- 2 files changed, 2 in

[PATCH 1/2] drm/amd/pm: update the gpu metrics data retrieving for Sienna Cichlid

2021-06-25 Thread Evan Quan
Due to the structure layout change: "uint32_t ThrottlerStatus" -> " uint8_t ThrottlingPercentage[THROTTLER_COUNT]". Change-Id: Id5c148b0584d972ae73fb9d7347a312944cec13d Signed-off-by: Evan Quan --- .../pm/inc/smu11_driver_if_sienna_cichlid.h | 63 - .../amd/pm/swsmu/smu11/sienna_cichlid_

[bug report] drm/amd/display: Add DCN3.1 HDCP support

2021-06-25 Thread Dan Carpenter
Hello Nicholas Kazlauskas, This is a semi-automatic email about new static checker warnings. The patch bf62221e9d0e: "drm/amd/display: Add DCN3.1 HDCP support" from May 19, 2021, leads to the following Smatch complaint: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:474 u

[PATCH v3] drm/amdgpu: Restore msix after FLR

2021-06-25 Thread Peng Ju Zhou
From: "Emily.Deng" After FLR, the msix will be cleared, so need to re-enable it. Signed-off-by: Emily.Deng Signed-off-by: Peng Ju Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/driver

[PATCH] drm/amdgpu: enable sdma0 tmz for RV/RN

2021-06-25 Thread Aaron Liu
Without driver loaded, SDMA0_UTCL1_PAGE.TMZ_ENABLE is set to 1 by default for all asic. On RV/RN, the sdma goldsetting changes SDMA0_UTCL1_PAGE.TMZ_ENABLE to 0. This patch restores SDMA0_UTCL1_PAGE.TMZ_ENABLE to 1. Signed-off-by: Aaron Liu --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4 ++-- 1 f

Re: [PATCH v4 15/17] drm/uAPI: Move "Broadcast RGB" property from driver specific to general context

2021-06-25 Thread Werner Sembach
Am 23.06.21 um 13:26 schrieb Pekka Paalanen: > On Wed, 23 Jun 2021 12:10:14 +0200 > Werner Sembach wrote: > >> Am 23.06.21 um 09:48 schrieb Pekka Paalanen: >>> On Tue, 22 Jun 2021 11:57:53 +0200 >>> Werner Sembach wrote: >>> Am 22.06.21 um 09:25 schrieb Pekka Paalanen: > On Fri, 18

[PATCH v4 27/27] drm/zte: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in zte. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/zte/zx_drm_drv.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/

[PATCH v4 25/27] drm/vmwgfx: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in vmxgfx. All usage of the field within vmwgfx can safely be removed. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/vmwgfx/vmwg

[PATCH v4 26/27] drm/xlnx: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in xlnx. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/xlnx/zynqmp_dpsub.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/

[PATCH v4 22/27] drm/tidss: Don't use struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't use it in tidss. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/tidss/tidss_irq.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/

[PATCH v4 23/27] drm/vc4: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in vc4. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/vc4/vc4_kms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/g

[PATCH v4 24/27] drm/vkms: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in vkms. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/vkms/vkms_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv

[PATCH v4 20/27] drm/sun4i: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in sun4i. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/d

[PATCH v4 19/27] drm/stm: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in stm. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/stm/ltdc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/g

[PATCH v4 21/27] drm/tegra: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in tegra. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Thierry Reding Acked-by: Daniel Vetter --- drivers/gpu/drm/tegra/drm.c | 7 --- 1 file changed, 7 del

[PATCH v4 17/27] drm/rockchip: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in rockchip. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 6 -- 1 file changed, 6 deletions(-

[PATCH v4 18/27] drm/sti: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in sti. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/sti/sti_compositor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/

[PATCH v4 16/27] drm/rcar-du: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in rcar-du. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/rcar

[PATCH v4 15/27] drm/omapdrm: Track IRQ state in local device state

2021-06-25 Thread Thomas Zimmermann
Replace usage of struct drm_device.irq_enabled with the driver's own state field struct omap_drm_device.irq_enabled. The field in the DRM device structure is considered legacy and should not be used by KMS drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel V

[PATCH v4 14/27] drm/nouveau: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in nouveau. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/nouveau/nouveau_drm.c | 3 --- 1 file changed, 3 deletions(-) diff --

[PATCH v4 13/27] drm/mediatek: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in mediatek. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 -- 1 file changed, 6 deletions(-) di

[PATCH v4 11/27] drm/imx: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in imx. v3: * move dcss changes into separate patch (Laurentiu) Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Philipp Zabel Acked-by: Daniel Vetter ---

[PATCH v4 12/27] drm/imx/dcss: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in dcss. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Laurentiu Palcu Acked-by: Daniel Vetter --- drivers/gpu/drm/imx/dcss/dcss-kms.c | 3 --- 1 file changed, 3

[PATCH v4 10/27] drm/kirin: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in kirin. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH v4 09/27] drm/exynos: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in exynos. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel Vetter --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 10 -- 1 file changed, 10 deletions(-

[PATCH v4 08/27] drm/malidp: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in malidp. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Liviu Dudau Acked-by: Daniel Vetter --- drivers/gpu/drm/arm/malidp_drv.c | 4 1 file changed, 4 del

[PATCH v4 07/27] drm/komeda: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in komeda. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Liviu Dudau Acked-by: Daniel Vetter --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 4 1 file

[PATCH v4 06/27] drm/i915: Track IRQ state in local device state

2021-06-25 Thread Thomas Zimmermann
Replace usage of struct drm_device.irq_enabled with the driver's own state field struct drm_i915_private.irq_enabled. The field in the DRM device structure is considered legacy and should not be used by KMS drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula --- drivers/gpu/drm/i

[PATCH v4 04/27] drm: Don't test for IRQ support in VBLANK ioctls

2021-06-25 Thread Thomas Zimmermann
For KMS drivers, replace the IRQ check in VBLANK ioctls with a check for vblank support. IRQs might be enabled wthout vblanking being supported. This change also removes the DRM framework's only dependency on IRQ state for non-legacy drivers. For legacy drivers with userspace modesetting, the orig

[PATCH v4 05/27] drm/armada: Don't set struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
The field drm_device.irq_enabled is only used by legacy drivers with userspace modesetting. Don't set it in armada. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/armada/armada_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm

[PATCH v4 02/27] drm/hibmc: Call drm_irq_uninstall() unconditionally

2021-06-25 Thread Thomas Zimmermann
Remove the check around drm_irq_uninstall(). The same test is done by the function internally. The tested state in irq_enabled is considered obsolete and should not be used by KMS drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Tian Tao Acked-by: Daniel Vetter

[PATCH v4 03/27] drm/radeon: Track IRQ state in local device state

2021-06-25 Thread Thomas Zimmermann
Replace usage of struct drm_device.irq_enabled with the driver's own state field struct radeon_device.irq.installed. The field in the DRM device structure is considered legacy and should not be used by KMS drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel V

[PATCH v4 01/27] drm/amdgpu: Track IRQ state in local device state

2021-06-25 Thread Thomas Zimmermann
Replace usage of struct drm_device.irq_enabled with the driver's own state field struct amdgpu_device.irq.installed. The field in the DRM device structure is considered legacy and should not be used by KMS drivers. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Acked-by: Daniel V

[PATCH v4 00/27] Deprecate struct drm_device.irq_enabled

2021-06-25 Thread Thomas Zimmermann
Remove references to struct drm_device.irq_enabled from modern DRM drivers and core. KMS drivers enable IRQs for their devices internally. They don't have to keep track of the IRQ state via irq_enabled. For vblanking, it's cleaner to test for vblanking support directly than to test for enabled IRQ

[PATCH] drm/amd/display: Remove assignments in if clauses.

2021-06-25 Thread Mark Yacoub
Fixes Commit a46b6bd5 (drm/amd/display: Verify Gamma & Degamma LUT sizes in amdgpu_dm_atomic_check) Tested on Zork: IGT:kms_color Signed-off-by: Mark Yacoub --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c | 3 ++- 2 fi

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-25 Thread Christoph Hellwig
On Thu, Jun 24, 2021 at 11:52:47AM +0200, Christian König wrote: > I've already converted a bunch of the GPU drivers, but there are at least 6 > GPU still needing to be fixed and on top of that comes VA-API and a few > others. > > What are your plans for the DMA mapping subsystem? Building a new

Re: [Linaro-mm-sig] [PATCH v3 1/2] habanalabs: define uAPI to export FD for DMA-BUF

2021-06-25 Thread Christoph Hellwig
On Thu, Jun 24, 2021 at 10:07:14AM +0200, Christian König wrote: > The key point is that accessing the underlying pages even when DMA-bufs are > backed by system memory is illegal. Daniel even created a patch which > mangles the page pointers in sg_tables used by DMA-buf to make sure that > peop

Re:Re: [PATCH] drm/amdgpu:use kvcalloc instead of kvmalloc_array

2021-06-25 Thread 胡奇巧
OK, I'll revise it and submit it againGeorge.  From: "Christian König "To: "huqiqiao ","airlied ","daniel "CC: "dri-devel ","amd-gfx ","linux-kernel "Sent: 2021-06-24 21:14Subject: Re: [PATCH] drm/amdgpu:use kvcalloc instead of kvmalloc_array  Am 23.06.21 um 11:12 schrieb huqiqiao:  > kvmalloc_

[PATCH] drm/amdgpu: add non-aligned address supported in amdgpu_device_vram_access()

2021-06-25 Thread Kevin Wang
1. add non-aligned address support in amdgpu_device_vram_access() 2. reduce duplicate code in amdgpu_ttm_access_memory() because the MM_INDEX{HI}/DATA are protected register, it is not working in sriov environment when mmio protect feature is enabled (in some asics), and the old function amdgpu_tt