Commit b202ab61 authored by Jani Nikula's avatar Jani Nikula

drm/i915: move and group modeset_wq and flip_wq under display.wq

Move display workqueue related members under drm_i915_private display
sub-struct.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f34f7fb45510e880ce0cc16cb2fbba72fbe94a1d.1661779055.git.jani.nikula@intel.com
parent b7d15590
...@@ -7812,12 +7812,12 @@ static int intel_atomic_commit(struct drm_device *dev, ...@@ -7812,12 +7812,12 @@ static int intel_atomic_commit(struct drm_device *dev,
i915_sw_fence_commit(&state->commit_ready); i915_sw_fence_commit(&state->commit_ready);
if (nonblock && state->modeset) { if (nonblock && state->modeset) {
queue_work(dev_priv->modeset_wq, &state->base.commit_work); queue_work(dev_priv->display.wq.modeset, &state->base.commit_work);
} else if (nonblock) { } else if (nonblock) {
queue_work(dev_priv->flip_wq, &state->base.commit_work); queue_work(dev_priv->display.wq.flip, &state->base.commit_work);
} else { } else {
if (state->modeset) if (state->modeset)
flush_workqueue(dev_priv->modeset_wq); flush_workqueue(dev_priv->display.wq.modeset);
intel_atomic_commit_tail(state); intel_atomic_commit_tail(state);
} }
...@@ -8681,9 +8681,9 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915) ...@@ -8681,9 +8681,9 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
intel_dmc_ucode_init(i915); intel_dmc_ucode_init(i915);
i915->modeset_wq = alloc_ordered_workqueue("i915_modeset", 0); i915->display.wq.modeset = alloc_ordered_workqueue("i915_modeset", 0);
i915->flip_wq = alloc_workqueue("i915_flip", WQ_HIGHPRI | i915->display.wq.flip = alloc_workqueue("i915_flip", WQ_HIGHPRI |
WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE); WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE);
intel_mode_config_init(i915); intel_mode_config_init(i915);
...@@ -8990,8 +8990,8 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915) ...@@ -8990,8 +8990,8 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915)
if (!HAS_DISPLAY(i915)) if (!HAS_DISPLAY(i915))
return; return;
flush_workqueue(i915->flip_wq); flush_workqueue(i915->display.wq.flip);
flush_workqueue(i915->modeset_wq); flush_workqueue(i915->display.wq.modeset);
flush_work(&i915->atomic_helper.free_work); flush_work(&i915->atomic_helper.free_work);
drm_WARN_ON(&i915->drm, !llist_empty(&i915->atomic_helper.free_list)); drm_WARN_ON(&i915->drm, !llist_empty(&i915->atomic_helper.free_list));
...@@ -9032,8 +9032,8 @@ void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915) ...@@ -9032,8 +9032,8 @@ void intel_modeset_driver_remove_noirq(struct drm_i915_private *i915)
intel_gmbus_teardown(i915); intel_gmbus_teardown(i915);
destroy_workqueue(i915->flip_wq); destroy_workqueue(i915->display.wq.flip);
destroy_workqueue(i915->modeset_wq); destroy_workqueue(i915->display.wq.modeset);
intel_fbc_cleanup(i915); intel_fbc_cleanup(i915);
} }
......
...@@ -376,6 +376,14 @@ struct intel_display { ...@@ -376,6 +376,14 @@ struct intel_display {
u32 block_time_us; u32 block_time_us;
} sagv; } sagv;
struct {
/* ordered wq for modesets */
struct workqueue_struct *modeset;
/* unbound hipri wq for page flips/plane updates */
struct workqueue_struct *flip;
} wq;
/* Grouping using named structs. Keep sorted. */ /* Grouping using named structs. Keep sorted. */
struct intel_audio audio; struct intel_audio audio;
struct intel_dmc dmc; struct intel_dmc dmc;
......
...@@ -290,11 +290,6 @@ struct drm_i915_private { ...@@ -290,11 +290,6 @@ struct drm_i915_private {
*/ */
struct workqueue_struct *wq; struct workqueue_struct *wq;
/* ordered wq for modesets */
struct workqueue_struct *modeset_wq;
/* unbound hipri wq for page flips/plane updates */
struct workqueue_struct *flip_wq;
/* pm private clock gating functions */ /* pm private clock gating functions */
const struct drm_i915_clock_gating_funcs *clock_gating_funcs; const struct drm_i915_clock_gating_funcs *clock_gating_funcs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment