All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: [PATCH 3/8] drm/i915/sdvo: Grab mode_config.mutex during LVDS init to avoid WARNs
Date: Wed, 26 Oct 2022 13:11:29 +0300	[thread overview]
Message-ID: <20221026101134.20865-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20221026101134.20865-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@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@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@linux.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);
-- 
2.37.4


WARNING: multiple messages have this Message-ID (diff)
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: [Intel-gfx] [PATCH 3/8] drm/i915/sdvo: Grab mode_config.mutex during LVDS init to avoid WARNs
Date: Wed, 26 Oct 2022 13:11:29 +0300	[thread overview]
Message-ID: <20221026101134.20865-4-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20221026101134.20865-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@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@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@linux.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);
-- 
2.37.4


  parent reply	other threads:[~2022-10-26 10:11 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 10:11 [Intel-gfx] [PATCH 0/8] drm/i915/sdvo: Fix LVDS fixed mode setup and clean up output setup Ville Syrjala
2022-10-26 10:11 ` [PATCH 1/8] drm/i915/sdvo: Filter out invalid outputs more sensibly Ville Syrjala
2022-10-26 10:11   ` [Intel-gfx] " Ville Syrjala
2022-10-27 14:32   ` Jani Nikula
2022-10-26 10:11 ` [PATCH 2/8] drm/i915/sdvo: Setup DDC fully before output init Ville Syrjala
2022-10-26 10:11   ` [Intel-gfx] " Ville Syrjala
2022-10-27 14:36   ` Jani Nikula
2022-10-27 14:49     ` Ville Syrjälä
2022-10-27 14:54       ` Ville Syrjälä
2022-10-27 17:33         ` Jani Nikula
2022-10-26 10:11 ` Ville Syrjala [this message]
2022-10-26 10:11   ` [Intel-gfx] [PATCH 3/8] drm/i915/sdvo: Grab mode_config.mutex during LVDS init to avoid WARNs Ville Syrjala
2022-10-27 14:37   ` Jani Nikula
2022-10-26 10:11 ` [Intel-gfx] [PATCH 4/8] drm/i915/sdvo: Simplify output setup debugs Ville Syrjala
2022-10-27 14:38   ` Jani Nikula
2022-10-26 10:11 ` [Intel-gfx] [PATCH 5/8] drm/i915/sdvo: Don't add DDC modes for LVDS Ville Syrjala
2022-10-27 14:42   ` Jani Nikula
2022-10-26 10:11 ` [Intel-gfx] [PATCH 6/8] drm/i915/sdvo: Get rid of the output type<->device index stuff Ville Syrjala
2022-10-27 14:42   ` Jani Nikula
2022-10-26 10:11 ` [Intel-gfx] [PATCH 7/8] drm/i915/sdvo: Reduce copy-pasta in output setup Ville Syrjala
2022-10-27 14:45   ` Jani Nikula
2022-10-26 10:11 ` [Intel-gfx] [PATCH 8/8] drm/i915/sdvo: Fix debug print Ville Syrjala
2022-10-27 14:48   ` Jani Nikula
2022-10-26 11:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/sdvo: Fix LVDS fixed mode setup and clean up output setup Patchwork
2022-10-26 21:40 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221026101134.20865-4-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.