On 2026. augusztus 28., péntek 17:53:54 közép-európai nyári idő Lazar, Lijo 
wrote:
> >> 
> >> Instead of moving it here - sdma_v5_x_reset_queue and using it for 5.2
> >> is better. This may not work in the same way for all legacy queues.
> >> 
> >> Thanks,
> >> Lijo
> > 
> > Hi,
> > 
> > As far as I see, this function can be reused for all generations that
> > don't
> > use MES. If you don't think so, please explain why not.
> 
> This function doesn't take care of paging ring (if enabled). Or, this
> could be made simlar to the one in sdma 4.4.2.

Hi Lijo,

I took another look at this, and I now see what you mean.

I think the solution is to remove the "caller_handles_kernel_queues" argument 
and just check whether the workqueue on the SDMA gfx_ring is already stopped.
This would be similar to how amdgpu_multi_ring_reset_helper_begin() works, in 
fact (with a few changes) that function could be adopted to work for this use 
case as well.

> not sure if the sequence reversal (save content -> kfd
> suspend vs kfd suspend -> save content) has other side effects.

Good point, thanks for noticing that.

I think the upstream SDMA v5 function is wrong and the correct sequence is the 
SDMA v4.4.2 code: suspend the KFD first and then save the ring contents. I will 
adjust my code to match the v4.4.2 behaviour in the next version of this 
series.

@Alex - does that sound reasonable to you?

Thanks & best regards,
Timur



Reply via email to