[PATCH 2/4] drm/i915: Intruduce display.wq.cleanup
Srinivas, Vidya
vidya.srinivas at intel.com
Thu Nov 28 07:43:56 UTC 2024
Hello Ville,
Thank you so much. Changes Look Good to me.
Reviewed-by: Vidya Srinivas <vidya.srinivas at intel.com>
> -----Original Message-----
> From: Ville Syrjala <ville.syrjala at linux.intel.com>
> Sent: 27 November 2024 11:41
> To: intel-gfx at lists.freedesktop.org
> Cc: Brian Geffon <bgeffon at google.com>; Srinivas, Vidya
> <vidya.srinivas at intel.com>
> Subject: [PATCH 2/4] drm/i915: Intruduce display.wq.cleanup
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> 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 at google.com>
> Cc: Vidya Srinivas <vidya.srinivas at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display.c | 2 +-
> drivers/gpu/drm/i915/display/intel_display_core.h | 3 +++
> drivers/gpu/drm/i915/display/intel_display_driver.c | 3 +++
> 3 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 5260f6eafaf8..4805bf682d43 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -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) diff --git
> a/drivers/gpu/drm/i915/display/intel_display_core.h
> b/drivers/gpu/drm/i915/display/intel_display_core.h
> index 62b0597aa91e..554870d2494b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_core.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_core.h
> @@ -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. */ diff --git
> a/drivers/gpu/drm/i915/display/intel_display_driver.c
> b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 2a6301b8674a..286d6f893afa 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -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);
> }
> --
> 2.45.2
More information about the Intel-gfx
mailing list