[PATCH 01/13] drm/amdgpu: add UAPI for allocating doorbell memory

Shashank Sharma shashank.sharma at amd.com
Mon Feb 6 15:31:15 UTC 2023


Hey Christian,

On 06/02/2023 12:19, Christian König wrote:
> Am 03.02.23 um 20:08 schrieb Shashank Sharma:
>> From: Alex Deucher <alexander.deucher at amd.com>
>>
>> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
>> ---
>>   include/uapi/drm/amdgpu_drm.h | 7 ++++++-
>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/uapi/drm/amdgpu_drm.h 
>> b/include/uapi/drm/amdgpu_drm.h
>> index 4038abe8505a..fd1c65d78ded 100644
>> --- a/include/uapi/drm/amdgpu_drm.h
>> +++ b/include/uapi/drm/amdgpu_drm.h
>> @@ -94,6 +94,9 @@ extern "C" {
>>    *
>>    * %AMDGPU_GEM_DOMAIN_OA    Ordered append, used by 3D or Compute 
>> engines
>>    * for appending data.
>> + *
>> + * %AMDGPU_GEM_DOMAIN_DOORBELL    Doorbell memory. It is an MMIO 
>> region for
>> + * signalling user mode queues.
>
> Drop "memory" from the sentence. The key point of doorbells is that 
> they are *not* memory :)
>
> Apart from that looks good to me,
> Christian.


Noted.

- Shashank

>
>>    */
>>   #define AMDGPU_GEM_DOMAIN_CPU        0x1
>>   #define AMDGPU_GEM_DOMAIN_GTT        0x2
>> @@ -101,12 +104,14 @@ extern "C" {
>>   #define AMDGPU_GEM_DOMAIN_GDS        0x8
>>   #define AMDGPU_GEM_DOMAIN_GWS        0x10
>>   #define AMDGPU_GEM_DOMAIN_OA        0x20
>> +#define AMDGPU_GEM_DOMAIN_DOORBELL    0x40
>>   #define AMDGPU_GEM_DOMAIN_MASK        (AMDGPU_GEM_DOMAIN_CPU | \
>>                        AMDGPU_GEM_DOMAIN_GTT | \
>>                        AMDGPU_GEM_DOMAIN_VRAM | \
>>                        AMDGPU_GEM_DOMAIN_GDS | \
>>                        AMDGPU_GEM_DOMAIN_GWS | \
>> -                     AMDGPU_GEM_DOMAIN_OA)
>> +                     AMDGPU_GEM_DOMAIN_OA | \
>> +                     AMDGPU_GEM_DOMAIN_DOORBELL)
>>     /* Flag that CPU access will be required for the case of VRAM 
>> domain */
>>   #define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED    (1 << 0)
>


More information about the amd-gfx mailing list