RE: [PATCH] drm/amd/pm: always pick the pptable from IFWI

2024-10-31 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] I suppose there is no backward compatibility issue with this patch. Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Kenneth Feng Sent: Friday, November 1, 2024 11:57 AM To: amd-gfx@lists.freedesktop.org Cc: W

[PATCH] drm/amd/pm: always pick the pptable from IFWI

2024-10-31 Thread Kenneth Feng
always pick the pptable from IFWI on smu v14.0.2/3 Signed-off-by: Kenneth Feng --- .../drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 65 +-- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c b/drivers/gpu/drm/amd/pm/

Re: [PATCH] amdkfd: Explicitly specify data type amdkfd_process_info in related functions

2024-10-31 Thread Zhu Lingshan
On 10/22/2024 4:01 PM, Zhu Lingshan wrote: > > On 10/22/2024 12:20 PM, Felix Kuehling wrote: >> On 2024-10-14 23:51, Zhu Lingshan wrote: >>> This commit specifies data type struct amdkfd_process_info >>> rather than general void* in ralted functions. >> Several interfaces in amdgpu_amdkfd.h use voi

Re: [RESEND] amdkfd: check ret code for ioctls

2024-10-31 Thread Zhu Lingshan
On 10/31/2024 11:30 PM, Felix Kuehling wrote: > > On 2024-10-31 6:50, Zhu Lingshan wrote: >> The ioctl functions may fail, causing the args unreliable. >> Therefore, the args should not be copied to user space. >> >> The return code provides enough information for >> error handling in user space. >

Re: [RESEND] amdkfd: always include uapi header in priv.h

2024-10-31 Thread Zhu Lingshan
On 10/31/2024 11:27 PM, Felix Kuehling wrote: > On 2024-10-31 6:47, Zhu Lingshan wrote: >> The header usr/linux/kfd_ioctl.h is a duplicate of uapi/linux/kfd_ioctl.h. > I don't see usr/linux/kfd_ioctl.h. Which branch are you looking at? The mainline master branch: https://github.com/torvalds/linux/b

[PATCH v2] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Antonio Quartulli
acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Although this case may be unrealistic for the current code, it is still better to protect against possible bugs. Bail out also when status is AE_NOT_FOUND. This fi

Re: [PATCH v2] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Mario Limonciello
On 10/31/2024 10:28, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Although this case may be unrealistic for the current code, it is still better to protect against possible bugs. Bai

[PATCH 4/4] drm/amd/display: add non-DC drm_panic support

2024-10-31 Thread Alex Deucher
Add support for the drm_panic module, which displays a pretty user friendly message on the screen when a Linux kernel panic occurs. Adapt Lu Yao's code to use common helpers derived from Jocelyn's patch. This extends the non-DC code to enable access to non-CPU accessible VRAM and adds support for

Re: [PATCH v1 9/9] drm/amdgpu: remove unused ip_dump from vcn device

2024-10-31 Thread Christian König
Am 29.10.24 um 14:50 schrieb Sunil Khatri: ip_dump pointer for the vcn has now moved to the per instance ip_block hence clean the old pointer from the vcn device. Signed-off-by: Sunil Khatri Reviewed-by: Christian König for the entire series. And Alex is right we should really look into m

[PATCH V2 0/4] Add panic support for all DCE/DCN

2024-10-31 Thread Alex Deucher
This builds on the patches from Lu and Jocelyn to fill in panic support for all DCE/DCN variants and code pathes. v2: refactor to provide cleaner history and share more code to provide a more consistent experience across DC and non-DC. Alex Deucher (3): drm/amd/display: add clear_tiling hubp ca

[PATCH 2/4] drm/amd/display: add clear_tiling mi callbacks

2024-10-31 Thread Alex Deucher
This adds clear_tiling callbacks to the mi structure that will be used for drm panic support to clear the tiling on a display. Mem input (mi) is used on DCE based display IPs. Signed-off-by: Alex Deucher Cc: Lu Yao Cc: Jocelyn Falempe --- .../drm/amd/display/dc/dce/dce_mem_input.c| 34 +++

[PATCH 3/4] drm/amd/display: add DC drm_panic support

2024-10-31 Thread Alex Deucher
From: Jocelyn Falempe Add support for the drm_panic module, which displays a pretty user friendly message on the screen when a Linux kernel panic occurs. It doesn't work yet on laptop panels, maybe due to PSR. Adapted from Jocelyn's original patch to add DC drm_panic support. Signed-off-by: Jo

[PATCH 1/4] drm/amd/display: add clear_tiling hubp callbacks

2024-10-31 Thread Alex Deucher
This adds clear_tiling callbacks to the hubp structure that will be used for drm panic support to clear the tiling on a display. hubp3 support from Jocelyn's original patch and the rest from me. Signed-off-by: Alex Deucher Cc: Lu Yao Cc: Jocelyn Falempe --- .../drm/amd/display/dc/hubp/dcn10/d

Re: [PATCH v2] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Markus Elfring
… > Although this case may be unrealistic for the current code, it is > still better to protect against possible bugs. > > Bail out also when status is AE_NOT_FOUND. … How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? https://git.kernel.org/pub/scm/linux/kernel/git/torval

Re: [PATCH] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Antonio Quartulli
On 31/10/2024 15:41, Mario Limonciello wrote: On 10/30/2024 16:06, Antonio Quartulli wrote: Hi Mario, On 30/10/2024 02:41, Mario Limonciello wrote: On 10/29/2024 18:32, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffe

Re: [PATCH] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Mario Limonciello
On 10/30/2024 16:06, Antonio Quartulli wrote: Hi Mario, On 30/10/2024 02:41, Mario Limonciello wrote: On 10/29/2024 18:32, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Bail out als

Re: [RESEND] amdkfd: check ret code for ioctls

2024-10-31 Thread Felix Kuehling
On 2024-10-31 6:50, Zhu Lingshan wrote: > The ioctl functions may fail, causing the args unreliable. > Therefore, the args should not be copied to user space. > > The return code provides enough information for > error handling in user space. > > This commit checks the return code of the ioctl

Re: [RESEND] amdkfd: always include uapi header in priv.h

2024-10-31 Thread Felix Kuehling
On 2024-10-31 6:47, Zhu Lingshan wrote: > The header usr/linux/kfd_ioctl.h is a duplicate of uapi/linux/kfd_ioctl.h. I don't see usr/linux/kfd_ioctl.h. Which branch are you looking at? > And it is actually not a file in the source code tree. If it's a file that only there on your local working

[pull] amdgpu drm-fixes-6.12

2024-10-31 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.12. The following changes since commit 4d95a12beba146b0ca2de59c7ce905bc0aadfd0c: Merge tag 'drm-xe-fixes-2024-10-24-1' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes (2024-10-25 16:55:39 +1000) are available in the Git repository at: https://g

Re: [PATCH v6 5/5] drm/amdgpu: track bo memory stats at runtime

2024-10-31 Thread Christian König
Am 25.10.24 um 19:41 schrieb Yunxiang Li: Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massiv

[PATCH] drm/radeon/ni: Fix memory leak and missing error handling in ni_init_microcode()

2024-10-31 Thread Lu Yao
'smc_fw' is not released when its size is not as expected, causing memory leak. And when other firmware sizes do not meet expectations, 'err' is assigned but does not jump to 'out'. Signed-off-by: Lu Yao --- drivers/gpu/drm/radeon/ni.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(

RE: [PATCH v6 5/5] drm/amdgpu: track bo memory stats at runtime

2024-10-31 Thread Li, Yunxiang (Teddy)
[Public] > From: Christian König > Sent: Thursday, October 31, 2024 8:54 > Am 25.10.24 um 19:41 schrieb Yunxiang Li: > > Before, every time fdinfo is queried we try to lock all the BOs in the > > VM and calculate memory usage from scratch. This works okay if the > > fdinfo is rarely read and the

Re: [PATCH] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Antonio Quartulli
Hi Mario, On 30/10/2024 02:41, Mario Limonciello wrote: On 10/29/2024 18:32, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Bail out also when status is AE_NOT_FOUND with a proper err

Re: [PATCH v6 4/5] drm: add drm_memory_stats_is_zero

2024-10-31 Thread Christian König
Am 25.10.24 um 19:41 schrieb Yunxiang Li: Add a helper to check if the memory stats is zero, this will be used to check for memory accounting errors. Signed-off-by: Yunxiang Li Reviewed-by: Christian König In theory I would need to upstream that through the drm-misc-next channel, but I thi

[RESEND] amdkfd: check ret code for ioctls

2024-10-31 Thread Zhu Lingshan
The ioctl functions may fail, causing the args unreliable. Therefore, the args should not be copied to user space. The return code provides enough information for error handling in user space. This commit checks the return code of the ioctl functions and handles errors appropriately when they fai

[RESEND] amdkfd: always include uapi header in priv.h

2024-10-31 Thread Zhu Lingshan
The header usr/linux/kfd_ioctl.h is a duplicate of uapi/linux/kfd_ioctl.h. And it is actually not a file in the source code tree. Ideally, the usr version should be updated whenever the source code is recompiled. However, I have noticed a discrepancy between the two headers even after rebuilding

[PATCH] drm/amdgpu: fix check in gmc_v9_0_get_vm_pte()

2024-10-31 Thread Christian König
The coherency flags can only be determined when the BO is locked and that in turn is only guaranteed when the mapping is validated. Fix the check, move the resource check into the function and add an assert that the BO is locked. Signed-off-by: Christian König Fixes: d1a372af1c3d ("drm/amdgpu: S

Re: [PATCH v1 1/9] drm/amdgpu: update vcn_v1 devcoredump on per instance basis

2024-10-31 Thread Christian König
Am 29.10.24 um 14:50 schrieb Sunil Khatri: vcn code is restructured for per instance basis. Each vcn instance is represented by an ip_block and hence a need to update the dump and print functions for each instance as an IP. Existing way was to capture the ip dump for each instance in a same memo

AW: [PATCH] drm/amdgpu: set the right sg limitation

2024-10-31 Thread Koenig, Christian
[AMD Official Use Only - AMD Internal Distribution Only] Von: Liang, Prike Gesendet: Donnerstag, 31. Oktober 2024 04:29 An: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander; Koenig, Christian; Liang, Prike Betreff: [PATCH] drm/amdgpu: set the right sg