[Intel-gfx] [PATCH 27/27] drm/i915/scheduler: Support user-defined priorities
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Wed Apr 19 11:07:18 UTC 2017
On 19/04/2017 11:09, Chris Wilson wrote:
> On Wed, Apr 19, 2017 at 10:41:43AM +0100, Chris Wilson wrote:
>> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
>> index f43a22ae955b..200f2cf393b2 100644
>> --- a/include/uapi/drm/i915_drm.h
>> +++ b/include/uapi/drm/i915_drm.h
>> @@ -395,6 +395,8 @@ typedef struct drm_i915_irq_wait {
>>
>> /* Query whether DRM_I915_GEM_EXECBUFFER2 supports user defined execution
>> * priorities and the driver will attempt to execute batches in priority order.
>> + * The initial priority for each batch is supplied by the context and is
>> + * controlled via I915_CONTEXT_PARAM_PRIORITY.
>> */
>> #define I915_PARAM_HAS_SCHEDULER 41
>> #define I915_PARAM_HUC_STATUS 42
>> @@ -1318,6 +1320,7 @@ struct drm_i915_gem_context_param {
>> #define I915_CONTEXT_PARAM_GTT_SIZE 0x3
>> #define I915_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4
>> #define I915_CONTEXT_PARAM_BANNABLE 0x5
>> +#define I915_CONTEXT_PARAM_PRIORITY 0x6
>
> Grr. Forgot to add min/max defines.
>
> #define I915_CONTEXT_MAX_USER_PRIORITY 1023 /* inclusive */
> #define I915_CONTEXT_DEFAULT_PRIORITY 0
> #define I915_CONTEXT_MIN_USER_PRIORITY -1023 /* inclusive */
Yes, and use these in context get param, including the default instead
of the zero I think.
> Or should it be I915_CONTEXT_PRIORITY_MAX_USER etc?
Priority last somehow looks better to me since like that it is clearly a
separate category from param names. But I don't mind either way.
Regards,
Tvrtko
More information about the Intel-gfx
mailing list