Re: [PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-06-24 Thread Felix Kuehling
Am 2021-06-24 um 1:30 a.m. schrieb Christoph Hellwig: > On Wed, Jun 23, 2021 at 05:49:55PM -0400, Felix Kuehling wrote: >> For the reference counting changes we could use the dax driver with hmem >> and use efi_fake_mem on the kernel command line to create some >> DEVICE_GENERIC pages. I'm open

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

2021-06-24 Thread Christian König
Am 24.06.21 um 10:12 schrieb 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

Re: [PATCH] drm/amdgpu: Avoid printing of stack contents on firmware load error

2021-06-24 Thread kernel test robot
Hi Jiri, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.13-rc7 next-20210624] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented

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

2021-06-24 Thread Christian König
Am 23.06.21 um 11:12 schrieb huqiqiao: kvmalloc_array + __GFP_ZERO is the same with kvcalloc. Signed-off-by: huqiqiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Re: [PATCH v2] drm/amdgpu: Restore msix after FLR

2021-06-24 Thread Christian König
Am 24.06.21 um 07:31 schrieb 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 | 13 + 1 file changed, 13 insertions(+) diff

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

2021-06-24 Thread Thomas Zimmermann
Hi Am 24.06.21 um 14:36 schrieb Jani Nikula: On Thu, 24 Jun 2021, Thierry Reding wrote: On Thu, Jun 24, 2021 at 11:07:57AM +0200, Thomas Zimmermann wrote: Hi Am 24.06.21 um 10:51 schrieb Jani Nikula: On Thu, 24 Jun 2021, Thomas Zimmermann wrote: Hi Am 24.06.21 um 10:06 schrieb Jani

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

2021-06-24 Thread Jani Nikula
On Thu, 24 Jun 2021, Thierry Reding wrote: > On Thu, Jun 24, 2021 at 11:07:57AM +0200, Thomas Zimmermann wrote: >> Hi >> >> Am 24.06.21 um 10:51 schrieb Jani Nikula: >> > On Thu, 24 Jun 2021, Thomas Zimmermann wrote: >> > > Hi >> > > >> > > Am 24.06.21 um 10:06 schrieb Jani Nikula: >> > > > On

Re: [PATCH 1/3] drm/amdgpu: add function to show ucode name via id

2021-06-24 Thread Huang Rui
On Thu, Jun 24, 2021 at 02:47:22PM +0800, Yu, Lang wrote: > From: Lang Yu > > Implement function amdgpu_ucode_show to show ucode name > via ucode id. > > Signed-off-by: Lang Yu Series are Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 78 +++

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

2021-06-24 Thread Christian König
Am 24.06.21 um 07:34 schrieb Christoph Hellwig: On Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: I understand the argument and I agree that for the generic case, the top of the stack can't assume anything. Having said that, in this case the SGL is encapsulated inside a dma-buf

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

2021-06-24 Thread Thierry Reding
On Thu, Jun 24, 2021 at 09:29:10AM +0200, Thomas Zimmermann wrote: > 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: Daniel Vetter > --- >

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

2021-06-24 Thread Thierry Reding
On Thu, Jun 24, 2021 at 11:07:57AM +0200, Thomas Zimmermann wrote: > Hi > > Am 24.06.21 um 10:51 schrieb Jani Nikula: > > On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > > > Hi > > > > > > Am 24.06.21 um 10:06 schrieb Jani Nikula: > > > > On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > > > > >

[PATCH] drm/amdgpu: Fix resource leak on probe error path

2021-06-24 Thread Jiri Kosina
From: Jiri Kosina This reverts commit 4192f7b5768912ceda82be2f83c87ea7181f9980. It is not true (as stated in the reverted commit changelog) that we never unmap the BAR on failure; it actually does happen properly on amdgpu_driver_load_kms() -> amdgpu_driver_unload_kms() ->

[PATCH v2] drm/amdgpu: Avoid printing of stack contents on firmware load error

2021-06-24 Thread Jiri Kosina
From: Jiri Kosina In case when psp_init_asd_microcode() fails to load ASD microcode file, psp_v12_0_init_microcode() tries to print the firmware filename that failed to load before bailing out. This is wrong because: - the firmware filename it would want it print is an incorrect one as

Re: AMDGPU error: "[drm:amdgpu_dm_atomic_commit_tail [amdgpu]] *ERROR* Waiting for fences timed out!"

2021-06-24 Thread Michel Dänzer
On 2021-06-04 3:08 p.m., Michel Dänzer wrote: > On 2021-06-04 2:33 p.m., Alex Deucher wrote: >> On Fri, Jun 4, 2021 at 3:47 AM Michel Dänzer wrote: >>> >>> On 2021-05-19 3:57 p.m., Alex Deucher wrote: On Wed, May 19, 2021 at 4:48 AM Michel Dänzer wrote: > > On 2021-05-19 12:05 a.m.,

[PATCH 2/3] drm/amdgpu: add function to show psp_gfx_cmd name via id

2021-06-24 Thread Lang Yu
From: Lang Yu Implement function psp_gfx_cmd_show to show cmd name via cmd id. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 38 + 1 file changed, 38 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

[PATCH 3/3] drm/amdgpu: show explicit name instead of id in psp_cmd_submit_buf

2021-06-24 Thread Lang Yu
From: Lang Yu Use amdgpu_ucode_show to show ucode name and psp_gfx_cmd_show to show psp_gfx_cmd name in psp_cmd_submit_buf. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 1/3] drm/amdgpu: add function to show ucode name via id

2021-06-24 Thread Lang Yu
From: Lang Yu Implement function amdgpu_ucode_show to show ucode name via ucode id. Signed-off-by: Lang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 78 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 2 + 2 files changed, 80 insertions(+) diff --git

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

2021-06-24 Thread Laurent Pinchart
Hi Thomas, Thank you for the patch. On Thu, Jun 24, 2021 at 09:29:13AM +0200, Thomas Zimmermann wrote: > 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 >

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

2021-06-24 Thread Laurent Pinchart
Hi Thomas, Thank you for the patch. On Thu, Jun 24, 2021 at 09:29:05AM +0200, Thomas Zimmermann wrote: > 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

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

2021-06-24 Thread Liviu Dudau
On Thu, Jun 24, 2021 at 11:07:57AM +0200, Thomas Zimmermann wrote: > Hi > > Am 24.06.21 um 10:51 schrieb Jani Nikula: > > On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > > > Hi > > > > > > Am 24.06.21 um 10:06 schrieb Jani Nikula: > > > > On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > > > > >

[PATCH] drm/amdgpu: Avoid printing of stack contents on firmware load error

2021-06-24 Thread Jiri Kosina
From: Jiri Kosina In case when psp_init_asd_microcode() fails to load ASD microcode file, psp_v12_0_init_microcode() tries to print the firmware filename that failed to load before bailing out. This is wrong because: - the firmware filename it would want it print is an incorrect one as

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

2021-06-24 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 | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c

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

2021-06-24 Thread Thomas Zimmermann
Hi Am 24.06.21 um 10:51 schrieb Jani Nikula: On Thu, 24 Jun 2021, Thomas Zimmermann wrote: Hi Am 24.06.21 um 10:06 schrieb Jani Nikula: On Thu, 24 Jun 2021, Thomas Zimmermann wrote: diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 3417e1ac7918..10fe16bafcb6

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

2021-06-24 Thread Jani Nikula
On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > Hi > > Am 24.06.21 um 10:06 schrieb Jani Nikula: >> On Thu, 24 Jun 2021, Thomas Zimmermann wrote: >>> diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c >>> index 3417e1ac7918..10fe16bafcb6 100644 >>> ---

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

2021-06-24 Thread Philipp Zabel
On Thu, 2021-06-24 at 09:29 +0200, Thomas Zimmermann wrote: > 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 >

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

2021-06-24 Thread Thomas Zimmermann
Hi Am 24.06.21 um 10:06 schrieb Jani Nikula: On Thu, 24 Jun 2021, Thomas Zimmermann wrote: 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

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

2021-06-24 Thread Thomas Zimmermann
Hi Am 24.06.21 um 10:06 schrieb Jani Nikula: On Thu, 24 Jun 2021, Thomas Zimmermann wrote: 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

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

2021-06-24 Thread Jani Nikula
On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > 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

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

2021-06-24 Thread Jani Nikula
On Thu, 24 Jun 2021, Thomas Zimmermann wrote: > 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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 ---

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

2021-06-24 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 --- drivers/gpu/drm/vkms/vkms_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/vkms/vkms_drv.c

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

2021-06-24 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

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

2021-06-24 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: Daniel Vetter --- drivers/gpu/drm/tegra/drm.c | 7 --- 1 file changed, 7 deletions(-) diff --git

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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 --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c

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

2021-06-24 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

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

2021-06-24 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 v3 13/27] drm/mediatek: Don't set struct drm_device.irq_enabled

2021-06-24 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(-)

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

2021-06-24 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,

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

2021-06-24 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: Daniel Vetter ---

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

2021-06-24 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 v3 07/27] drm/komeda: Don't set struct drm_device.irq_enabled

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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 --- drivers/gpu/drm/i915/i915_drv.h | 2 ++

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

2021-06-24 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

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

2021-06-24 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 v3 03/27] drm/radeon: Track IRQ state in local device state

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 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

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

2021-06-24 Thread Jason Gunthorpe
On Wed, Jun 23, 2021 at 10:39:48PM +0300, Oded Gabbay wrote: > On Wed, Jun 23, 2021 at 10:34 PM Jason Gunthorpe wrote: > > > > On Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: > > > On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > > > > > > > On Wed, Jun 23, 2021 at

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

2021-06-24 Thread Michal Suchanek
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 Suchanek --- The fact that the old gcc handling triggers on

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

2021-06-24 Thread Christoph Hellwig
On Wed, Jun 23, 2021 at 10:39:48PM +0300, Oded Gabbay wrote: > hmm, I thought using dma_map_resource will solve the IOMMU issues, no ? > We talked about it yesterday, and you said that it will "work" > (although I noticed a tone of reluctance when you said that). > > If I use dma_map_resource to

Re: [PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-06-24 Thread Christoph Hellwig
On Wed, Jun 23, 2021 at 05:49:55PM -0400, Felix Kuehling wrote: > For the reference counting changes we could use the dax driver with hmem > and use efi_fake_mem on the kernel command line to create some > DEVICE_GENERIC pages. I'm open to suggestions for good user mode tests to > exercise dax

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

2021-06-24 Thread Christoph Hellwig
On Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: > I understand the argument and I agree that for the generic case, the > top of the stack can't assume anything. > Having said that, in this case the SGL is encapsulated inside a dma-buf > object. But the scatterlist is defined to have

答复: [PATCH v2 02/22] drm/hibmc: Call drm_irq_uninstall() unconditionally

2021-06-24 Thread tiantao (H)
-邮件原件- 发件人: Thomas Zimmermann [mailto:tzimmerm...@suse.de] 发送时间: 2021年6月22日 22:10 收件人: dan...@ffwll.ch; airl...@linux.ie; alexander.deuc...@amd.com; christian.koe...@amd.com; xinhui@amd.com; james.qian.w...@arm.com; liviu.du...@arm.com; mihail.atanas...@arm.com;

[PATCH v3] drm/radeon: Fix NULL dereference when updating memory stats

2021-06-24 Thread Mikel Rychliski
radeon_ttm_bo_destroy() is attempting to access the resource object to update memory counters. However, the resource object is already freed when ttm calls this function via the destroy callback. This causes an oops when a bo is freed: BUG: kernel NULL pointer dereference, address:

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

2021-06-24 Thread huqiqiao
kvmalloc_array + __GFP_ZERO is the same with kvcalloc. Signed-off-by: huqiqiao --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index

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

2021-06-24 Thread Jason Gunthorpe
On Wed, Jun 23, 2021 at 10:00:29PM +0300, Oded Gabbay wrote: > On Wed, Jun 23, 2021 at 9:50 PM Jason Gunthorpe wrote: > > > > On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > > > > > Can you please explain why it is so important to (allow) access them > > > through the CPU ? > > > >

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

2021-06-24 Thread Jason Gunthorpe
On Wed, Jun 23, 2021 at 10:57:35AM +0200, Christian König wrote: > > > No it isn't. It makes devices depend on allocating struct pages for their > > > BARs which is not necessary nor desired. > > Which dramatically reduces the cost of establishing DMA mappings, a > > loop of dma_map_resource() is

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

2021-06-24 Thread Jason Gunthorpe
On Wed, Jun 23, 2021 at 09:43:04PM +0300, Oded Gabbay wrote: > Can you please explain why it is so important to (allow) access them > through the CPU ? It is not so much important, as it reflects significant design choices that are already tightly baked into alot of our stacks. A SGL is CPU

Re: [PATCH v2] drm/radeon: Fix NULL dereference when updating memory stats

2021-06-24 Thread Mikel Rychliski
On Wednesday, June 23, 2021 2:55:04 AM EDT Christian König wrote: > Please rather keep the new resource as parameter here and update before > adjusting bo->resource. > > This way you also don't need to export radeon_update_memory_usage(). I wasn't sure exactly what you intended with the request