[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2d8d962e-9fa3-7671-de05-8401a81b1356@mailbox.org>
Date: Tue, 7 Feb 2023 15:58:33 +0100
From: Michel Dänzer <michel.daenzer@...lbox.org>
To: Pekka Paalanen <ppaalanen@...il.com>,
André Almeida <andrealmeid@...lia.com>
Cc: pierre-eric.pelloux-prayer@....com,
'Marek Olšák' <maraeo@...il.com>,
amaranath.somalapuram@....com, linux-kernel@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
kernel-dev@...lia.com, alexander.deucher@....com,
contactshashanksharma@...il.com,
Christian König <christian.koenig@....com>,
"Pierre-Loup A . Griffais" <pgriffais@...vesoftware.com>
Subject: Re: [RFC PATCH] drm: Create documentation about device resets
On 2/7/23 14:30, Pekka Paalanen wrote:
> On Mon, 23 Jan 2023 21:38:11 +0100
> Christian König <christian.koenig@....com> wrote:
>> Am 23.01.23 um 21:26 schrieb André Almeida:
>>>
>>> diff --git a/Documentation/gpu/drm-reset.rst b/Documentation/gpu/drm-reset.rst
>>> new file mode 100644
>>> index 000000000000..0dd11a469cf9
>>> --- /dev/null
>>> +++ b/Documentation/gpu/drm-reset.rst
>>> @@ -0,0 +1,51 @@
>>> +================
>>> +DRM Device Reset
>>> +================
>>> +
>>> +The GPU stack is really complex and is prone to errors, from hardware bugs,
>>> +faulty applications and everything in the many layers in between. To recover
>>> +from this kind of state, sometimes is needed to reset the GPU. Unproper handling
>>> +of GPU resets can lead to an unstable userspace. This page describes what's the
>>> +expected behaviour from DRM drivers to do in those situations, from usermode
>>> +drivers and compositors as well.
>>> +
>>> +Robustness
>>> +----------
>>> +
>>> +First of all, application robust APIs, when available, should be used. This
>>> +allows the application to correctly recover and continue to run after a reset.
>>> +Apps that doesn't use this should be promptly killed when the kernel driver
>>> +detects that it's in broken state. Specifically guidelines for some APIs:
>>> +
>>
>>> +- OpenGL: During a reset, KMD kill processes that haven't ARB Robustness
>>> + enabled, assuming they can't recover.
>>
>> This is a pretty clear NAK from my side to this approach. The KMD should
>> never mess with an userspace process directly in such a way.
>>
>> Instead use something like this "OpenGL: KMD signals the abortion of
>> submitted commands and the UMD should then react accordingly and abort
>> the application.".
>
> what Christian said, plus I would not assume that robust programs will
> always respond by creating a new context. They could also switch
> to a software renderer, [...]
That is indeed what Firefox does.
--
Earthling Michel Dänzer | https://redhat.com
Libre software enthusiast | Mesa and Xwayland developer
Powered by blists - more mailing lists