Re: [PATCH v2 03/10] drm/amdgpu: abort fence poll if reset is started

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 29.05.24 um 15:22 schrieb Li, Yunxiang (Teddy):
[Public]

It's perfectly possible that the reset has already started before we enter the function.
Yeah, this could and does happen, but it just means we are back to the old behavior. I guess I could use "can I take the read side lock?" to test if the function is called outside of reset or not, would that be acceptable?

So like:
Int not_in_reset = read_try_lock(reset sem);
while (...) {
   if (not_in_reset && amdgpu_in_reset())
       break;
}
If (not_in_reset)
    up_read(reset sem)

I don't think trying to add some reset handling here makes sense in the first place.

Part of the reset/recovery procedure is to signal all fence and that includes the one we are waiting for here.

So this wait should return immediately in a reset anyway.

Regards,
Christian.



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux