[PATCH 8/9 v2] drm/i915: Remove unused struct_mutex from drm_i915_private

Rodrigo Vivi rodrigo.vivi at intel.com
Fri Aug 8 14:40:34 UTC 2025


On Thu, Aug 07, 2025 at 02:02:07PM -0300, Luiz Otavio Mello wrote:
> The struct_mutex field in drm_i915_private is no longer used anywhere in
> the driver. This patch removes it completely to clean up unused code and
> avoid confusion.
> 
> Signed-off-by: Luiz Otavio Mello <luiz.mello at estudante.ufscar.br>
> ---
>  drivers/gpu/drm/i915/i915_driver.c | 2 --
>  drivers/gpu/drm/i915/i915_drv.h    | 8 --------
>  2 files changed, 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index d1559fd8ad3d..c6263c6d3384 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -233,7 +233,6 @@ static int i915_driver_early_probe(struct drm_i915_private *dev_priv)
>  
>  	intel_sbi_init(display);
>  	vlv_iosf_sb_init(dev_priv);
> -	mutex_init(&dev_priv->struct_mutex);
>  	mutex_init(&dev_priv->sb_lock);
>  
>  	i915_memcpy_init_early(dev_priv);
> @@ -292,7 +291,6 @@ static void i915_driver_late_release(struct drm_i915_private *dev_priv)
>  	i915_workqueues_cleanup(dev_priv);
>  
>  	mutex_destroy(&dev_priv->sb_lock);
> -	mutex_destroy(&dev_priv->struct_mutex);
>  	vlv_iosf_sb_fini(dev_priv);
>  	intel_sbi_fini(display);
>  
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index e8cb94962482..5a8ac1a52849 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -221,14 +221,6 @@ struct drm_i915_private {
>  
>  	bool irqs_enabled;
>  
> -	/*
> -	 * Currently, struct_mutex is only used by the i915 driver as a replacement
> -	 * for BKL. 
> -	 * 
> -	 * For this reason, it is no longer part of struct drm_device.
> -	*/

This will need to be rebased like I did in my resubmission for CI once the
other patch removes this trailing spaces and fix the alignement. But with that
change, this patch is:

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> -	struct mutex struct_mutex;
> -
>  	/* LPT/WPT IOSF sideband protection */
>  	struct mutex sbi_lock;
>  
> -- 
> 2.50.1
> 


More information about the dri-devel mailing list