Re: [PATCH] drm/amdgpu: fix sdma doorbell init ordering on APUs

2022-10-19 Thread Christian König
Am 20.10.22 um 05:48 schrieb Alex Deucher: Commit 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") uncovered a bug in amdgpu that required a reordering of the driver init sequence to avoid accessing a special register on the GPU before it was properly set

Re: [PATCH AUTOSEL 5.19 07/16] drm/amdgpu: use dirty framebuffer helper

2022-10-19 Thread Eric Biggers
On Wed, Sep 21, 2022 at 11:53:23AM -0400, Sasha Levin wrote: > From: Hamza Mahfooz > > [ Upstream commit 66f99628eb24409cb8feb5061f78283c8b65f820 ] > > Currently, we aren't handling DRM_IOCTL_MODE_DIRTYFB. So, use > drm_atomic_helper_dirtyfb() as the dirty callback in the amdgpu_fb_funcs > struc

[PATCH] drm/amdgpu: fix sdma doorbell init ordering on APUs

2022-10-19 Thread Alex Deucher
Commit 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_device_capability()") uncovered a bug in amdgpu that required a reordering of the driver init sequence to avoid accessing a special register on the GPU before it was properly set up leading to an PCI AER error. This reorde

RE: [PATCH] drm/amdgpu: skip mes self test for gc 11.0.3 in recover

2022-10-19 Thread Wang, YuBiao
Hi Luben, >> Is this "temporary" as in "we'll revert this commit later", or is it >> "temporary" as in the code execution itself? >> Is this just for this version of the IP or this and any newer versions? I suppose that it is meant to be reverted later. There is a similar patch in commit c25a7a

Re: [PATCH] drm/amdgpu/dm/mst: Fix incorrect usage of drm_dp_add_payload_part2()

2022-10-19 Thread Lyude Paul
Gotcha, I'll take another look at this tomorrow On Mon, 2022-10-17 at 03:09 +, Lin, Wayne wrote: > [Public] > > > > > -Original Message- > > From: Lyude Paul > > Sent: Thursday, October 6, 2022 3:37 AM > > To: Siqueira, Rodrigo ; dri- > > de...@lists.freedesktop.org; amd-gfx@lists.

[PATCH] drm/amd/display: Revert logic for plane modifiers

2022-10-19 Thread Joaquín Ignacio Aramendía
This file was split in commit 5d945cbcd4b16a29d6470a80dfb19738f9a4319f ("drm/amd/display: Create a file dedicated to planes") the logic in dm_plane_format_mod_supported() function got changed by a switch logic. That change broke drm_plane modifiers setting on series 5000 APUs (tested on OXP mini AM

Re: [PATCH] drm/amdkfd: Fix memory leak in kfd_mem_dmamap_userptr()

2022-10-19 Thread Felix Kuehling
On 2022-10-17 21:27, Rafael Mendonca wrote: If the number of pages from the userptr BO differs from the SG BO then the allocated memory for the SG table doesn't get freed before returning -EINVAL, which may lead to a memory leak in some error paths. Fix this by checking the number of pages before

[pull] amdgpu drm-fixes-6.1

2022-10-19 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.1. Mostly fixes for new IPs or features added in 6.1. The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780: Linux 6.1-rc1 (2022-10-16 15:36:24 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git

Re: [PATCH 5/6] drm/radeon: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Christian König
Am 19.10.22 um 17:27 schrieb Somalapuram Amaranath: Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/radeon/radeon_cs.c | 4 ++-- drivers/gpu/drm/radeon/radeon_object.c | 4 ++-- drivers/gpu/drm/radeon/radeon_trace.h | 2 +-

Re: [PATCH 4/6] drm/nouveau: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Christian König
Am 19.10.22 um 17:27 schrieb Somalapuram Amaranath: Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath I'm not an expert for nouveau so it might be possible that we better use bo->base.size instead of bo->resource->size at some places. But that can be c

Re: [PATCH 3/6] drm/i915: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Christian König
Am 19.10.22 um 17:27 schrieb Somalapuram Amaranath: Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath Acked-by: Christian König --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- drivers/gpu/drm/i915/i915_scatterlist.c | 4 ++-- dri

Re: [PATCH 2/6] drm/amd: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Christian König
Am 19.10.22 um 17:27 schrieb Somalapuram Amaranath: Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_r

Re: [PATCH 1/6] drm/ttm: rework on ttm_resource to use size_t type

2022-10-19 Thread Christian König
Am 19.10.22 um 17:27 schrieb Somalapuram Amaranath: Change ttm_resource structure from num_pages to size_t size in bytes. When you remove the num_pages field (instead of adding the size additionally) you need to change all drivers in one patch. Otherwise the build would break in between patc

[PATCH 6/6] drm/vmwgfx: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c| 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_execb

[PATCH 5/6] drm/radeon: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/radeon/radeon_cs.c | 4 ++-- drivers/gpu/drm/radeon/radeon_object.c | 4 ++-- drivers/gpu/drm/radeon/radeon_trace.h | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c| 4 ++-- 4 files c

[PATCH 4/6] drm/nouveau: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo0039.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_bo5039.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo74c1.c | 2 +- dri

[PATCH 3/6] drm/i915: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- drivers/gpu/drm/i915/i915_scatterlist.c | 4 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 12 ++-- drivers/gpu/drm/i915/intel

[PATCH 2/6] drm/amd: fix’s on ttm_resource rework to use size_t type

2022-10-19 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_t

[PATCH 1/6] drm/ttm: rework on ttm_resource to use size_t type

2022-10-19 Thread Somalapuram Amaranath
Change ttm_resource structure from num_pages to size_t size in bytes. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/ttm/ttm_bo.c| 4 ++-- drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +++--- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 ++-- drivers/gpu/drm/ttm/ttm_range_man

Re: [PATCH 1/5] drm/amdgpu: Introduce gfx software ring (v8)

2022-10-19 Thread Luben Tuikov
Inlined: On 2022-10-18 05:08, jiadong@amd.com wrote: > From: "Jiadong.Zhu" > > The software ring is created to support priority context while there is only > one hardware queue for gfx. > > Every software ring has its fence driver and could be used as an ordinary ring > for the GPU schedule

Re: [PATCH] drm/amdgpu/discovery: fix possible memory leak

2022-10-19 Thread Luben Tuikov
Reviewed-by: Luben Tuikov Regards, Luben On 2022-10-19 03:06, Yang Yingliang wrote: > If kset_register() fails, the refcount of kobject is not 0, > the name allocated in kobject_set_name(&kset.kobj, ...) is > leaked. Fix this by calling kset_put(), so that it will be > freed in callback function

Re: [PATCH] drm/amd/display: Rework comments on dc file

2022-10-19 Thread Hamza Mahfooz
On 2022-10-18 16:27, Rodrigo Siqueira wrote: The file dc.c has multiple comments that do not follow the kernel-doc or are made in a distracting way. This commit alleviates part of this issue by reorganizing some comments inside the dc file. Signed-off-by: Rodrigo Siqueira Reviewed-by: Hamza M

Re: 答复: [PATCH] drm/amdkfd: use vma_lookup() instead of find_vma()

2022-10-19 Thread Felix Kuehling
Am 2022-10-17 um 20:47 schrieb tomorrow Wang (王德明): Hi, The function vma_lookup show below. Vma valid check is included in it. Or, What other questions do you have? My question is, why did you leave the find_vma call in svm_range_is_valid unchanged? I don't see a technical reason, but mayb

Re: [PATCH -next] drm/amd/display: make dcn32_mpc_funcs static

2022-10-19 Thread Harry Wentland
On 2022-10-19 02:23, ruanjinjie wrote: > The symbol is not used outside of the file, so mark it static. > > Fixes the following warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:985:24: warning: > symbol 'dcn32_mpc_funcs' was not declared. Should it be static? > > Signed-of

Re: [PATCH -next] drm/amd/display: make dcn32_mmhubbub_funcs static

2022-10-19 Thread Harry Wentland
On 2022-10-19 02:31, ruanjinjie wrote: > The symbol is not used outside of the file, so mark it static. > > Fixes the following warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mmhubbub.c:214:28: > warning: symbol 'dcn32_mmhubbub_funcs' was > not declared. Should it be static?

Re: [PATCH v3 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-10-19 Thread Magali Lemes
Em sex., 30 de set. de 2022 às 11:14, Harry Wentland escreveu: > > > > On 9/12/22 11:59, Maíra Canal wrote: > > From: Tales Aparecida > > > > The fixed31_32 library performs a lot of the mathematical operations > > involving fixed-point arithmetic and the conversion of integers to > > fixed-point

[PATCH 4/5] mm: debug_vm_pgtable: use VM_ACCESS_FLAGS

2022-10-19 Thread Kefeng Wang
Directly use VM_ACCESS_FLAGS instead VMFLAGS. Signed-off-by: Kefeng Wang --- mm/debug_vm_pgtable.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtable.c index dc7df1254f0a..2b61fde8c38c 100644 --- a/mm/debug_vm_pgtable.c +++ b/m

[PATCH] drm/amdgpu/discovery: fix possible memory leak

2022-10-19 Thread Yang Yingliang
If kset_register() fails, the refcount of kobject is not 0, the name allocated in kobject_set_name(&kset.kobj, ...) is leaked. Fix this by calling kset_put(), so that it will be freed in callback function kobject_cleanup(). Cc: sta...@vger.kernel.org Fixes: a6c40b178092 ("drm/amdgpu: Show IP disco

[PATCH 5/5] amdgpu: use VM_ACCESS_FLAGS

2022-10-19 Thread Kefeng Wang
Simplify VM_READ|VM_WRITE|VM_EXEC with VM_ACCESS_FLAGS. Cc: Alex Deucher Cc: "Christian König" Cc: "Pan, Xinhui" Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Kefeng Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH -next] drm/amd/display: make dcn32_mpc_funcs static

2022-10-19 Thread ruanjinjie
The symbol is not used outside of the file, so mark it static. Fixes the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:985:24: warning: symbol 'dcn32_mpc_funcs' was not declared. Should it be static? Signed-off-by: ruanjinjie --- drivers/gpu/drm/amd/display/dc/d

[PATCH -next] drm/amd/display: make dcn32_mmhubbub_funcs static

2022-10-19 Thread ruanjinjie
The symbol is not used outside of the file, so mark it static. Fixes the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mmhubbub.c:214:28: warning: symbol 'dcn32_mmhubbub_funcs' was not declared. Should it be static? Signed-off-by: ruanjinjie --- drivers/gpu/drm/amd/di

Re: [PATCH] drm/amdgpu/discovery: fix possible memory leak

2022-10-19 Thread Yang Yingliang
Hi, On 2022/10/19 11:37, Luben Tuikov wrote: On 2022-10-18 04:05, Yang Yingliang wrote: If kset_register() fails, the refcount of device is not 0, the name allocated in dev_set_name() is leaked. Fix this by calling kset_put(), so that it will be freed in callback function kobject_cleanup(). G

[PATCH 2/5] x86/sgx: use VM_ACCESS_FLAGS

2022-10-19 Thread Kefeng Wang
Simplify VM_READ|VM_WRITE|VM_EXEC with VM_ACCESS_FLAGS. Cc: Jarkko Sakkinen Cc: Dave Hansen Signed-off-by: Kefeng Wang --- arch/x86/kernel/cpu/sgx/encl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/cpu/sgx/encl.c b/arch/x86/kernel/cpu/sgx/encl.c inde

[PATCH 3/5] mm: mprotect: use VM_ACCESS_FLAGS

2022-10-19 Thread Kefeng Wang
Simplify VM_READ|VM_WRITE|VM_EXEC with VM_ACCESS_FLAGS. Signed-off-by: Kefeng Wang --- mm/mprotect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/mprotect.c b/mm/mprotect.c index 668bfaa6ed2a..99762403cc8f 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -756,8 +756,

[PATCH -next] drm/amd/display: Make some symbols static

2022-10-19 Thread ruanjinjie
These symbols qp_table_422_10bpc_min, qp_table_444_8bpc_max, qp_table_420_12bpc_max, qp_table_444_10bpc_min, qp_table_420_8bpc_max, qp_table_444_8bpc_min, qp_table_444_12bpc_min, qp_table_420_12bpc_min, qp_table_422_12bpc_min, qp_table_422_12bpc_max, qp_table_444_12bpc_max, qp_table_420_8bpc_min, q

[PATCH 0/5] mm: cleanup with VM_ACCESS_FLAGS

2022-10-19 Thread Kefeng Wang
Kefeng Wang (5): nios2: remove unused INIT_MMAP x86/sgx: use VM_ACCESS_FLAGS mm: mprotect: use VM_ACCESS_FLAGS mm: debug_vm_pgtable: use VM_ACCESS_FLAGS amdgpu: use VM_ACCESS_FLAGS arch/nios2/include/asm/processor.h | 3 --- arch/x86/kernel/cpu/sgx/encl.c | 4 ++-- drivers

[PATCH 1/5] nios2: remove unused INIT_MMAP

2022-10-19 Thread Kefeng Wang
It seems that INIT_MMAP is gone in 2.4.10, not sure, anyways, it is useless now, kill it. Cc: Dinh Nguyen Signed-off-by: Kefeng Wang --- arch/nios2/include/asm/processor.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/nios2/include/asm/processor.h b/arch/nios2/include/asm/processo

[PATCH 4/4] drm/amdgpu: remove ras_error_status parameter for UMC poison handler

2022-10-19 Thread Tao Zhou
Make the code more simple. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c| 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c| 16 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h| 4 +--- 4 files change

[PATCH 2/4] drm/amdgpu: use page retirement API in MCA notifier

2022-10-19 Thread Tao Zhou
Make the code more readable. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 36 +++-- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 21a47f2bb87b..2

[PATCH 3/4] drm/amdgpu: add RAS poison handling for MCA

2022-10-19 Thread Tao Zhou
For MCA poison, if unmap queue fails, only gpu reset should be triggered without page retirement handling, MCA notifier will do it. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 27 +++-- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/

[PATCH 1/4] drm/amdgpu: add RAS page retirement functions for MCA

2022-10-19 Thread Tao Zhou
Define page retirement functions for MCA platform. v2: remove page retirement handling from MCA poison handler, let MCA notifier do page retirement. Signed-off-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_umc.c | 67 + drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h |