mirror of
https://github.com/torvalds/linux.git
synced 2026-04-23 00:55:48 -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:
@@ -411,7 +411,7 @@ static void error_print_request(struct drm_i915_error_state_buf *m,
|
||||
|
||||
err_printf(m, "%s pid %d, ban score %d, seqno %8x:%08x, prio %d, emitted %dms ago, head %08x, tail %08x\n",
|
||||
prefix, erq->pid, erq->ban_score,
|
||||
erq->context, erq->seqno, erq->priority,
|
||||
erq->context, erq->seqno, erq->sched_attr.priority,
|
||||
jiffies_to_msecs(jiffies - erq->jiffies),
|
||||
erq->head, erq->tail);
|
||||
}
|
||||
@@ -422,7 +422,7 @@ static void error_print_context(struct drm_i915_error_state_buf *m,
|
||||
{
|
||||
err_printf(m, "%s%s[%d] user_handle %d hw_id %d, prio %d, ban score %d%s guilty %d active %d\n",
|
||||
header, ctx->comm, ctx->pid, ctx->handle, ctx->hw_id,
|
||||
ctx->priority, ctx->ban_score, bannable(ctx),
|
||||
ctx->sched_attr.priority, ctx->ban_score, bannable(ctx),
|
||||
ctx->guilty, ctx->active);
|
||||
}
|
||||
|
||||
@@ -1278,7 +1278,7 @@ static void record_request(struct i915_request *request,
|
||||
struct drm_i915_error_request *erq)
|
||||
{
|
||||
erq->context = request->ctx->hw_id;
|
||||
erq->priority = request->sched.priority;
|
||||
erq->sched_attr = request->sched.attr;
|
||||
erq->ban_score = atomic_read(&request->ctx->ban_score);
|
||||
erq->seqno = request->global_seqno;
|
||||
erq->jiffies = request->emitted_jiffies;
|
||||
@@ -1372,7 +1372,7 @@ static void record_context(struct drm_i915_error_context *e,
|
||||
|
||||
e->handle = ctx->user_handle;
|
||||
e->hw_id = ctx->hw_id;
|
||||
e->priority = ctx->priority;
|
||||
e->sched_attr = ctx->sched;
|
||||
e->ban_score = atomic_read(&ctx->ban_score);
|
||||
e->bannable = i915_gem_context_is_bannable(ctx);
|
||||
e->guilty = atomic_read(&ctx->guilty_count);
|
||||
|
||||
Reference in New Issue
Block a user