diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-18 14:40:52 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-04-18 16:09:11 -0400 |
commit | b7268c5eed0ab4f052d614b4b0e3fe8a51c9d5a1 (patch) | |
tree | d0ba72c9162cd589dca7f5af88af419c70f566a6 /drivers/gpu/drm/i915/i915_request.c | |
parent | 0c7112a00272c633a79cad91ea9c1a0f40330f5d (diff) |
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
Diffstat (limited to 'drivers/gpu/drm/i915/i915_request.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_request.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index dfcc6a0df3fb..b692a9f7c357 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c | |||
@@ -193,7 +193,7 @@ i915_sched_node_init(struct i915_sched_node *node) | |||
193 | INIT_LIST_HEAD(&node->signalers_list); | 193 | INIT_LIST_HEAD(&node->signalers_list); |
194 | INIT_LIST_HEAD(&node->waiters_list); | 194 | INIT_LIST_HEAD(&node->waiters_list); |
195 | INIT_LIST_HEAD(&node->link); | 195 | INIT_LIST_HEAD(&node->link); |
196 | node->priority = I915_PRIORITY_INVALID; | 196 | node->attr.priority = I915_PRIORITY_INVALID; |
197 | } | 197 | } |
198 | 198 | ||
199 | static int reset_all_global_seqno(struct drm_i915_private *i915, u32 seqno) | 199 | static int reset_all_global_seqno(struct drm_i915_private *i915, u32 seqno) |
@@ -1064,7 +1064,7 @@ void __i915_request_add(struct i915_request *request, bool flush_caches) | |||
1064 | */ | 1064 | */ |
1065 | rcu_read_lock(); | 1065 | rcu_read_lock(); |
1066 | if (engine->schedule) | 1066 | if (engine->schedule) |
1067 | engine->schedule(request, request->ctx->priority); | 1067 | engine->schedule(request, &request->ctx->sched); |
1068 | rcu_read_unlock(); | 1068 | rcu_read_unlock(); |
1069 | 1069 | ||
1070 | local_bh_disable(); | 1070 | local_bh_disable(); |