diff options
author | Matthew Brost <matthew.brost@intel.com> | 2021-06-17 18:06:38 -0700 |
---|---|---|
committer | Matt Roper <matthew.d.roper@intel.com> | 2021-06-18 15:14:42 -0700 |
commit | 22916bad07a5d42dbb6797f4f0c87a0a5842ec6c (patch) | |
tree | 906b5f41f4c14ec5e0e10b29ae73e6150fcc3a87 /drivers/gpu/drm/i915/i915_scheduler.h | |
parent | d2a31d026492040f5401f667cd3201b16c656b00 (diff) | |
download | lwn-22916bad07a5d42dbb6797f4f0c87a0a5842ec6c.tar.gz lwn-22916bad07a5d42dbb6797f4f0c87a0a5842ec6c.zip |
drm/i915: Move submission tasklet to i915_sched_engine
The submission tasklet operates on i915_sched_engine, thus it is the
correct place for it.
v3:
(Jason Ekstrand)
Change sched_engine->engine to a void* private data pointer
Add kernel doc
v4:
(Daniele)
Update private_data comment
Set queue_priority_hint in kick_execlists
v5:
(CI)
Rebase and fix build error
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210618010638.98941-9-matthew.brost@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_scheduler.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_scheduler.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_scheduler.h b/drivers/gpu/drm/i915/i915_scheduler.h index 0014745bda30..650ab8e0db9f 100644 --- a/drivers/gpu/drm/i915/i915_scheduler.h +++ b/drivers/gpu/drm/i915/i915_scheduler.h @@ -79,6 +79,20 @@ i915_sched_engine_reset_on_empty(struct i915_sched_engine *sched_engine) sched_engine->no_priolist = false; } +static inline void +i915_sched_engine_active_lock_bh(struct i915_sched_engine *sched_engine) +{ + local_bh_disable(); /* prevent local softirq and lock recursion */ + tasklet_lock(&sched_engine->tasklet); +} + +static inline void +i915_sched_engine_active_unlock_bh(struct i915_sched_engine *sched_engine) +{ + tasklet_unlock(&sched_engine->tasklet); + local_bh_enable(); /* restore softirq, and kick ksoftirqd! */ +} + void i915_request_show_with_schedule(struct drm_printer *m, const struct i915_request *rq, const char *prefix, |