Re: [PATCH 3/3] drm/amdkfd: gfx12 context save/restore trap handler fixes

2024-05-23 Thread Lancelot SIX
On 23/05/2024 20:31, Jay Cornwall wrote: On 5/23/2024 13:37, Lancelot SIX wrote: @@ -622,8 +638,15 @@ L_SAVE_HWREG:   #if ASIC_FAMILY >= CHIP_GFX12   // Ensure no further changes to barrier or LDS state. +    // STATE_PRIV.BARRIER_COMPLETE may change up to this point.  

Re: [PATCH 3/3] drm/amdkfd: gfx12 context save/restore trap handler fixes

2024-05-23 Thread Jay Cornwall
On 5/23/2024 13:37, Lancelot SIX wrote: @@ -622,8 +638,15 @@ L_SAVE_HWREG:   #if ASIC_FAMILY >= CHIP_GFX12   // Ensure no further changes to barrier or LDS state. +    // STATE_PRIV.BARRIER_COMPLETE may change up to this point.   s_barrier_signal    -2   s_barrier_wait    -2 + +   

Re: [PATCH 3/3] drm/amdkfd: gfx12 context save/restore trap handler fixes

2024-05-23 Thread Lancelot SIX
Hi Jay, I have added a couple (minor) of comments below. On 23/05/2024 15:08, Jay Cornwall wrote: Fix LDS size interpretation: 512 bytes (>= gfx12) vs 256 (< gfx12). Ensure STATE_PRIV.BARRIER_COMPLETE cannot change after reading or before writing. Other waves in the threadgroup may cause this

[PATCH 3/3] drm/amdkfd: gfx12 context save/restore trap handler fixes

2024-05-23 Thread Jay Cornwall
Fix LDS size interpretation: 512 bytes (>= gfx12) vs 256 (< gfx12). Ensure STATE_PRIV.BARRIER_COMPLETE cannot change after reading or before writing. Other waves in the threadgroup may cause this field to assert if they complete the barrier. Do not overwrite