[PATCH 03/13] drm/amdgpu/UAPI: add new CS chunk for GFX shadow buffers
Christian König
ckoenig.leichtzumerken at gmail.com
Thu Apr 6 10:31:18 UTC 2023
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 at 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 at 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 at amd.com>
>> Signed-off-by: Alex Deucher <alexander.deucher at 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
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20230406/7e720324/attachment-0001.htm>
More information about the amd-gfx
mailing list