[Intel-gfx] [PATCH 3/8] drm/i915/sdvo: Grab mode_config.mutex during LVDS init to avoid WARNs

Jani Nikula jani.nikula at linux.intel.com
Thu Oct 27 14:37:08 UTC 2022


On Wed, 26 Oct 2022, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> drm_mode_probed_add() is unhappy about being called w/o
> mode_config.mutex. Grab it during LVDS fixed mode setup
> to silence the WARNs.
>
> Cc: stable at vger.kernel.org
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7301
> Fixes: aa2b88074a56 ("drm/i915/sdvo: Fix multi function encoder stuff")
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_sdvo.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
> index ccf81d616cb4..1eaaa7ec580e 100644
> --- a/drivers/gpu/drm/i915/display/intel_sdvo.c
> +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
> @@ -2899,8 +2899,12 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
>  	intel_panel_add_vbt_sdvo_fixed_mode(intel_connector);
>  
>  	if (!intel_panel_preferred_fixed_mode(intel_connector)) {
> +		mutex_lock(&i915->drm.mode_config.mutex);
> +
>  		intel_ddc_get_modes(connector, &intel_sdvo->ddc);
>  		intel_panel_add_edid_fixed_modes(intel_connector, false);
> +
> +		mutex_unlock(&i915->drm.mode_config.mutex);
>  	}
>  
>  	intel_panel_init(intel_connector);

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list