[PATCH 13/18] drm/amdgpu: move si.c away from sid.h

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si.c | 369 1 file changed, 185 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c index 75d3b7471c68..3b8c65a966b9 100644 --- a/drivers/gpu

[PATCH 15/18] drm/amdgpu: huge sid.h cleanup, drop substituted defines.

2025-03-16 Thread Alexandre Demers
Now that we are using the proper defines, cleanup useless old "substituted" defines. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/sid.h | 1219 +- 1 file changed, 9 insertions(+), 1210 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/sid.h b/dr

[PATCH 09/18] drm/amdgpu: add missing GFX6 defines

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h b/drivers/gpu/drm/amd/include/asic_reg/gca/gfx_6_0_d.h index c75aee25619e..a1240dd430aa 100644 --- a

[PATCH 05/18] drm/admgpu: move si_ih.c away from sid.h defines

2025-03-16 Thread Alexandre Demers
They are properly defined under oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_ih.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_ih.c b/drivers/gpu/drm/amd/amdgpu/si_ih.c index 94468c87122a..234

[PATCH 16/18] drm/amdgpu: keep removing sid.h dependency from si_dma.c

2025-03-16 Thread Alexandre Demers
Move and rename DMA_SEM_INCOMPLETE_TIMER_CNTL and DMA_SEM_WAIT_FAIL_TIMER_CNTL in oss_1_0_d.h Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/sid.h | 2 -- drivers/gpu/drm/amd/include/asic_reg/oss

[PATCH 04/18] drm/amdgpu: remove PACKET3 duplicated defines from si_enums.h

2025-03-16 Thread Alexandre Demers
PACKET3 is already in sid.h, as it is done under cikd.h for CIK Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 123 -- 1 file changed, 123 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/si_enums.h b/drivers/gpu/drm/amd/amdgpu/si_enums.

[PATCH 18/18] drm/amdgpu: continue cleaning up sid.h and si_enums.h

2025-03-16 Thread Alexandre Demers
Remove more duplicated defines and move some in sid.h for coherence with CIK. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/si_enums.h | 90 +-- drivers/gpu/drm/amd/amdgpu/sid.h | 16 - 2 files changed, 14 insertions(+), 92 deletions(-) diff --g

[PATCH 12/18] drm/amdgpu: fix GFX6 variables for sid.h cleanup

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c index 5f85c3b63971..f34980c79a7e 100644 --- a/drivers/gpu/drm/a

[PATCH 00/18] Properly wire defines, shifts and masks in SI and cleanup

2025-03-16 Thread Alexandre Demers
The following series is intented to remove duplicated defines, shifts and masks or to classify them where they belong. si_enums.h has been used as a garbage can for anything and everything when moving SI code from radeon to amdgpu. Where needed, the defines found under sid.h and si_enums.h were

[PATCH 17/18] drm/amdgpu: cleanup DCE6 a bit more

2025-03-16 Thread Alexandre Demers
Use shifts already available in DCE6's defines, masks and shifts. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sid.h | 8 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce

[PATCH 08/18] drm/amdgpu: add missing DMA defines, shifts and masks

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- .../drm/amd/include/asic_reg/oss/oss_1_0_d.h | 21 +++-- .../include/asic_reg/oss/oss_1_0_sh_mask.h| 43 +++ 2 files changed, 61 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/include/asic_reg/oss/oss_1_0_d.h b/drivers

[PATCH 06/18] drm/amdgpu: use GRPH_SECONDARY_SURFACE_ADDRESS_MASK with GRPH_SECONDARY_SURFACE_ADDRESS in DCE6

2025-03-16 Thread Alexandre Demers
It seems a copy-paste error: since we are working with mmGRPH_SECONDARY_SURFACE_ADDRESS, GRPH_SECONDARY_SURFACE_ADDRESS__GRPH_SECONDARY_SURFACE_ADDRESS_MASK should be used. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH 03/18] drm/amdgpu: use proper defines, shifts and masks in DCE6 code

2025-03-16 Thread Alexandre Demers
By replacing VGA_VSTATUS_CNTL by VGA_RENDER_CONTROL__VGA_VSTATUS_CNTL_MASK, we also need to fix its usage in GMC6. Note: VGA_VSTATUS_CNTL's binary value was inverted in dce_6_0_sh_mask.h, so we need to invert its value where it was used. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/a

[PATCH 11/18] drm/pm/legacy-dpm: move SI away from sid.h and si_enums.h

2025-03-16 Thread Alexandre Demers
Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c | 338 +++-- drivers/gpu/drm/amd/pm/legacy-dpm/si_smc.c | 36 +-- 2 files changed, 190 insertions(+), 184 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c b/drivers/gpu/drm/amd/pm

[PATCH 01/18] drm/amdgpu: move GFX6 defines into gfx_v6_0.c

2025-03-16 Thread Alexandre Demers
Send a few GFX6 defines where it's used in GFX6. Signed-off-by: Alexandre Demers --- drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/si_enums.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/dr

[PATCH] drm/amdgpu: Add support to load PSP TA v13.0.12 for SRIOV

2025-03-16 Thread Ahmad Rehman
Signed-off-by: Ahmad Rehman --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 79dad75bd0e7..04a186d0c236 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +

Re: [PATCH] drm/amdgpu: release xcp_mgr on exit

2025-03-16 Thread Lazar, Lijo
On 3/17/2025 8:03 AM, Flora Cui wrote: > Signed-off-by: Flora Cui Reviewed-by: Lijo Lazar Thanks, Lijo > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/

[PATCH] drm/amdgpu: release xcp_mgr on exit

2025-03-16 Thread Flora Cui
Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 7ca2ebdd3c95..ca556fd84bca 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_d

RE: [PATCH] drm/amdgpu: Fix SDMA engine reset logic

2025-03-16 Thread Huang, Tim
[Public] This patch is, Reviewed-by: Tim Huang > -Original Message- > From: jesse.zh...@amd.com > Sent: Monday, March 17, 2025 9:34 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Koenig, Christian > ; jiad...@amd.com; Huang, Tim > ; Zhang, Jesse(Jie) ; > Deucher, A

RE: [PATCH] drm/amdgpu/sdma: fix engine reset handling

2025-03-16 Thread Zhang, Jesse(Jie)
[AMD Official Use Only - AMD Internal Distribution Only] -Original Message- From: amd-gfx On Behalf Of Alex Deucher Sent: Sunday, March 16, 2025 1:22 AM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH] drm/amdgpu/sdma: fix engine reset handling Move the kfd susp

[PATCH] drm/amdgpu: Fix SDMA engine reset logic

2025-03-16 Thread jesse.zh...@amd.com
The scheduler should restart only if the reset operation succeeds This ensures that new tasks are only submitted to the queues after a successful reset. Fixes: 9b5d66721b66308a5 ("drm/amdgpu: Introduce conditional user queue suspension for SDMA resets") Suggested-by: Alex Deucher Signed-off-by

[PATCH] drm/amdgpu: Implement WQ_MEM_RECLAIM workqueue for Process Isolation

2025-03-16 Thread Srinivasan Shanmugam
The `amdgpu_enforce_isolation_wq` is allocated with the WQ_MEM_RECLAIM flag to mitigate workqueue flushing related to memory reclamation & to ensure proper memory handling during deferred work execution. Fixes the below: [ 2333.852549] workqueue: WQ_MEM_RECLAIM gfx_0.0.0:drm_sched_run_job_work [

[PATCH 2/2] drm/amdgpu: Wait for pte updates before uq_resume

2025-03-16 Thread Sathishkumar S
Wait for vm page table updates to finish before resuming user queues. Resume must follow after completion of pte updates to avoid page faults. amdgpu: [gfxhub] page fault (src_id:0 ring:40 vmid:10 pasid:32771) amdgpu: in process pid 0 thread pid 0) amdgpu: in page starting at address 0x80

[PATCH 1/2] drm/amdgpu: update eviction fence driver name

2025-03-16 Thread Sathishkumar S
update the eviction fence driver name to amdgpu_eviction_fence Signed-off-by: Sathishkumar S --- drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu

Re: [PATCH 2/2] drm/amdgpu: Wait for pte updates before uq_resume

2025-03-16 Thread Sundararaju, Sathishkumar
Please ignore this, will resend an updated version. Regards, Sathish On 3/16/2025 9:06 PM, Sathishkumar S wrote: Wait for vm page table updates to finish before resuming user queues. Resume must follow after completion of pte updates to avoid page faults. amdgpu: [gfxhub] page fault (src_id:0

[PATCH 2/2] drm/amdgpu: Wait for pte updates before uq_resume

2025-03-16 Thread Sathishkumar S
Wait for vm page table updates to finish before resuming user queues. Resume must follow after completion of pte updates to avoid page faults. amdgpu: [gfxhub] page fault (src_id:0 ring:40 vmid:10 pasid:32771) amdgpu: in process pid 0 thread pid 0) amdgpu: in page starting at address 0x80

[PATCH 1/2] drm/amdgpu: update eviction fence driver name

2025-03-16 Thread Sathishkumar S
update the eviction fence driver name to amdgpu_eviction_fence Signed-off-by: Sathishkumar S --- drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c b/drivers/gpu/drm/amd/amdgpu