From: "Christian König" <christian.koenig@amd.com>
To: "André Almeida" <andrealmeid@igalia.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: pierre-eric.pelloux-prayer@amd.com,
"Daniel Vetter" <daniel@ffwll.ch>,
"'Marek Olšák'" <maraeo@gmail.com>,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Simon Ser" <contact@emersion.fr>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"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, "Dave Airlie" <airlied@gmail.com>
Subject: Re: [RFC PATCH v3 0/4] drm: Standardize device reset notification
Date: Wed, 21 Jun 2023 09:42:25 +0200 [thread overview]
Message-ID: <caa69e8e-f330-d819-e8cd-7b06aa8eb855@amd.com> (raw)
In-Reply-To: <20230621005719.836857-1-andrealmeid@igalia.com>
Am 21.06.23 um 02:57 schrieb André Almeida:
> Hi,
>
> This is a new version of the documentation for DRM device resets. As I dived
> more in the subject, I started to believe that part of the problem was the lack
> of a DRM API to get reset information from the driver. With an API, we can
> better standardize reset queries, increase common code from both DRM and Mesa,
> and make easier to write end-to-end tests.
>
> So this patchset, along with the documentation, comes with a new IOCTL and two
> implementations of it for amdgpu and i915 (although just the former was really
> tested). This IOCTL uses the "context id" to query reset information, but this
> might be not generic enough to be included in a DRM API.
Well the basic problem with that is that we don't have a standard DRM
context defined.
If you want to do this you should probably start there first.
Apart from that this looks like a really really good idea to me,
especially that we document the reset expectations.
Regards,
Christian.
> At least for amdgpu,
> this information is encapsulated by libdrm so one can't just call the ioctl
> directly from the UMD as I was planning to, but a small refactor can be done to
> expose the id. Anyway, I'm sharing it as it is to gather feedback if this seems
> to work.
>
> The amdgpu and i915 implementations are provided as a mean of testing and as
> exemplification, and not as reference code yet, as the goal is more about the
> interface itself then the driver parts.
>
> For the documentation itself, after spending some time reading the reset path in
> the kernel in Mesa, I decide to rewrite it to better reflect how it works, from
> bottom to top.
>
> You can check the userspace side of the IOCLT here:
> Mesa: https://gitlab.freedesktop.org/andrealmeid/mesa/-/commit/cd687b22fb32c21b23596c607003e2a495f465
> libdrm: https://gitlab.freedesktop.org/andrealmeid/libdrm/-/commit/b31e5404893ee9a85d1aa67e81c2f58c1dac3c46
>
> For testing, I use this vulkan app that has an infinity loop in the shader:
> https://github.com/andrealmeid/vulkan-triangle-v1
>
> Feedbacks are welcomed!
>
> Thanks,
> André
>
> v2: https://lore.kernel.org/all/20230227204000.56787-1-andrealmeid@igalia.com/
> v1: https://lore.kernel.org/all/20230123202646.356592-1-andrealmeid@igalia.com/
>
> André Almeida (4):
> drm/doc: Document DRM device reset expectations
> drm: Create DRM_IOCTL_GET_RESET
> drm/amdgpu: Implement DRM_IOCTL_GET_RESET
> drm/i915: Implement DRM_IOCTL_GET_RESET
>
> Documentation/gpu/drm-uapi.rst | 51 ++++++++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 35 +++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 5 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 +++-
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 +
> drivers/gpu/drm/drm_debugfs.c | 2 +
> drivers/gpu/drm/drm_ioctl.c | 58 +++++++++++++++++++
> drivers/gpu/drm/i915/gem/i915_gem_context.c | 18 ++++++
> drivers/gpu/drm/i915/gem/i915_gem_context.h | 2 +
> .../gpu/drm/i915/gem/i915_gem_context_types.h | 2 +
> drivers/gpu/drm/i915/i915_driver.c | 2 +
> include/drm/drm_device.h | 3 +
> include/drm/drm_drv.h | 3 +
> include/uapi/drm/drm.h | 21 +++++++
> include/uapi/drm/drm_mode.h | 15 +++++
> 17 files changed, 233 insertions(+), 3 deletions(-)
>
WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <christian.koenig@amd.com>
To: "André Almeida" <andrealmeid@igalia.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: pierre-eric.pelloux-prayer@amd.com,
"'Marek Olšák'" <maraeo@gmail.com>,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Pekka Paalanen" <ppaalanen@gmail.com>,
"Samuel Pitoiset" <samuel.pitoiset@gmail.com>,
kernel-dev@igalia.com, alexander.deucher@amd.com
Subject: Re: [RFC PATCH v3 0/4] drm: Standardize device reset notification
Date: Wed, 21 Jun 2023 09:42:25 +0200 [thread overview]
Message-ID: <caa69e8e-f330-d819-e8cd-7b06aa8eb855@amd.com> (raw)
In-Reply-To: <20230621005719.836857-1-andrealmeid@igalia.com>
Am 21.06.23 um 02:57 schrieb André Almeida:
> Hi,
>
> This is a new version of the documentation for DRM device resets. As I dived
> more in the subject, I started to believe that part of the problem was the lack
> of a DRM API to get reset information from the driver. With an API, we can
> better standardize reset queries, increase common code from both DRM and Mesa,
> and make easier to write end-to-end tests.
>
> So this patchset, along with the documentation, comes with a new IOCTL and two
> implementations of it for amdgpu and i915 (although just the former was really
> tested). This IOCTL uses the "context id" to query reset information, but this
> might be not generic enough to be included in a DRM API.
Well the basic problem with that is that we don't have a standard DRM
context defined.
If you want to do this you should probably start there first.
Apart from that this looks like a really really good idea to me,
especially that we document the reset expectations.
Regards,
Christian.
> At least for amdgpu,
> this information is encapsulated by libdrm so one can't just call the ioctl
> directly from the UMD as I was planning to, but a small refactor can be done to
> expose the id. Anyway, I'm sharing it as it is to gather feedback if this seems
> to work.
>
> The amdgpu and i915 implementations are provided as a mean of testing and as
> exemplification, and not as reference code yet, as the goal is more about the
> interface itself then the driver parts.
>
> For the documentation itself, after spending some time reading the reset path in
> the kernel in Mesa, I decide to rewrite it to better reflect how it works, from
> bottom to top.
>
> You can check the userspace side of the IOCLT here:
> Mesa: https://gitlab.freedesktop.org/andrealmeid/mesa/-/commit/cd687b22fb32c21b23596c607003e2a495f465
> libdrm: https://gitlab.freedesktop.org/andrealmeid/libdrm/-/commit/b31e5404893ee9a85d1aa67e81c2f58c1dac3c46
>
> For testing, I use this vulkan app that has an infinity loop in the shader:
> https://github.com/andrealmeid/vulkan-triangle-v1
>
> Feedbacks are welcomed!
>
> Thanks,
> André
>
> v2: https://lore.kernel.org/all/20230227204000.56787-1-andrealmeid@igalia.com/
> v1: https://lore.kernel.org/all/20230123202646.356592-1-andrealmeid@igalia.com/
>
> André Almeida (4):
> drm/doc: Document DRM device reset expectations
> drm: Create DRM_IOCTL_GET_RESET
> drm/amdgpu: Implement DRM_IOCTL_GET_RESET
> drm/i915: Implement DRM_IOCTL_GET_RESET
>
> Documentation/gpu/drm-uapi.rst | 51 ++++++++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 35 +++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 5 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 +++-
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 +
> drivers/gpu/drm/drm_debugfs.c | 2 +
> drivers/gpu/drm/drm_ioctl.c | 58 +++++++++++++++++++
> drivers/gpu/drm/i915/gem/i915_gem_context.c | 18 ++++++
> drivers/gpu/drm/i915/gem/i915_gem_context.h | 2 +
> .../gpu/drm/i915/gem/i915_gem_context_types.h | 2 +
> drivers/gpu/drm/i915/i915_driver.c | 2 +
> include/drm/drm_device.h | 3 +
> include/drm/drm_drv.h | 3 +
> include/uapi/drm/drm.h | 21 +++++++
> include/uapi/drm/drm_mode.h | 15 +++++
> 17 files changed, 233 insertions(+), 3 deletions(-)
>
WARNING: multiple messages have this Message-ID (diff)
From: "Christian König" <christian.koenig@amd.com>
To: "André Almeida" <andrealmeid@igalia.com>,
dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Cc: kernel-dev@igalia.com, alexander.deucher@amd.com,
pierre-eric.pelloux-prayer@amd.com,
"Simon Ser" <contact@emersion.fr>,
"Rob Clark" <robdclark@gmail.com>,
"Pekka Paalanen" <ppaalanen@gmail.com>,
"Daniel Vetter" <daniel@ffwll.ch>,
"Daniel Stone" <daniel@fooishbar.org>,
"'Marek Olšák'" <maraeo@gmail.com>,
"Dave Airlie" <airlied@gmail.com>,
"Michel Dänzer" <michel.daenzer@mailbox.org>,
"Samuel Pitoiset" <samuel.pitoiset@gmail.com>,
"Timur Kristóf" <timur.kristof@gmail.com>,
"Bas Nieuwenhuizen" <bas@basnieuwenhuizen.nl>
Subject: Re: [RFC PATCH v3 0/4] drm: Standardize device reset notification
Date: Wed, 21 Jun 2023 09:42:25 +0200 [thread overview]
Message-ID: <caa69e8e-f330-d819-e8cd-7b06aa8eb855@amd.com> (raw)
In-Reply-To: <20230621005719.836857-1-andrealmeid@igalia.com>
Am 21.06.23 um 02:57 schrieb André Almeida:
> Hi,
>
> This is a new version of the documentation for DRM device resets. As I dived
> more in the subject, I started to believe that part of the problem was the lack
> of a DRM API to get reset information from the driver. With an API, we can
> better standardize reset queries, increase common code from both DRM and Mesa,
> and make easier to write end-to-end tests.
>
> So this patchset, along with the documentation, comes with a new IOCTL and two
> implementations of it for amdgpu and i915 (although just the former was really
> tested). This IOCTL uses the "context id" to query reset information, but this
> might be not generic enough to be included in a DRM API.
Well the basic problem with that is that we don't have a standard DRM
context defined.
If you want to do this you should probably start there first.
Apart from that this looks like a really really good idea to me,
especially that we document the reset expectations.
Regards,
Christian.
> At least for amdgpu,
> this information is encapsulated by libdrm so one can't just call the ioctl
> directly from the UMD as I was planning to, but a small refactor can be done to
> expose the id. Anyway, I'm sharing it as it is to gather feedback if this seems
> to work.
>
> The amdgpu and i915 implementations are provided as a mean of testing and as
> exemplification, and not as reference code yet, as the goal is more about the
> interface itself then the driver parts.
>
> For the documentation itself, after spending some time reading the reset path in
> the kernel in Mesa, I decide to rewrite it to better reflect how it works, from
> bottom to top.
>
> You can check the userspace side of the IOCLT here:
> Mesa: https://gitlab.freedesktop.org/andrealmeid/mesa/-/commit/cd687b22fb32c21b23596c607003e2a495f465
> libdrm: https://gitlab.freedesktop.org/andrealmeid/libdrm/-/commit/b31e5404893ee9a85d1aa67e81c2f58c1dac3c46
>
> For testing, I use this vulkan app that has an infinity loop in the shader:
> https://github.com/andrealmeid/vulkan-triangle-v1
>
> Feedbacks are welcomed!
>
> Thanks,
> André
>
> v2: https://lore.kernel.org/all/20230227204000.56787-1-andrealmeid@igalia.com/
> v1: https://lore.kernel.org/all/20230123202646.356592-1-andrealmeid@igalia.com/
>
> André Almeida (4):
> drm/doc: Document DRM device reset expectations
> drm: Create DRM_IOCTL_GET_RESET
> drm/amdgpu: Implement DRM_IOCTL_GET_RESET
> drm/i915: Implement DRM_IOCTL_GET_RESET
>
> Documentation/gpu/drm-uapi.rst | 51 ++++++++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 35 +++++++++++
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h | 5 ++
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 +++-
> drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 2 +
> drivers/gpu/drm/drm_debugfs.c | 2 +
> drivers/gpu/drm/drm_ioctl.c | 58 +++++++++++++++++++
> drivers/gpu/drm/i915/gem/i915_gem_context.c | 18 ++++++
> drivers/gpu/drm/i915/gem/i915_gem_context.h | 2 +
> .../gpu/drm/i915/gem/i915_gem_context_types.h | 2 +
> drivers/gpu/drm/i915/i915_driver.c | 2 +
> include/drm/drm_device.h | 3 +
> include/drm/drm_drv.h | 3 +
> include/uapi/drm/drm.h | 21 +++++++
> include/uapi/drm/drm_mode.h | 15 +++++
> 17 files changed, 233 insertions(+), 3 deletions(-)
>
next prev parent reply other threads:[~2023-06-21 7:42 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 0:57 [RFC PATCH v3 0/4] drm: Standardize device reset notification André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 0:57 ` [RFC PATCH v3 1/4] drm/doc: Document DRM device reset expectations André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 7:58 ` Pekka Paalanen
2023-06-21 7:58 ` Pekka Paalanen
2023-06-21 7:58 ` Pekka Paalanen
2023-06-21 16:28 ` André Almeida
2023-06-21 16:28 ` André Almeida
2023-06-21 16:28 ` André Almeida
2023-06-22 8:12 ` Pekka Paalanen
2023-06-22 8:12 ` Pekka Paalanen
2023-06-22 8:12 ` Pekka Paalanen
2023-06-26 16:15 ` André Almeida
2023-06-26 16:15 ` André Almeida
2023-06-26 16:15 ` André Almeida
2023-06-21 0:57 ` [RFC PATCH v3 2/4] drm: Create DRM_IOCTL_GET_RESET André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 8:09 ` Pekka Paalanen
2023-06-21 8:09 ` Pekka Paalanen
2023-06-21 8:09 ` Pekka Paalanen
2023-06-21 16:33 ` André Almeida
2023-06-21 16:33 ` André Almeida
2023-06-21 16:33 ` André Almeida
2023-06-22 8:22 ` Pekka Paalanen
2023-06-22 8:22 ` Pekka Paalanen
2023-06-22 8:22 ` Pekka Paalanen
2023-06-22 9:59 ` Christian König
2023-06-22 9:59 ` Christian König
2023-06-22 9:59 ` Christian König
2023-06-21 0:57 ` [RFC PATCH v3 3/4] drm/amdgpu: Implement DRM_IOCTL_GET_RESET André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 7:40 ` Christian König
2023-06-21 7:40 ` Christian König
2023-06-21 7:40 ` Christian König
2023-06-21 16:38 ` André Almeida
2023-06-21 16:38 ` André Almeida
2023-06-21 16:38 ` André Almeida
2023-06-22 7:45 ` Christian König
2023-06-22 7:45 ` Christian König
2023-06-22 7:45 ` Christian König
2023-06-21 0:57 ` [RFC PATCH v3 4/4] drm/i915: " André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 0:57 ` André Almeida
2023-06-21 7:38 ` Jani Nikula
2023-06-21 7:38 ` Jani Nikula
2023-06-21 7:42 ` Christian König [this message]
2023-06-21 7:42 ` [RFC PATCH v3 0/4] drm: Standardize device reset notification Christian König
2023-06-21 7:42 ` Christian König
2023-06-21 15:06 ` André Almeida
2023-06-21 15:06 ` André Almeida
2023-06-21 15:06 ` André Almeida
2023-06-21 15:09 ` Christian König
2023-06-21 15:09 ` Christian König
2023-06-21 15:09 ` Christian König
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=caa69e8e-f330-d819-e8cd-7b06aa8eb855@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=andrealmeid@igalia.com \
--cc=bas@basnieuwenhuizen.nl \
--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=pierre-eric.pelloux-prayer@amd.com \
--cc=ppaalanen@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.