Message ID | 20220405145345.3284084-4-tvrtko.ursulin@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Inherit GPU scheduling priority from process nice | expand |
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c index 960bfd517ff7..a777f14e4b87 100644 --- a/drivers/gpu/drm/i915/i915_request.c +++ b/drivers/gpu/drm/i915/i915_request.c @@ -1811,8 +1811,11 @@ void i915_request_add(struct i915_request *rq) /* XXX placeholder for selftests */ rcu_read_lock(); ctx = rcu_dereference(rq->context->gem_context); - if (ctx) + if (ctx) { attr = ctx->sched; + if (attr.priority == I915_CONTEXT_DEFAULT_PRIORITY) + attr.nice = task_nice(current); + } rcu_read_unlock(); __i915_request_queue(rq, &attr);