[PATCH] drm/amdgpu/sriov: reject kms open if TDR not finished or failed

Michel Dänzer michel at daenzer.net
Thu Apr 26 09:01:00 UTC 2018

On 2018-04-26 09:57 AM, Deng, Emily wrote:
>>>> This seems like a bad idea, as it would cause basically any
>>>> userspace which wants to use the GPU to fail to start during a
>>>> GPU reset.
>>> [Emily] Yes, this is what the change want to do, when driver is
>>> doing gpu recover or hardware is doing reset, it doesn't want to
>>> be interrupted, and during the reset any driver open kms is
>>> meaningless.
>> Applications randomly failing to start up during a GPU reset would
>> be surprising and confusing for the user. The driver needs to
>> handle this transparently.
> [Emily] Yes, you are right, how about to sleep for some time in here
> to wait the GPU reset successfully. After sleep, if it still in gpu
> reset, then return error to APP?

I think the only case where returning an error here *might* be
appropriate is when the driver has tried resetting the GPU, but it has
definitely and irrecoverably failed. But even in that case, it might be
better to let the open succeed, and let userspace figure out what
happened by other means.

Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

More information about the amd-gfx mailing list