[PATCH 2/3] drm/amd/display: Add hpd_source index check for dcn10 link encoder setup

2024-10-16 Thread Srinivasan Shanmugam
This patch adds a boundary check for the hpd_source index during the link encoder creation process for all dcn10 ip. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Ale

[PATCH 3/3] drm/amd/display: Add hpd_source index check for dcn401 link encoder setup

2024-10-16 Thread Srinivasan Shanmugam
This patch adds a boundary check for the hpd_source index during the link encoder creation process for all dcn401 ip. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc: Al

[PATCH 1/3] drm/amd/display: Add hpd_source index check for DCE60/80/100/110/112/120 link encoders

2024-10-16 Thread Srinivasan Shanmugam
This patch adds a boundary check for the hpd_source index during the link encoder creation process for all DCExxx IP's. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc:

[PATCH 2/2] drm/amdgpu/gfx9: Add cleaner shader for GFX9.4.2

2024-10-16 Thread Srinivasan Shanmugam
This commit adds the cleaner shader microcode for GFX9.4.2 GPUs. The cleaner shader is a piece of GPU code that is used to clear or initialize certain GPU resources, such as Local Data Share (LDS), Vector General Purpose Registers (VGPRs), and Scalar General Purpose Registers (SGPRs). Clearing the

[PATCH 1/2] drm/amdgpu/gfx9: Enable Cleaner Shader for GFX9.4.2 Hardware

2024-10-16 Thread Srinivasan Shanmugam
This patch adds support for the cleaner shader feature onto GFX9.4.2 hardware, as part of the leftover locals feature. The cleaner shader is important for ensuring process isolation and maintaining KGD/KFD serialization by clearing GPU memory before it is reused. The patch updates the `gfx_v9_0_sw

[PATCH v2] drm/amd/pm: update deep sleep status on smu v14.0.2/3

2024-10-16 Thread Kenneth Feng
disable deep sleep during the compute workload for the potential performance loss on smu v14.0.2/3 V2: consider the case when the compute workload is set twice Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 10 +- 1 file changed, 9 insertions(+),

Re: [PATCH v4 09/09] drm/amdgpu: Add separate array of read and write for BO handles

2024-10-16 Thread Paneer Selvam, Arunpravin
On 10/16/2024 3:26 AM, Marek Olšák wrote: On Tue, Oct 15, 2024 at 3:58 AM Arunpravin Paneer Selvam wrote: Drop AMDGPU_USERQ_BO_WRITE as this should not be a global option of the IOCTL, It should be option per buffer. Hence adding separate array for read and write BO handles. Signed-off-by:

[PATCH 1/2] Documentation/gpu: Document how to narrow down display issues

2024-10-16 Thread Rodrigo Siqueira
The amdgpu driver is composed of multiple components, each of which can be a source of some specific problem that the user/developer can see. This commit introduces steps to narrow down and collect display information. Cc: Leo Li Cc: Aurabindo Pillai Cc: Hamza Mahfooz Cc: Harry Wentland Cc: Ma

[PATCH 2/2] Documentation/gpu/amdgpu: Add programming model for DCN

2024-10-16 Thread Rodrigo Siqueira
One of the challenges to contributing to the display code is the complexity of the DC component. This commit adds a documentation page that discusses the programming model used by DCN and an overview of how the display code is organized. Cc: Leo Li Cc: Aurabindo Pillai Cc: Hamza Mahfooz Cc: Har

[PATCH 0/2] Expand Display code documentation

2024-10-16 Thread Rodrigo Siqueira
This patchset expands two areas of the display documentation: 1. Add more techniques for debugging the display code. 2. Introduce an explanation of the programming model used by DC. Thanks Rodrigo Siqueira (2): Documentation/gpu: Document how to narrow down display issues Documentation/gpu/a

Re: [PATCH] drm/amdgpu: Save VCN shared memory with init reset

2024-10-16 Thread Lazar, Lijo
On 10/16/2024 9:37 PM, Liu, Leo wrote: > [AMD Official Use Only - AMD Internal Distribution Only] > >> -Original Message- >> From: Koenig, Christian >> Sent: October 16, 2024 9:16 AM >> To: Lazar, Lijo ; amd-gfx@lists.freedesktop.org; Liu, Leo >> >> Cc: Zhang, Hawking ; Deucher, Alexa

[PATCH] drm/amd/amdkfd: add/remove kfd queues through on stop/start KFD scheduling

2024-10-16 Thread shaoyunl
Add back kfd queues in start scheduling that originally been removed on stop scheduling. Signed-off-by: shaoyunl --- .../drm/amd/amdkfd/kfd_device_queue_manager.c | 40 +-- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_

RE: [PATCH] drm/amd/pm: update deep sleep status on smu v14.0.2/3

2024-10-16 Thread Feng, Kenneth
[AMD Official Use Only - AMD Internal Distribution Only] The logic is that when entering the compute workload, enable deep sleep. When exiting the compute workload, disable deep sleep. It's not required to do the deep sleep setting in other workload type. Thanks. -Original Message- From:

Re: [PATCH] drm/amd/display: Add debug option to disable idle optimizations

2024-10-16 Thread Rodrigo Siqueira Jordao
On 10/15/24 11:41 AM, Aurabindo Pillai wrote: For debugging purposes, add a runtime override to disable display scanout from MALL cache (MALL Static Screen) by disallowing the driver from triggering the idle power optimizations when desktop is idle. Signed-off-by: Aurabindo Pillai --- driv

[pull] amdgpu, amdkfd, radeon drm-fixes-6.12

2024-10-16 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.12. The following changes since commit 8e929cb546ee42c9a61d24fae60605e9e3192354: Linux 6.12-rc3 (2024-10-13 14:33:32 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-6.12-2024-10-16 for you to fe

RE: [PATCH] drm/amdkfd: sever xgmi io link if host driver has disable sharing

2024-10-16 Thread Kim, Jonathan
[Public] Messed up James' email in Tested-by tag. CC'ing James. > -Original Message- > From: Kim, Jonathan > Sent: Wednesday, October 16, 2024 11:59 AM > To: amd-gfx@lists.freedesktop.org > Cc: Kasiviswanathan, Harish ; Kuehling, Felix > ; Kim, Jonathan ; Kim, > Jonathan ; James Yao >

Re: [PATCH v6 0/4] drm: Minimum backlight overrides and implementation for amdgpu

2024-10-16 Thread Harry Wentland
On 2024-09-16 14:23, Thomas Weißschuh wrote: > Hi Harry, Leo and other amdgpu maintainers, > > On 2024-08-24 20:33:53+, Thomas Weißschuh wrote: >> The value of "min_input_signal" returned from ATIF on a Framework AMD 13 >> is "12". This leads to a fairly bright minimum display backlight. >>

RE: [PATCH] drm/amd/display: Ensure HPD source index is valid for dcn20/dcn201 link encoders

2024-10-16 Thread Li, Roman
[Public] Reviewed-by: Roman Li > -Original Message- > From: SHANMUGAM, SRINIVASAN > Sent: Wednesday, October 16, 2024 9:19 AM > To: Siqueira, Rodrigo ; Pillai, Aurabindo > > Cc: amd-gfx@lists.freedesktop.org; SHANMUGAM, SRINIVASAN > ; Chung, ChiaHsuan (Tom) > ; Li, Roman ; Hung, Alex >

RE: [PATCH] drm/amdgpu: Save VCN shared memory with init reset

2024-10-16 Thread Liu, Leo
[AMD Official Use Only - AMD Internal Distribution Only] > -Original Message- > From: Koenig, Christian > Sent: October 16, 2024 9:16 AM > To: Lazar, Lijo ; amd-gfx@lists.freedesktop.org; Liu, Leo > > Cc: Zhang, Hawking ; Deucher, Alexander > ; Sundararaju, Sathishkumar > ; Jiang, Sonny

[PATCH] drm/amdkfd: sever xgmi io link if host driver has disable sharing

2024-10-16 Thread jokim
From: Jonathan Kim Host drivers can create partial hives per guest by disabling xgmi sharing between certain peers in the main hive. Typically, these partial hives are fully connected per guest session. In the event that the host makes a mistake by adding a non-shared node to a guest session, hav

RE: [PATCH] Revert "drm/amdgpu/gfx9: put queue resets behind a debug option"

2024-10-16 Thread Kim, Jonathan
[Public] > -Original Message- > From: Deucher, Alexander > Sent: Tuesday, October 15, 2024 4:00 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Kim, Jonathan > ; Zhu, Jiadong > Subject: [PATCH] Revert "drm/amdgpu/gfx9: put queue resets behind a debug > option" > > This

Re: [PATCH] drm/amdgpu: fix random data corruption for sdma 7

2024-10-16 Thread Alex Deucher
On Wed, Oct 16, 2024 at 2:19 AM Min, Frank wrote: > > [AMD Official Use Only - AMD Internal Distribution Only] > > Hi Lijo, > Thanks a lot for your review and suggestions. > > Here are the updated patches. Patches look good, but I agree with Lijo that we should switch to a dedicated sdma7 header

Re: [PATCH][next] drm/amd/display: Fix spelling mistake "tunndeling" -> "tunneling"

2024-10-16 Thread Alex Deucher
Applied. Thanks! On Wed, Oct 16, 2024 at 5:18 AM Colin Ian King wrote: > > There is a spelling mistake in a dm_error message. Fix it. > > Signed-off-by: Colin Ian King > --- > .../gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH] drm/amd/display: Ensure HPD source index is valid for dcn20/dcn201 link encoders

2024-10-16 Thread Srinivasan Shanmugam
This patch adds a boundary check for the hpd_source index during the link encoder creation process for dcn20/dcn201 IP's. The check ensures that the index is within the valid range of the link_enc_hpd_regs array to prevent out-of-bounds access. Cc: Tom Chung Cc: Rodrigo Siqueira Cc: Roman Li Cc

Re: [PATCH] drm/amdgpu: Save VCN shared memory with init reset

2024-10-16 Thread Christian König
Am 15.10.24 um 08:23 schrieb Lijo Lazar: VCN shared memory is in framebuffer and there are some flags initialized during sw_init. Ideally, such programming should be during hw_init. IIRC that was intentionally not done during hw_init for some reason. @Leo do you remember why? Regards, Christ

Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations

2024-10-16 Thread Mario Limonciello
Jay, Got it, thanks for confirming. Thanks, On 10/16/2024 08:13, Pillai, Aurabindo wrote: [Public] Hi Mario, Hamza is working on the reported issue and appears to be due to a different root cause. Hence, we're expecting that the fix for that issue is likely going to be different, with w

[PATCH] drm/amd/display: fix vram info table parsing ordering

2024-10-16 Thread Alex Deucher
For DCN 4.x, the vram_info moved into the umc_info table. However, it appears some DCN 2.x based boards also happen to have a umc table with a version matching DCN 4.x which causes them to match the wrong table. Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3678 Fixes: 00c391102abc ("drm

Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations

2024-10-16 Thread Pillai, Aurabindo
[Public] Hi Mario, Hamza is working on the reported issue and appears to be due to a different root cause. Hence, we're expecting that the fix for that issue is likely going to be different, with what we know so far. While that issue is being debugged, this patch will allow us to have better

RE: [PATCH] drm/amd/pm: update deep sleep status on smu v14.0.2/3

2024-10-16 Thread Wang, Yang(Kevin)
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Kenneth Feng Sent: Wednesday, October 16, 2024 3:19 PM To: amd-gfx@lists.freedesktop.org Cc: Wang, Yang(Kevin) ; Feng, Kenneth Subject: [PATCH] drm/amd/pm: update deep sleep status on smu v14.0.2/3 disabl

Re: [PATCH 1/2] drm/sched: adding a new scheduling policy

2024-10-16 Thread Christian König
Am 14.10.24 um 23:56 schrieb Deucher, Alexander: [AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: Zhang, Jesse(Jie) Sent: Friday, October 11, 2024 9:45 PM To: Koenig, Christian ; dri- de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Cc: Deuche

[PATCH v3 09/16] drm/amdgpu: clean the dummy resume functions

2024-10-16 Thread Sunil Khatri
Remove the dummy resume functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c index 9b98b40ac4db..1383fd1644d

[PATCH v3 07/16] drm/amdgpu: validate resume before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to resume, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 23 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 47 - drivers/gpu/drm/amd/amdgpu/sienna_cic

[PATCH v3 03/16] drm/amdgpu: validate sw_fini before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to sw_fini, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v3 14/16] drm/amdgpu: clean unused functions of amd_ip_funcs

2024-10-16 Thread Sunil Khatri
Remove the unused and commented out code for vcn/uvd IP's. Also remove the functions which are set to NULL as these are global structures and all members are set to 0 or NULL during initialization. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 4 - drivers/gpu

[PATCH v3 13/16] drm/amdgpu: clean the dummy soft_reset functions

2024-10-16 Thread Sunil Khatri
Remove the dummy soft_reset functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd/amdgp

[PATCH v3 16/16] drm/amdgpu: validate hw_init function pointers

2024-10-16 Thread Sunil Khatri
Validate function pointer at all the places where hw_init is called to avoid a NULL dereference. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 82 ++ 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdg

[PATCH v3 06/16] drm/amdgpu: validate suspend before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to suspend, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 15 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 - drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH v3 10/16] drm/amdgpu: clean the dummy suspend functions

2024-10-16 Thread Sunil Khatri
Remove the dummy suspend functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6 -- 4

[PATCH v3 01/16] drm/amdgpu: validate sw_init before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to sw_init, validate the function pointer like we do in late_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b

[PATCH v3 12/16] drm/amdgpu: clean the dummy wait_for_idle functions

2024-10-16 Thread Sunil Khatri
Remove the dummy wait_for_idle functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd/am

[PATCH v3 04/16] drm/amdgpu: clean the dummy sw_fini functions

2024-10-16 Thread Sunil Khatri
Remove the dummy sw_fini functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c| 6 -- drivers/gpu/drm/amd/amdgpu/nv.c | 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 7 --- d

[PATCH v3 00/16] clean unused functions of amd_ip_funcs

2024-10-16 Thread Sunil Khatri
v3: Added 2 new patches to clean get_clocking_state and hw_init validation. Sunil Khatri (16): drm/amdgpu: validate sw_init before function call drm/amdgpu: clean the dummy sw_init functions drm/amdgpu: validate sw_fini before function call drm/amdgpu: clean the dummy sw_fini functions

[PATCH v3 15/16] drm/amdgpu: validate get_clockgating_state before use

2024-10-16 Thread Sunil Khatri
Validate the function pointer for get_clockgating_state before making a function call. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/nv.c| 9 ++--- drivers/gpu/drm/amd/amdgpu/soc21.c | 6 -- drivers/gpu/drm/amd/amdgpu/soc24.c | 6 -- 3 files changed, 14 insertions(+)

[PATCH v3 08/16] drm/amdgpu: validate wait_for_idle before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to wait_for_idle, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH v3 05/16] drm/amdgpu: validate hw_fini before function call

2024-10-16 Thread Sunil Khatri
Before making a function call to hw_fini, validate the function pointer like we do in sw_init. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 26 +- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH v3 02/16] drm/amdgpu: clean the dummy sw_init functions

2024-10-16 Thread Sunil Khatri
Remove the dummy sw_init functions for all IP blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c| 6 -- drivers/gpu/drm/amd/amdgpu/si.c | 6 -- 3 files changed, 18 deletions(-) diff --git a/drivers

[PATCH v3 11/16] drm/amdgpu: clean the dummy hw_fini functions

2024-10-16 Thread Sunil Khatri
Remove the dummy hw_fini functions for all ip blocks. Signed-off-by: Sunil Khatri --- drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 6 -- drivers/gpu/drm/amd/amdgpu/cik.c | 6 -- drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 11 +-- drivers/gpu/drm/amd/amdgpu/si.c |

[PATCH] drm/amd/pm: update deep sleep status on smu v14.0.2/3

2024-10-16 Thread Kenneth Feng
disable deep sleep during the compute workload for the potential performance loss on smu v14.0.2/3 Signed-off-by: Kenneth Feng --- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu