mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: pierre-eric.pelloux-prayer@amd.com,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"'Marek Olšák'" <maraeo@gmail.com>,
	"Michel Dänzer" <michel.daenzer@mailbox.org>,
	"Simon Ser" <contact@emersion.fr>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"Timur Kristóf" <timur.kristof@gmail.com>,
	amd-gfx@lists.freedesktop.org,
	"Pekka Paalanen" <ppaalanen@gmail.com>,
	"Daniel Stone" <daniel@fooishbar.org>,
	"Rob Clark" <robdclark@gmail.com>,
	"Samuel Pitoiset" <samuel.pitoiset@gmail.com>,
	kernel-dev@igalia.com,
	"Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>,
	alexander.deucher@amd.com,
	"Pekka Paalanen" <pekka.paalanen@collabora.com>,
	"Dave Airlie" <airlied@gmail.com>,
	christian.koenig@amd.com
Subject: Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations
Date: Tue, 27 Jun 2023 18:17:35 -0300	[thread overview]
Message-ID: <b3f72b45-c607-7cd3-2bdb-21567f901469@igalia.com> (raw)
In-Reply-To: <1dbeb507-3f18-1b5d-37be-fcfd60a1c0d4@gmail.com>

Em 27/06/2023 14:47, Christian König escreveu:
> Am 27.06.23 um 15:23 schrieb André Almeida:
>> Create a section that specifies how to deal with DRM device resets for
>> kernel and userspace drivers.
>>
>> Acked-by: Pekka Paalanen <pekka.paalanen@collabora.com>
>> Signed-off-by: André Almeida <andrealmeid@igalia.com>
>> ---
>>
>> v4: 
>> https://lore.kernel.org/lkml/20230626183347.55118-1-andrealmeid@igalia.com/
>>
>> Changes:
>>   - Grammar fixes (Randy)
>>
>>   Documentation/gpu/drm-uapi.rst | 68 ++++++++++++++++++++++++++++++++++
>>   1 file changed, 68 insertions(+)
>>
>> diff --git a/Documentation/gpu/drm-uapi.rst 
>> b/Documentation/gpu/drm-uapi.rst
>> index 65fb3036a580..3cbffa25ed93 100644
>> --- a/Documentation/gpu/drm-uapi.rst
>> +++ b/Documentation/gpu/drm-uapi.rst
>> @@ -285,6 +285,74 @@ for GPU1 and GPU2 from different vendors, and a 
>> third handler for
>>   mmapped regular files. Threads cause additional pain with signal
>>   handling as well.
>> +Device reset
>> +============
>> +
>> +The GPU stack is really complex and is prone to errors, from hardware 
>> bugs,
>> +faulty applications and everything in between the many layers. Some 
>> errors
>> +require resetting the device in order to make the device usable 
>> again. This
>> +sections describes the expectations for DRM and usermode drivers when a
>> +device resets and how to propagate the reset status.
>> +
>> +Kernel Mode Driver
>> +------------------
>> +
>> +The KMD is responsible for checking if the device needs a reset, and 
>> to perform
>> +it as needed. Usually a hang is detected when a job gets stuck 
>> executing. KMD
>> +should keep track of resets, because userspace can query any time 
>> about the
>> +reset stats for an specific context.
> 
> Maybe drop the part "for a specific context". Essentially the reset 
> query could use global counters instead and we won't need the context 
> any more here.
> 

Right, I wrote like this to reflect how it's currently implemented.

If follow correctly what you meant, KMD could always notify the global 
count for UMD, and we would move to the UMD the responsibility to manage 
the reset counters, right? This would also simplify my 
DRM_IOCTL_GET_RESET proposal. I'll apply your suggestion to the next doc 
version.

> Apart from that this sounds good to me, feel free to add my rb.
> 
> Regards,
> Christian.
> 
> 

  reply	other threads:[~2023-06-27 21:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27 13:23 André Almeida
2023-06-27 16:09 ` Randy Dunlap
2023-06-27 17:47 ` Christian König
2023-06-27 21:17   ` André Almeida [this message]
2023-06-29 13:11     ` André Almeida
     [not found] ` <CAAxE2A4Hquz9bJNSEaUtBoJC3qbLBPYXd8i3JX9AhNUx_iUKpg@mail.gmail.com>
2023-06-27 21:31   ` André Almeida
2023-06-30 14:48 ` Sebastian Wick
2023-06-30 14:59   ` Alex Deucher
2023-06-30 15:11     ` Michel Dänzer
     [not found]       ` <CAAxE2A5C96k5ua+r938VA_+w7gHHNTdF3n8LwDb98W0Bf9wCVA@mail.gmail.com>
2023-07-03  7:12         ` Michel Dänzer
2023-07-03  8:49           ` Pekka Paalanen
2023-07-03 15:00             ` André Almeida
2023-07-04  7:42               ` Pekka Paalanen
     [not found]           ` <CAAxE2A7RGDY4eRC85CsqfszNzyKvMU2MX1wa+3HZ1hgNeAw3cQ@mail.gmail.com>
2023-07-04  2:38             ` Randy Dunlap
     [not found]               ` <CAAxE2A5UizddTTBWtuL480bDxgniVcBq7fjRGQhoC-5FG9vKpA@mail.gmail.com>
2023-07-04  2:48                 ` Randy Dunlap
2023-07-04  7:54             ` Michel Dänzer
     [not found]               ` <CAAxE2A7tNCWkL_M2YcE=RN+nqqcokgBR4hcD2sR3fGAY2t4uLg@mail.gmail.com>
2023-07-05  7:32                 ` Michel Dänzer
2023-07-05 15:53                   ` Marek Olšák
2023-06-30 15:21     ` Sebastian Wick
2023-07-25  2:55 ` Non-robust apps and resets (was Re: [PATCH v5 1/1] drm/doc: Document DRM device reset expectations) André Almeida
2023-07-25  7:02   ` Simon Ser
2023-07-25  8:03   ` Michel Dänzer
2023-07-25 13:02     ` André Almeida
2023-07-26  8:07       ` Michel Dänzer
2023-08-02  7:38         ` Marek Olšák
2023-08-02  8:34           ` Michel Dänzer
2023-07-25 15:05     ` Marek Olšák
2023-07-25 17:00       ` Michel Dänzer
2023-07-26  7:55         ` Timur Kristóf
2023-08-04 13:03 ` [PATCH v5 1/1] drm/doc: Document DRM device reset expectations Daniel Vetter
2023-08-08 12:13   ` Sebastian Wick
2023-08-08 17:03     ` Marek Olšák
2023-08-09  7:35       ` Michel Dänzer
2023-08-09 19:15         ` Marek Olšák
2023-08-10  7:33           ` Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b3f72b45-c607-7cd3-2bdb-21567f901469@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bas@basnieuwenhuizen.nl \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=contact@emersion.fr \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-dev@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maraeo@gmail.com \
    --cc=michel.daenzer@mailbox.org \
    --cc=pekka.paalanen@collabora.com \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=ppaalanen@gmail.com \
    --cc=rdunlap@infradead.org \
    --cc=robdclark@gmail.com \
    --cc=samuel.pitoiset@gmail.com \
    --cc=timur.kristof@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®