diff options
author | Jani Nikula <jani.nikula@intel.com> | 2022-08-29 16:18:20 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2022-08-31 17:21:38 +0300 |
commit | b202ab6173af66a78c95a6acaca26f74d0c8a464 (patch) | |
tree | 3ec73b9084d3ad6ae33c890dfabaefd3226c87c9 | |
parent | b7d1559038b6c949b5a4eec77db77f3a78edddc9 (diff) | |
download | linux-b202ab6173af66a78c95a6acaca26f74d0c8a464.tar.gz linux-b202ab6173af66a78c95a6acaca26f74d0c8a464.tar.bz2 linux-b202ab6173af66a78c95a6acaca26f74d0c8a464.zip |
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: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f34f7fb45510e880ce0cc16cb2fbba72fbe94a1d.1661779055.git.jani.nikula@intel.com
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display.c | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_core.h | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 5 |
3 files changed, 18 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 0eac552551fa..cb1e7f816fdd 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -7812,12 +7812,12 @@ static int intel_atomic_commit(struct drm_device *dev, i915_sw_fence_commit(&state->commit_ready); 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) { - queue_work(dev_priv->flip_wq, &state->base.commit_work); + queue_work(dev_priv->display.wq.flip, &state->base.commit_work); } else { if (state->modeset) - flush_workqueue(dev_priv->modeset_wq); + flush_workqueue(dev_priv->display.wq.modeset); intel_atomic_commit_tail(state); } @@ -8681,9 +8681,9 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915) intel_dmc_ucode_init(i915); - i915->modeset_wq = alloc_ordered_workqueue("i915_modeset", 0); - i915->flip_wq = alloc_workqueue("i915_flip", WQ_HIGHPRI | - WQ_UNBOUND, WQ_UNBOUND_MAX_ACTIVE); + 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); intel_mode_config_init(i915); @@ -8990,8 +8990,8 @@ void intel_modeset_driver_remove(struct drm_i915_private *i915) if (!HAS_DISPLAY(i915)) return; - flush_workqueue(i915->flip_wq); - flush_workqueue(i915->modeset_wq); + flush_workqueue(i915->display.wq.flip); + flush_workqueue(i915->display.wq.modeset); flush_work(&i915->atomic_helper.free_work); 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) intel_gmbus_teardown(i915); - destroy_workqueue(i915->flip_wq); - destroy_workqueue(i915->modeset_wq); + destroy_workqueue(i915->display.wq.flip); + destroy_workqueue(i915->display.wq.modeset); intel_fbc_cleanup(i915); } diff --git a/drivers/gpu/drm/i915/display/intel_display_core.h b/drivers/gpu/drm/i915/display/intel_display_core.h index b061deb21df1..31fd05a04bff 100644 --- a/drivers/gpu/drm/i915/display/intel_display_core.h +++ b/drivers/gpu/drm/i915/display/intel_display_core.h @@ -376,6 +376,14 @@ struct intel_display { u32 block_time_us; } 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. */ struct intel_audio audio; struct intel_dmc dmc; diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 1a494933dd92..5aac06da3cc7 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -290,11 +290,6 @@ struct drm_i915_private { */ 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 */ const struct drm_i915_clock_gating_funcs *clock_gating_funcs; |