All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Olšák" <maraeo@gmail.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	amd-gfx mailing list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 03/13] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers
Date: Thu, 13 Apr 2023 05:21:39 -0400	[thread overview]
Message-ID: <CAAxE2A5mf8J_1JJvgPgx-G07zcc3vcHOD6jWUXL8Mhx3g-Zufw@mail.gmail.com> (raw)
In-Reply-To: <2897fa79-f0ef-1ddb-dc38-05ef429fe0d9@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3338 bytes --]

That's not why it was removed. It was removed because userspace doesn't use
GDS memory and gds_va is always going to be 0.

Firmware shouldn't use it because using it would increase preemption
latency.

Marek

On Sun, Apr 9, 2023, 11:21 Christian König <ckoenig.leichtzumerken@gmail.com>
wrote:

> We removed the GDS information because they were unnecessary. The GDS size
> was already part of the device info before we added the shadow info.
>
> But as far as I know the firmware needs valid VAs for all three buffers or
> won't work correctly.
>
> Christian.
>
> Am 06.04.23 um 17:01 schrieb Marek Olšák:
>
> There is no GDS shadowing info in the device info uapi, so userspace can't
> create any GDS buffer and thus can't have any GDS va. It's a uapi issue,
> not what firmware wants to do.
>
> Marek
>
> On Thu, Apr 6, 2023 at 6:31 AM Christian König <
> ckoenig.leichtzumerken@gmail.com> wrote:
>
>> That's what I thought as well, but Mitch/Hans insisted on that.
>>
>> We should probably double check internally.
>>
>> Christian.
>>
>> Am 06.04.23 um 11:43 schrieb Marek Olšák:
>>
>> GDS memory isn't used on gfx11. Only GDS OA is used.
>>
>> Marek
>>
>> On Thu, Apr 6, 2023 at 5:09 AM Christian König <christian.koenig@amd.com>
>> wrote:
>>
>>> Why that?
>>>
>>> This is the save buffer for GDS, not the old style GDS BOs.
>>>
>>> Christian.
>>>
>>> Am 06.04.23 um 09:36 schrieb Marek Olšák:
>>>
>>> gds_va is unnecessary.
>>>
>>> Marek
>>>
>>> On Thu, Mar 30, 2023 at 3:18 PM Alex Deucher <alexander.deucher@amd.com>
>>> wrote:
>>>
>>>> For GFX11, the UMD needs to allocate some shadow buffers
>>>> to be used for preemption.  The UMD allocates the buffers
>>>> and passes the GPU virtual address to the kernel since the
>>>> kernel will program the packet that specified these
>>>> addresses as part of its IB submission frame.
>>>>
>>>> v2: UMD passes shadow init to tell kernel when to initialize
>>>>     the shadow
>>>>
>>>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>>> ---
>>>>  include/uapi/drm/amdgpu_drm.h | 10 ++++++++++
>>>>  1 file changed, 10 insertions(+)
>>>>
>>>> diff --git a/include/uapi/drm/amdgpu_drm.h
>>>> b/include/uapi/drm/amdgpu_drm.h
>>>> index b6eb90df5d05..3d9474af6566 100644
>>>> --- a/include/uapi/drm/amdgpu_drm.h
>>>> +++ b/include/uapi/drm/amdgpu_drm.h
>>>> @@ -592,6 +592,7 @@ struct drm_amdgpu_gem_va {
>>>>  #define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES 0x07
>>>>  #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT    0x08
>>>>  #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL  0x09
>>>> +#define AMDGPU_CHUNK_ID_CP_GFX_SHADOW   0x0a
>>>>
>>>>  struct drm_amdgpu_cs_chunk {
>>>>         __u32           chunk_id;
>>>> @@ -708,6 +709,15 @@ struct drm_amdgpu_cs_chunk_data {
>>>>         };
>>>>  };
>>>>
>>>> +#define AMDGPU_CS_CHUNK_CP_GFX_SHADOW_FLAGS_INIT_SHADOW         0x1
>>>> +
>>>> +struct drm_amdgpu_cs_chunk_cp_gfx_shadow {
>>>> +       __u64 shadow_va;
>>>> +       __u64 csa_va;
>>>> +       __u64 gds_va;
>>>> +       __u64 flags;
>>>> +};
>>>> +
>>>>  /*
>>>>   *  Query h/w info: Flag that this is integrated (a.h.a. fusion) GPU
>>>>   *
>>>> --
>>>> 2.39.2
>>>>
>>>>
>>>
>>
>

[-- Attachment #2: Type: text/html, Size: 8083 bytes --]

  reply	other threads:[~2023-04-13  9:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 19:17 [PATCH V4 00/13] Enable FW assisted shadowing for GFX11 Alex Deucher
2023-03-30 19:17 ` [PATCH 01/13] drm/amdgpu/gfx11: add FW version check for new CP GFX shadow feature Alex Deucher
2023-03-30 19:17 ` [PATCH 02/13] drm/amdgpu/gfx11: check the CP FW version CP GFX shadow support Alex Deucher
2023-03-31  6:34   ` Christian König
2023-03-31 19:18     ` Alex Deucher
2023-03-30 19:17 ` [PATCH 03/13] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers Alex Deucher
2023-04-06  7:36   ` Marek Olšák
2023-04-06  9:09     ` Christian König
2023-04-06  9:43       ` Marek Olšák
2023-04-06 10:31         ` Christian König
2023-04-06 15:01           ` Marek Olšák
2023-04-09 15:21             ` Christian König
2023-04-13  9:21               ` Marek Olšák [this message]
2023-04-13 11:32                 ` Christian König
2023-04-13 12:26                   ` Alex Deucher
2023-04-13 15:54                     ` Christian König
2023-04-13 16:56                       ` Alex Deucher
2023-04-13 18:23                         ` Marek Olšák
2023-04-13 18:58                           ` Christian König
2023-03-30 19:17 ` [PATCH 04/13] drm/amdgpu: add gfx shadow CS IOCTL support Alex Deucher
2023-03-31  6:33   ` Christian König
2023-03-30 19:17 ` [PATCH 05/13] drm/amdgpu: add gfx11 emit shadow callback Alex Deucher
2023-03-30 19:17 ` [PATCH 06/13] drm/amdgpu: don't require a job for cond_exec and shadow Alex Deucher
2023-03-30 19:17 ` [PATCH 07/13] drm/amdgpu: add UAPI to query GFX shadow sizes Alex Deucher
2023-03-30 19:17 ` [PATCH 08/13] drm/amdgpu: add gfx shadow callback Alex Deucher
2023-03-30 19:17 ` [PATCH 09/13] drm/amdgpu: add get_gfx_shadow_info callback for gfx11 Alex Deucher
2023-04-19 22:11   ` Alex Deucher
2023-03-30 19:17 ` [PATCH 10/13] drm/amdgpu: add support for new GFX shadow size query Alex Deucher
2023-04-19 22:12   ` Alex Deucher
2023-03-30 19:17 ` [PATCH 11/13] drm/amdgpu: bump driver version number for CP GFX shadow Alex Deucher
2023-04-19 22:12   ` Alex Deucher
2023-03-30 19:17 ` [PATCH 12/13] drm/amdgpu: track MQD size for gfx and compute Alex Deucher
2023-03-30 19:17 ` [PATCH 13/13] drm/amdgpu: add debugfs interface for reading MQDs Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2023-03-29 15:25 [PATCH V3 00/13] Enable FW assisted shadowing for GFX11 Alex Deucher
2023-03-29 15:25 ` [PATCH 03/13] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers Alex Deucher
2023-03-23 21:40 [PATCH V3 00/13] Enable FW assisted shadowing for GFX11 Alex Deucher
2023-03-23 21:40 ` [PATCH 03/13] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers Alex Deucher

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=CAAxE2A5mf8J_1JJvgPgx-G07zcc3vcHOD6jWUXL8Mhx3g-Zufw@mail.gmail.com \
    --to=maraeo@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@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.