[PATCH 2/3] headers: add new context priority parameter to amdgpu_drm.h

Andres Rodriguez andresx7 at gmail.com
Mon Jan 9 17:04:29 UTC 2017



On 2017-01-09 11:28 AM, Emil Velikov wrote:
> On 5 January 2017 at 00:29, Andres Rodriguez <andresx7 at gmail.com> wrote:
>> This patch is for reference only, as the corresponding kernel change is
>> still under review.
>>
> Obviously one would sync this in a similar fashion to 1/3 but as-is
> this is pretty good.
>
>> Signed-off-by: Andres Rodriguez <andresx7 at gmail.com>
>> ---
>>   include/drm/amdgpu_drm.h | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h
>> index 3961836..2d331ee 100644
>> --- a/include/drm/amdgpu_drm.h
>> +++ b/include/drm/amdgpu_drm.h
>> @@ -160,13 +160,17 @@ union drm_amdgpu_bo_list {
>>   /* unknown cause */
>>   #define AMDGPU_CTX_UNKNOWN_RESET       3
>>
>> +/* Context priority level */
>> +#define AMDGPU_CTX_PRIORITY_NORMAL     0
>> +#define AMDGPU_CTX_PRIORITY_HIGH       1
>> +
> Thanks for this correction.
>
>>   struct drm_amdgpu_ctx_in {
>>          /** AMDGPU_CTX_OP_* */
>>          __u32   op;
>>          /** For future use, no flags defined so far */
>>          __u32   flags;
>>          __u32   ctx_id;
>> -       __u32   _pad;
>> +       __u32   priority;
> Please don't forget the "check if this doesn't explode on {old,new}
> {kernel,userspace} combos" from earlier.
> If you haven't already, you might want to mention why its safe in the
> commit message of the kernel patch.
I'll make sure to put in the details when I resend the patch. Thankfully
libdrm-amdgpu is pretty sane and always memsets all the ioctl structs
before passing them to the kernel.

Thanks,
Andres

>
> -Emil



More information about the amd-gfx mailing list