Re: [PATCH 12/16] drm/amd/display: Support BT2020 YCbCr fullrange

2025-02-17 Thread Robert Mader
Thanks a lot for the patch! Small commit title nit, sorry for spotting this earlier: this commit adds BT2020 *limited* range - full range was already supported, see the changes in amdgpu_dm.c and dpp.h. On 14.02.25 16:00, roman...@amd.com wrote: From: Ilya Bakoulin [Why/How] Need to add su

Re: [PATCH] amdgpu/pm/legacy: fix suspend/resume issues

2025-02-17 Thread Maciej S. Szmigiero
On 12.02.2025 17:11, Alex Deucher wrote: From: "chr[]" resume and irq handler happily races in set_power_state() * amdgpu_legacy_dpm_compute_clocks() needs lock * protect irq work handler * fix dpm_enabled usage Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2524 Fixes: 3712e7a49459

Re: [PATCH 12/16] drm/amd/display: Support BT2020 YCbCr fullrange

2025-02-17 Thread Robert Mader
Hi Roman, > not handled properly when full range quantization is used I wasn't aware that there was something wrong with the full range handling and it's also not clear from the [How] section what that was - can you shortly elaborate on that? Apart from that it looks good to me, thanks! On

Re: [PATCH 12/16] drm/amd/display: Support BT2020 YCbCr fullrange

2025-02-17 Thread Robert Mader
Thanks a lot for the patch! Small commit title nit, sorry for spotting this earlier: this commit adds BT2020 *limited* range - full range was already supported, see the changes in amdgpu_dm.c and dpp.h. On 14.02.25 16:00, roman...@amd.com wrote: From: Ilya Bakoulin [Why/How] Need to add su

[bug report] drm/amdkfd: Have kfd driver use same PASID values from graphic driver

2025-02-17 Thread Dan Carpenter
Hello Xiaogang Chen, Commit 8544374c0f82 ("drm/amdkfd: Have kfd driver use same PASID values from graphic driver") from Jan 13, 2025 (linux-next), leads to the following Smatch static checker warning: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_process.c:1694 kfd_process_device_init_vm()

Re: [PATCH] amdgpu/pm/legacy: fix suspend/resume issues

2025-02-17 Thread Lazar, Lijo
On 2/12/2025 9:41 PM, Alex Deucher wrote: > From: "chr[]" > > resume and irq handler happily races in set_power_state() > > * amdgpu_legacy_dpm_compute_clocks() needs lock > * protect irq work handler > * fix dpm_enabled usage > > Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2524

Re: [PATCH] amdgpu/pm/legacy: fix suspend/resume issues

2025-02-17 Thread Lazar, Lijo
On 2/17/2025 3:26 PM, Lazar, Lijo wrote: > > > On 2/12/2025 9:41 PM, Alex Deucher wrote: >> From: "chr[]" >> >> resume and irq handler happily races in set_power_state() >> >> * amdgpu_legacy_dpm_compute_clocks() needs lock >> * protect irq work handler >> * fix dpm_enabled usage >> >> Closes

RE: [PATCH] drm/amd/pm: Limit jpeg rings as per max for jpeg_v_4_0_3

2025-02-17 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Kamal, Asad Sent: Friday, February 14, 2025 15:28 To: amd-gfx@lists.freedesktop.org; Lazar, Lijo Cc: Zhang, Hawking ; Ma, Le ; Zhang, Morris ; Kamal, Asad ; De

Re: [PATCH v2] drm/amdgpu: Replace Mutex with Spinlock for RLCG register access to avoid Priority Inversion in SRIOV

2025-02-17 Thread Christian König
Am 16.02.25 um 03:43 schrieb Srinivasan Shanmugam: > RLCG Register Access is a way for virtual functions to safely access GPU > registers in a virtualized environment., including TLB flushes and > register reads. When multiple threads or VFs try to access the same > registers simultaneously, it can

Re: [PATCH] drm/amdgpu/mes: keep enforce isolation up to date

2025-02-17 Thread Alex Deucher
On Sat, Feb 15, 2025 at 3:02 AM SRINIVASAN SHANMUGAM wrote: > > > On 2/14/2025 11:05 PM, Alex Deucher wrote: > > Re-send the mes message on resume to make sure the > mes state is up to date. > > Fixes: 8521e3c5f058 ("drm/amd/amdgpu: limit single process inside MES") > Signed-off-by: Alex Deucher

[PATCH][next] drm/amd/display: Fix spelling mistake "oustanding" -> "outstanding"

2025-02-17 Thread Colin Ian King
There is a spelling mistake in max_oustanding_when_urgent_expected, fix it. Signed-off-by: Colin Ian King --- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c | 6 +++--- .../dc/dml2/dml21/src/dml2_core/dml2_core_shared_types.h| 2 +- 2 files changed, 4 insertions(+), 4 deletions(

Re: [PATCH] PCI: fix Sapphire PCI rebar quirk

2025-02-17 Thread Mario Limonciello
On 2/17/2025 10:00, Alex Deucher wrote: On Mon, Feb 17, 2025 at 10:45 AM Alex Deucher wrote: On Mon, Feb 17, 2025 at 10:38 AM Christian König wrote: Am 17.02.25 um 16:10 schrieb Alex Deucher: There was a quirk added to add a workaround for a Sapphire RX 5600 XT Pulse. However, the quirk o

Re: [PATCH] PCI: fix Sapphire PCI rebar quirk

2025-02-17 Thread Alex Deucher
On Mon, Feb 17, 2025 at 10:45 AM Alex Deucher wrote: > > On Mon, Feb 17, 2025 at 10:38 AM Christian König > wrote: > > > > Am 17.02.25 um 16:10 schrieb Alex Deucher: > > > There was a quirk added to add a workaround for a Sapphire > > > RX 5600 XT Pulse. However, the quirk only checks the vendor

Re: [PATCH] PCI: fix Sapphire PCI rebar quirk

2025-02-17 Thread Christian König
Am 17.02.25 um 16:10 schrieb Alex Deucher: > There was a quirk added to add a workaround for a Sapphire > RX 5600 XT Pulse. However, the quirk only checks the vendor > ids and not the subsystem ids. The quirk really should > have checked the subsystem vendor and device ids as now > this quirk get

Re: [PATCH] drm/amdgpu/mes: keep enforce isolation up to date

2025-02-17 Thread Alex Deucher
On Mon, Feb 17, 2025 at 9:18 AM SRINIVASAN SHANMUGAM wrote: > > > On 2/17/2025 7:44 PM, Alex Deucher wrote: > > On Sat, Feb 15, 2025 at 3:02 AM SRINIVASAN SHANMUGAM > > wrote: > >> > >> On 2/14/2025 11:05 PM, Alex Deucher wrote: > >> > >> Re-send the mes message on resume to make sure the > >> me

[PATCH] PCI: fix Sapphire PCI rebar quirk

2025-02-17 Thread Alex Deucher
There was a quirk added to add a workaround for a Sapphire RX 5600 XT Pulse. However, the quirk only checks the vendor ids and not the subsystem ids. The quirk really should have checked the subsystem vendor and device ids as now this quirk gets applied to all RX 5600 and it seems to cause proble

[PATCH] amdgpu/pm/legacy: fix suspend/resume issues

2025-02-17 Thread Alex Deucher
From: "chr[]" resume and irq handler happily races in set_power_state() * amdgpu_legacy_dpm_compute_clocks() needs lock * protect irq work handler * fix dpm_enabled usage v2: fix clang build, integrate Lijo's comments (Alex) Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2524 Fixes: 3

Re: [PATCH] drm/amdgpu/mes: keep enforce isolation up to date

2025-02-17 Thread SRINIVASAN SHANMUGAM
On 2/17/2025 7:44 PM, Alex Deucher wrote: On Sat, Feb 15, 2025 at 3:02 AM SRINIVASAN SHANMUGAM wrote: On 2/14/2025 11:05 PM, Alex Deucher wrote: Re-send the mes message on resume to make sure the mes state is up to date. Fixes: 8521e3c5f058 ("drm/amd/amdgpu: limit single process inside MES

[PATCH v3 1/2] drm/amdgpu: Add JPEG4_0_3 core reset control reg

2025-02-17 Thread Sathishkumar S
Add core reset control registers for JPEG4_0_3 Signed-off-by: Sathishkumar S Acked-by: Christian König Reviewed-by: Leo Liu --- .../include/asic_reg/vcn/vcn_4_0_3_offset.h | 34 +++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_4_

[PATCH 06/13] drm/amd/display: Use scoped guard for dm_resume()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello Scoped guards will release the mutex when they go out of scope. Adjust the code to use these instead. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH 12/13] drm/amd/display: Use scoped guards for handle_hpd_irq_helper()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello Scoped guards will release the mutex when they go out of scope. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/

Re: [PATCH] drm/amdgpu: Use firmware supported NPS modes

2025-02-17 Thread Lazar, Lijo
On 2/13/2025 6:33 PM, Lijo Lazar wrote: > If firmware supported NPS modes are available through CAP register, use > those values for supported NPS modes. > > Signed-off-by: Lijo Lazar > --- > drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 36 +++ > 1 file changed, 26 insertion

[PATCH 08/13] drm/amd/display: Change amdgpu_dm_irq_resume_*() to void

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello amdgpu_dm_irq_resume_early() and amdgpu_dm_irq_resume_late() don't have any error flows. Change the return type from integer to void. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 7 ++- drivers/gpu/drm/amd/display/amdg

Re: [PATCH v3 2/2] drm/amdgpu: Add ring reset callback for JPEG4_0_3

2025-02-17 Thread Lazar, Lijo
On 2/18/2025 8:36 AM, Sathishkumar S wrote: > Add ring reset function callback for JPEG4_0_3 to > recover from job timeouts without a full gpu reset. > > V2: > - sched->ready flag shouldn't be modified by HW backend (Christian) > > V3: > - Dont modifying sched/job-submission state from HW ba

RE: [PATCH] drm/amdgpu: Use firmware supported NPS modes

2025-02-17 Thread Zhang, Hawking
[AMD Official Use Only - AMD Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: Lazar, Lijo Sent: Thursday, February 13, 2025 21:03 To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Deucher, Alexander ; Lin, Amber Subject: [PATCH] drm

[PATCH v4 1/2] drm/amdgpu: Add JPEG4_0_3 core reset control reg

2025-02-17 Thread Sathishkumar S
Add core reset control registers for JPEG4_0_3 Signed-off-by: Sathishkumar S Acked-by: Christian König Reviewed-by: Leo Liu --- .../include/asic_reg/vcn/vcn_4_0_3_offset.h | 34 +++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/vcn/vcn_4_

[RFC] drm/amd/display: Add and use new dm_prepare_suspend() callback

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello The displays currently don't get turned off until after other IP blocks have been suspended. However turning off the displays first gives a visible response that the system is on it's way down. Turn off displays in a prepare_suspend() callback instead. Signed-off-by: Ma

[PATCH v4 2/2] drm/amdgpu: Add ring reset callback for JPEG4_0_3

2025-02-17 Thread Sathishkumar S
Add ring reset function callback for JPEG4_0_3 to recover from job timeouts without a full gpu reset. V2: - sched->ready flag shouldn't be modified by HW backend (Christian) V3: - Dont modifying sched/job-submission state from HW backend (Christian) - Implement per-core reset sequence V4: -

[PATCH 11/13] drm/amd/display: Use _free() macro fro releasing sink in amdgpu_dm_update_connector_after_detect()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello By using a _free() macro multiple duplicated snippets of code to free the sink can be dropped. The sink will be released when leaving scope. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 15 --- 1 file changed, 4 in

[PATCH 04/13] drm/amd/display: Use a _free() macro for amdgpu_dm_commit_zero_streams()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello All cases except a failure to create a copy of the current context will call dc_state_release() on the copied context. Use a _free() macro to free the context and then adjust the error handling flow to drop the unnecessary use of goto statements. Signed-off-by: Mario Lim

[PATCH 05/13] drm/amd/display: Use drm_err() instead of DRM_ERROR in dm_resume()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello drm_err() is helpful to show which device had the error. Adjust to using this instead for error messages. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH 03/13] drm/amd/display: Catch failures for amdgpu_dm_commit_zero_streams()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello amdgpu_dm_commit_zero_streams() returns a DC error code that isn't checked. Add an explicit check to this and fail dm_suspend() if it is not DC_OK. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 +++- 1 file changed, 7 ins

[PATCH 00/13] drm/amd/display: Various cleanups to amdgpu_dm

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello I was looking at amdgpu_dm for some issues and just noticed some cases that could use cleanups for scoped cleanups and error messaging. Mario Limonciello (13): drm/amd/display: Change amdgpu_dm_irq_suspend() to void drm/amd/display: Drop `ret` variable from dm_suspend

[PATCH 07/13] drm/amd/display: Change amdgpu_dm_irq_resume_*() to use drm_dbg()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello drm_dbg() is helpful to show which device had the debug statement. Adjust to using this instead for debug messages. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 13/13] drm/amd/display: Use drm_err() for handle_hpd_irq_helper()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello drm_err() will show which device has the error. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/dr

[PATCH 01/13] drm/amd/display: Change amdgpu_dm_irq_suspend() to void

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello amdgpu_dm_irq_suspend() doesn't have any error flows and always returns zero. Change the function to void. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.c | 3 +-- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_irq.h | 2 +-

[PATCH 10/13] drm/amd/display: Use scoped guard for amdgpu_dm_update_connector_after_detect()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello A scoped guard will release the mutex when it goes out of scope. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdg

[PATCH 02/13] drm/amd/display: Drop `ret` variable from dm_suspend()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello The `ret` variable in dm_suspend() doesn't get set and is just used to return 0. Drop the needless declaration. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/

[PATCH 09/13] drm/amd/display: Use _free(kfree) for dm_gpureset_commit_state()

2025-02-17 Thread Mario Limonciello
From: Mario Limonciello Using a _free(kfree) macro drops the need for a goto statement as it will be freed when it goes out of scope. Signed-off-by: Mario Limonciello --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git

Re: [PATCH V7 3/9] drm/amdgpu: Add common lock and reset caller parameter for SDMA reset synchronization

2025-02-17 Thread Lazar, Lijo
On 2/13/2025 11:17 AM, jesse.zh...@amd.com wrote: > From: "jesse.zh...@amd.com" > > This commit introduces a caller parameter to the amdgpu_sdma_reset_instance > function to differentiate > between reset requests originating from the KGD and KFD. > This change ensures proper synchronization b

Re: [PATCH] amdgpu/pm/legacy: fix suspend/resume issues

2025-02-17 Thread Lazar, Lijo
On 2/17/2025 8:56 PM, Alex Deucher wrote: > From: "chr[]" > > resume and irq handler happily races in set_power_state() > > * amdgpu_legacy_dpm_compute_clocks() needs lock > * protect irq work handler > * fix dpm_enabled usage > > v2: fix clang build, integrate Lijo's comments (Alex) > > Cl

RE: [PATCH V7 3/9] drm/amdgpu: Add common lock and reset caller parameter for SDMA reset synchronization

2025-02-17 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] Hi Lijo, -Original Message- From: Lazar, Lijo Sent: Tuesday, February 18, 2025 11:36 AM To: Zhang, Jesse(Jie) ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Kuehling, Felix ; Kim, Jonathan ; Zhu, Jiadong Subject: Re: [

Re: [PATCH] PCI: fix Sapphire PCI rebar quirk

2025-02-17 Thread Alex Deucher
On Mon, Feb 17, 2025 at 10:38 AM Christian König wrote: > > Am 17.02.25 um 16:10 schrieb Alex Deucher: > > There was a quirk added to add a workaround for a Sapphire > > RX 5600 XT Pulse. However, the quirk only checks the vendor > > ids and not the subsystem ids. The quirk really should > > hav

[PATCH v3 2/2] drm/amdgpu: Add ring reset callback for JPEG4_0_3

2025-02-17 Thread Sathishkumar S
Add ring reset function callback for JPEG4_0_3 to recover from job timeouts without a full gpu reset. V2: - sched->ready flag shouldn't be modified by HW backend (Christian) V3: - Dont modifying sched/job-submission state from HW backend (Christian) - Implement per-core reset sequence Signed-

RE: [PATCH v7 1/9] drm/amdgpu/kfd: Add shared SDMA reset functionality with callback support

2025-02-17 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] Ping on this series? Jesse -Original Message- From: jesse.zh...@amd.com Sent: Thursday, February 13, 2025 1:47 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Kuehling, Felix ; Kim, Jonathan ; Zhu, Jiadong ; Zhang,