AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Shashank Sharma <shashank.sharma@amd.com>,
	Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	amd-gfx@lists.freedesktop.org,
	Christian Koenig <christian.koenig@amd.com>,
	arvind.yadav@amd.com, arunpravin.paneerselvam@amd.com
Subject: Re: [RFC 0/7] RFC: Usermode queue for AMDGPU driver
Date: Tue, 3 Jan 2023 11:02:14 +0100	[thread overview]
Message-ID: <04ff49dc-a059-10d3-abd5-de11298047ae@gmail.com> (raw)
In-Reply-To: <fdaeef41-cdab-e364-5d99-4366d05ead43@amd.com>

Am 03.01.23 um 11:00 schrieb Shashank Sharma:
>
> On 03/01/2023 10:47, Christian König wrote:
>> Am 03.01.23 um 10:43 schrieb Shashank Sharma:
>>>
>>> On 29/12/2022 19:02, Alex Deucher wrote:
>>>> On Fri, Dec 23, 2022 at 2:37 PM Shashank Sharma 
>>>> <shashank.sharma@amd.com> wrote:
>>>>> This is a RFC series to implement usermode graphics queues for AMDGPU
>>>>> driver (Navi 3X and above). The idea of usermode graphics queue is to
>>>>> allow direct workload submission from a userspace graphics process 
>>>>> who
>>>>> has amdgpu graphics context.
>>>>>
>>>>> Once we have some initial feedback on the design, we will publish a
>>>>> follow up V1 series with a libdrm consumer test.
>>>> I think this should look more like the following:
>>>> 1. Convert doorbells to full fledged GEM objects just like vram.  Then
>>>> update the GEM IOCTL to allow allocation of doorbell BOs.
>>>> 2. Store MQD data per amdgpu_ctx.
>>>
>>> If my understanding of the comments is correct, we are having 
>>> conflicting opinions here on where to save the MQD data. @Christian ?
>>
>> You need something like an amdgpu_userq object which holds the BO 
>> with the MQD the hardware is using as well as anything else necessary 
>> for the queue.
>
> And we will be storing it into fpriv->amdgpu driver_private area 
> (probably by using something like amdgpu_useq_mgr or similar), similar 
> to amdgpu_ctx_mgr.

Exactly that, yes. The amdgpu_userq_mgr keeps the idr/mutex and 
everything necessary per client while the amdgpu_userq object represents 
the queue itself.

Christian.

>
> - Shashank
>
>>
>> Regards,
>> Christian.
>>
>>>
>>>> 3. Create secure semaphore pool and map RO into each GPUVM.
>>>> 4. Add callbacks to each IP type that supports user mode queues.
>>>> These callbacks should handle the IP specific MQD initialization and
>>>> mapping/unmapping details including allocation of BOs for the MQD
>>>> itself and any relevant metadata.  The USERQ IOCTL handler will look
>>>> up the callback based on the IP type specified in the IOCTL.
>>>
>>> Noted.
>>>
>>> Shashank
>>>
>>>>
>>>> Alex
>>>>
>>>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>>>> Cc: Christian Koenig <christian.koenig@amd.com>
>>>>>
>>>>> Alex Deucher (1):
>>>>>    drm/amdgpu: UAPI for user queue management
>>>>>
>>>>> Arunpravin Paneer Selvam (1):
>>>>>    drm/amdgpu: Secure semaphore for usermode queue
>>>>>
>>>>> Arvind Yadav (1):
>>>>>    drm/amdgpu: Create MQD for userspace queue
>>>>>
>>>>> Shashank Sharma (4):
>>>>>    drm/amdgpu: Add usermode queue for gfx work
>>>>>    drm/amdgpu: Allocate doorbell slot for user queue
>>>>>    drm/amdgpu: Create context for usermode queue
>>>>>    drm/amdgpu: Map userqueue into HW
>>>>>
>>>>>   drivers/gpu/drm/amd/amdgpu/Makefile           |   3 +
>>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu.h           |  14 +
>>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.h       |   1 +
>>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 486 
>>>>> ++++++++++++++++
>>>>>   .../amd/amdgpu/amdgpu_userqueue_secure_sem.c  | 245 ++++++++
>>>>>   .../drm/amd/include/amdgpu_usermode_queue.h   |  68 +++
>>>>>   .../amd/include/amdgpu_usermode_queue_mqd.h   | 544 
>>>>> ++++++++++++++++++
>>>>>   include/uapi/drm/amdgpu_drm.h                 |  52 ++
>>>>>   8 files changed, 1413 insertions(+)
>>>>>   create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
>>>>>   create mode 100644 
>>>>> drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue_secure_sem.c
>>>>>   create mode 100644 
>>>>> drivers/gpu/drm/amd/include/amdgpu_usermode_queue.h
>>>>>   create mode 100644 
>>>>> drivers/gpu/drm/amd/include/amdgpu_usermode_queue_mqd.h
>>>>>
>>>>> -- 
>>>>> 2.34.1
>>>>>
>>


      reply	other threads:[~2023-01-03 10:02 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23 19:36 [RFC 0/7] RFC: Usermode queue for AMDGPU driver Shashank Sharma
2022-12-23 19:36 ` [RFC 1/7] drm/amdgpu: UAPI for user queue management Shashank Sharma
2022-12-24 20:20   ` Bas Nieuwenhuizen
2022-12-27 16:58     ` Alex Deucher
2023-01-02 11:27       ` Christian König
2023-01-03 19:51         ` Alex Deucher
2023-01-02 13:26   ` Christian König
2023-01-03 14:23     ` Alex Deucher
2023-01-03 18:29   ` Felix Kuehling
2023-01-03 19:17     ` Liu, Shaoyun
2023-01-03 19:22       ` Alex Deucher
2023-01-03 19:25         ` Liu, Shaoyun
2023-01-03 19:52           ` Alex Deucher
2023-01-03 20:05             ` Felix Kuehling
2023-01-03 19:18     ` Alex Deucher
2022-12-23 19:36 ` [RFC 2/7] drm/amdgpu: Add usermode queue for gfx work Shashank Sharma
2022-12-24 18:19   ` Oded Gabbay
2022-12-26 10:34     ` Shashank Sharma
2022-12-25 15:44   ` Christian König
2022-12-26 10:41     ` Shashank Sharma
2023-01-02 12:39       ` Christian König
2023-01-03  9:12         ` Shashank Sharma
2023-01-03  9:15           ` Christian König
2023-01-03  9:22             ` Shashank Sharma
2023-01-03  9:35               ` Christian König
2023-01-03 14:34                 ` Alex Deucher
2023-01-03 14:50                   ` Christian König
2022-12-29 17:41   ` Alex Deucher
2023-01-02 13:53     ` Christian König
2023-01-03  9:32       ` Shashank Sharma
2023-01-03  9:16     ` Shashank Sharma
2023-01-04  8:55   ` Zhu, Jiadong
2023-01-04  8:58     ` Shashank Sharma
2022-12-23 19:36 ` [RFC 3/7] drm/amdgpu: Create MQD for userspace queue Shashank Sharma
2022-12-29 17:47   ` Alex Deucher
2023-01-03  9:36     ` Shashank Sharma
2023-01-03 18:37       ` Felix Kuehling
2023-01-04  6:21         ` Yadav, Arvind
2023-01-04  9:10           ` Christian König
2023-01-04  9:13             ` Shashank Sharma
2023-01-04  9:17               ` Christian König
2023-01-04  9:23                 ` Shashank Sharma
2023-01-04 14:35                   ` Felix Kuehling
2023-01-04 14:38                     ` Yadav, Arvind
2023-01-04 14:41                     ` Shashank Sharma
2023-01-04 14:28           ` Alex Deucher
2022-12-23 19:36 ` [RFC 4/7] drm/amdgpu: Allocate doorbell slot for user queue Shashank Sharma
2022-12-29 17:50   ` Alex Deucher
2023-01-03  9:37     ` Shashank Sharma
2022-12-23 19:36 ` [RFC 5/7] drm/amdgpu: Create context for usermode queue Shashank Sharma
2022-12-29 17:54   ` Alex Deucher
2023-01-03  9:40     ` Shashank Sharma
2023-01-03 14:48       ` Alex Deucher
2022-12-23 19:36 ` [RFC 6/7] drm/amdgpu: Map userqueue into HW Shashank Sharma
2022-12-29 17:51   ` Alex Deucher
2023-01-03  9:38     ` Shashank Sharma
2022-12-23 19:36 ` [RFC 7/7] drm/amdgpu: Secure semaphore for usermode queue Shashank Sharma
2022-12-25 10:07   ` Zhang, Yifan
2022-12-27  9:32     ` Arunpravin Paneer Selvam
2022-12-29 18:02 ` [RFC 0/7] RFC: Usermode queue for AMDGPU driver Alex Deucher
2023-01-03  9:43   ` Shashank Sharma
2023-01-03  9:47     ` Christian König
2023-01-03 10:00       ` Shashank Sharma
2023-01-03 10:02         ` Christian König [this message]

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=04ff49dc-a059-10d3-abd5-de11298047ae@gmail.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=arunpravin.paneerselvam@amd.com \
    --cc=arvind.yadav@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=shashank.sharma@amd.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