[Intel-gfx] [PATCH v6 2/3] drm/i915: add a dedicated workqueue inside drm_i915_private

Tetsuo Handa penguin-kernel at I-love.SAKURA.ne.jp
Thu Jun 8 14:17:28 UTC 2023


On 2023/06/08 22:35, Jani Nikula wrote:
> From: Luca Coelho <luciano.coelho at intel.com>
> 
> In order to avoid flush_scheduled_work() usage, add a dedicated
> workqueue in the drm_i915_private structure.  In this way, we don't
> need to use the system queue anymore.
> 
> This change is mostly mechanical and based on Tetsuo's original
> patch[1].
> 
> v6 by Jani:
> - Also create unordered_wq for mock device
> 
> Link: https://patchwork.freedesktop.org/series/114608/ [1]
> Cc: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> Cc: Jani Nikula <jani.nikula at intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>

Ah, I responded to [PATCH v6 3/3] before finding [PATCH v6 2/3] .
OK, you managed to sort out which work items need to be handled by
per device workqueue. Then, my patch will no longer be needed.


> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index dc8de861339d..b909814ae02b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -442,7 +442,7 @@ void intel_display_driver_remove_noirq(struct drm_i915_private *i915)
>  	intel_unregister_dsm_handler();
>  
>  	/* flush any delayed tasks or pending work */
> -	flush_scheduled_work();
> +	flush_workqueue(i915->unordered_wq);
>  
>  	intel_hdcp_component_fini(i915);



More information about the Intel-gfx mailing list