public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 4/6] drm/i915: Use intel_crtc_state in sanitize_watermarks() too
Date: Fri, 28 Jun 2019 10:55:15 +0200	[thread overview]
Message-ID: <20190628085517.31886-5-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20190628085517.31886-1-maarten.lankhorst@linux.intel.com>

Get rid of all instances of drm_crtc_state, and rename cstate to
crtc_state for more clarity.

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 6be2fd714e37..4ea63026d9c4 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -15812,8 +15812,8 @@ static void sanitize_watermarks(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct drm_atomic_state *state;
 	struct intel_atomic_state *intel_state;
-	struct drm_crtc *crtc;
-	struct drm_crtc_state *cstate;
+	struct intel_crtc *crtc;
+	struct intel_crtc_state *crtc_state;
 	struct drm_modeset_acquire_ctx ctx;
 	int ret;
 	int i;
@@ -15868,13 +15868,11 @@ static void sanitize_watermarks(struct drm_device *dev)
 	}
 
 	/* Write calculated watermark values back */
-	for_each_new_crtc_in_state(state, crtc, cstate, i) {
-		struct intel_crtc_state *cs = to_intel_crtc_state(cstate);
-
-		cs->wm.need_postvbl_update = true;
-		dev_priv->display.optimize_watermarks(intel_state, cs);
+	for_each_new_intel_crtc_in_state(intel_state, crtc, crtc_state, i) {
+		crtc_state->wm.need_postvbl_update = true;
+		dev_priv->display.optimize_watermarks(intel_state, crtc_state);
 
-		to_intel_crtc_state(crtc->state)->wm = cs->wm;
+		to_intel_crtc_state(crtc->base.state)->wm = crtc_state->wm;
 	}
 
 put_state:
-- 
2.20.1

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

  parent reply	other threads:[~2019-06-28  8:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28  8:55 [PATCH v2 0/6] drm/i915: Use intel_crtc_state everywhere! Maarten Lankhorst
2019-06-28  8:55 ` [PATCH v2 1/6] drm/i915: Pass intel_crtc_state to needs_modeset() Maarten Lankhorst
2019-06-28  8:55 ` [PATCH v2 2/6] drm/i915: Convert most of atomic commit to take more intel state Maarten Lankhorst
2019-06-28  8:55 ` [PATCH v2 3/6] drm/i915: Convert hw state verifier to take more intel state, v2 Maarten Lankhorst
2019-06-28  8:55 ` Maarten Lankhorst [this message]
2019-06-28  8:55 ` [PATCH v2 5/6] drm/i915: Pass intel state to plane functions as well Maarten Lankhorst
2019-06-28  8:55 ` [PATCH v2 6/6] drm/i915: Use intel state as much as possible in wm code Maarten Lankhorst
2019-07-01  8:34   ` Maarten Lankhorst
2019-06-28  9:21 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use intel_crtc_state everywhere! Patchwork
2019-06-28  9:24 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-06-28 15:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-28 23:21 ` ✓ 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=20190628085517.31886-5-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