mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
drm/i915: Intruduce display.wq.cleanup
Introduce a dedicated workqueue for the commit cleanup work. In the future we'll need this to guarantee all the cleanup works have finished at a specific point during suspend. Cc: Brian Geffon <bgeffon@google.com> Cc: Vidya Srinivas <vidya.srinivas@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241127061117.25622-3-ville.syrjala@linux.intel.com Reviewed-by: Vidya Srinivas <vidya.srinivas@intel.com> Tested-by: Vidya Srinivas <vidya.srinivas@intel.com>
This commit is contained in:
parent
0768530b7c
commit
37ab41e11f
|
|
@ -7937,7 +7937,7 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
|
|||
* down.
|
||||
*/
|
||||
INIT_WORK(&state->cleanup_work, intel_atomic_cleanup_work);
|
||||
queue_work(system_highpri_wq, &state->cleanup_work);
|
||||
queue_work(dev_priv->display.wq.cleanup, &state->cleanup_work);
|
||||
}
|
||||
|
||||
static void intel_atomic_commit_work(struct work_struct *work)
|
||||
|
|
|
|||
|
|
@ -554,6 +554,9 @@ struct intel_display {
|
|||
|
||||
/* unbound hipri wq for page flips/plane updates */
|
||||
struct workqueue_struct *flip;
|
||||
|
||||
/* hipri wq for commit cleanups */
|
||||
struct workqueue_struct *cleanup;
|
||||
} wq;
|
||||
|
||||
/* Grouping using named structs. Keep sorted. */
|
||||
|
|
|
|||
|
|
@ -242,6 +242,7 @@ int intel_display_driver_probe_noirq(struct drm_i915_private *i915)
|
|||
i915->display.wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
|
||||
i915->display.wq.flip = alloc_workqueue("i915_flip", WQ_HIGHPRI |
|
||||
WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE);
|
||||
i915->display.wq.cleanup = alloc_workqueue("i915_cleanup", WQ_HIGHPRI, 0);
|
||||
|
||||
intel_mode_config_init(i915);
|
||||
|
||||
|
|
@ -571,6 +572,7 @@ void intel_display_driver_remove(struct drm_i915_private *i915)
|
|||
|
||||
flush_workqueue(i915->display.wq.flip);
|
||||
flush_workqueue(i915->display.wq.modeset);
|
||||
flush_workqueue(i915->display.wq.cleanup);
|
||||
|
||||
/*
|
||||
* MST topology needs to be suspended so we don't have any calls to
|
||||
|
|
@ -613,6 +615,7 @@ void intel_display_driver_remove_noirq(struct drm_i915_private *i915)
|
|||
|
||||
destroy_workqueue(i915->display.wq.flip);
|
||||
destroy_workqueue(i915->display.wq.modeset);
|
||||
destroy_workqueue(i915->display.wq.cleanup);
|
||||
|
||||
intel_fbc_cleanup(&i915->display);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user