intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v3 10/11] drm/i915: Pass atomic state to verify_connector_state
Date: Tue,  8 Nov 2016 13:55:41 +0100	[thread overview]
Message-ID: <1478609742-13603-11-git-send-email-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <1478609742-13603-1-git-send-email-maarten.lankhorst@linux.intel.com>

This gets rid of a warning that the connectors are used without locking
when doing a nonblocking modeset.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index d368afa199e3..ee8b6db0b425 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13543,11 +13543,15 @@ static void verify_wm_state(struct drm_crtc *crtc,
 }
 
 static void
-verify_connector_state(struct drm_device *dev, struct drm_crtc *crtc)
+verify_connector_state(struct drm_device *dev,
+		       struct drm_atomic_state *state,
+		       struct drm_crtc *crtc)
 {
 	struct drm_connector *connector;
+	struct drm_connector_state *old_conn_state;
+	int i;
 
-	drm_for_each_connector(connector, dev) {
+	for_each_connector_in_state(state, connector, old_conn_state, i) {
 		struct drm_encoder *encoder = connector->encoder;
 		struct drm_connector_state *state = connector->state;
 
@@ -13755,15 +13759,16 @@ verify_shared_dpll_state(struct drm_device *dev, struct drm_crtc *crtc,
 
 static void
 intel_modeset_verify_crtc(struct drm_crtc *crtc,
-			 struct drm_crtc_state *old_state,
-			 struct drm_crtc_state *new_state)
+			  struct drm_atomic_state *state,
+			  struct drm_crtc_state *old_state,
+			  struct drm_crtc_state *new_state)
 {
 	if (!needs_modeset(new_state) &&
 	    !to_intel_crtc_state(new_state)->update_pipe)
 		return;
 
 	verify_wm_state(crtc, new_state);
-	verify_connector_state(crtc->dev, crtc);
+	verify_connector_state(crtc->dev, state, crtc);
 	verify_crtc_state(crtc, old_state, new_state);
 	verify_shared_dpll_state(crtc->dev, crtc, old_state, new_state);
 }
@@ -13779,10 +13784,11 @@ verify_disabled_dpll_state(struct drm_device *dev)
 }
 
 static void
-intel_modeset_verify_disabled(struct drm_device *dev)
+intel_modeset_verify_disabled(struct drm_device *dev,
+			      struct drm_atomic_state *state)
 {
 	verify_encoder_state(dev);
-	verify_connector_state(dev, NULL);
+	verify_connector_state(dev, state, NULL);
 	verify_disabled_dpll_state(dev);
 }
 
@@ -14420,7 +14426,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 		if (!intel_can_enable_sagv(state))
 			intel_disable_sagv(dev_priv);
 
-		intel_modeset_verify_disabled(dev);
+		intel_modeset_verify_disabled(dev, state);
 	}
 
 	/* Complete the events for pipes that have now been disabled */
@@ -14472,7 +14478,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 		if (put_domains[i])
 			modeset_put_power_domains(dev_priv, put_domains[i]);
 
-		intel_modeset_verify_crtc(crtc, old_crtc_state, crtc->state);
+		intel_modeset_verify_crtc(crtc, state, old_crtc_state, crtc->state);
 	}
 
 	if (intel_state->modeset && intel_can_enable_sagv(state))
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-11-08 12:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 12:55 [PATCH v3 00/11] Skylake watermark fixes and nonblocking modeset Maarten Lankhorst
2016-11-08 12:55 ` [PATCH v3 01/11] drm/i915: Add a atomic evasion step to watermark programming, v3 Maarten Lankhorst
2016-11-10  0:14   ` Matt Roper
2016-11-08 12:55 ` [PATCH v3 02/11] drm/i915/gen9+: Program watermarks as a separate step during evasion, v3 Maarten Lankhorst
2016-11-08 12:55 ` [PATCH v3 03/11] drm/i915/gen9+: Preserve old allocation from crtc_state Maarten Lankhorst
2016-11-10  0:16   ` Matt Roper
2016-11-08 12:55 ` [PATCH v3 04/11] drm/i915/gen9+: Kill off hw_ddb from intel_crtc Maarten Lankhorst
2016-11-10  0:52   ` Matt Roper
2016-11-10  6:59     ` Maarten Lankhorst
2016-11-10 23:08       ` Matt Roper
2016-11-08 12:55 ` [PATCH v3 05/11] drm/i915/gen9+: Do not initialise active_crtcs for !modeset Maarten Lankhorst
2016-11-08 14:11   ` Ville Syrjälä
2016-11-09 12:45     ` Maarten Lankhorst
2016-11-10 10:53       ` Ville Syrjälä
2016-11-10 14:32         ` Maarten Lankhorst
2016-11-08 12:55 ` [PATCH v3 06/11] drm/i915: Convert intel_hdmi to use atomic state Maarten Lankhorst
2016-11-08 12:55 ` [PATCH v3 07/11] drm/i915: Pass atomic state to intel_audio_codec_enable, v2 Maarten Lankhorst
2016-11-08 14:07   ` Ville Syrjälä
2016-11-08 12:55 ` [PATCH v3 08/11] drm/edid: Remove drm_select_eld Maarten Lankhorst
2016-11-08 12:55 ` [PATCH v3 09/11] drm/i915: Update atomic modeset state synchronously, v2 Maarten Lankhorst
2016-11-08 14:08   ` Ville Syrjälä
2016-11-08 12:55 ` Maarten Lankhorst [this message]
2016-11-08 12:55 ` [PATCH v3 11/11] drm/i915: Enable support for nonblocking modeset Maarten Lankhorst
2016-11-08 13:45 ` ✓ Fi.CI.BAT: success for Skylake watermark fixes and " 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=1478609742-13603-11-git-send-email-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).