mirror of
https://github.com/torvalds/linux.git
synced 2026-04-19 15:24:02 -04:00
drm/i915: Pack params to engine->schedule() into a struct
Today we only want to pass along the priority to engine->schedule(), but in the future we want to have much more control over the various aspects of the GPU during a context's execution, for example controlling the frequency allowed. As we need an ever growing number of parameters for scheduling, move those into a struct for convenience. v2: Move the anonymous struct into its own function for legibility and ye olde gcc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180418184052.7129-3-chris@chris-wilson.co.uk
This commit is contained in:
@@ -19,6 +19,21 @@ enum {
|
||||
I915_PRIORITY_INVALID = INT_MIN
|
||||
};
|
||||
|
||||
struct i915_sched_attr {
|
||||
/**
|
||||
* @priority: execution and service priority
|
||||
*
|
||||
* All clients are equal, but some are more equal than others!
|
||||
*
|
||||
* Requests from a context with a greater (more positive) value of
|
||||
* @priority will be executed before those with a lower @priority
|
||||
* value, forming a simple QoS.
|
||||
*
|
||||
* The &drm_i915_private.kernel_context is assigned the lowest priority.
|
||||
*/
|
||||
int priority;
|
||||
};
|
||||
|
||||
/*
|
||||
* "People assume that time is a strict progression of cause to effect, but
|
||||
* actually, from a nonlinear, non-subjective viewpoint, it's more like a big
|
||||
@@ -42,7 +57,7 @@ struct i915_sched_node {
|
||||
struct list_head signalers_list; /* those before us, we depend upon */
|
||||
struct list_head waiters_list; /* those after us, they depend upon us */
|
||||
struct list_head link;
|
||||
int priority;
|
||||
struct i915_sched_attr attr;
|
||||
};
|
||||
|
||||
struct i915_dependency {
|
||||
|
||||
Reference in New Issue
Block a user