All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 01/15] drm/i915: Clean up casts to crtc_state in intel_atomic_commit_tail()
Date: Wed, 19 Sep 2018 15:56:30 +0200	[thread overview]
Message-ID: <20180919135644.14182-2-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20180919135644.14182-1-maarten.lankhorst@linux.intel.com>

Use old/new_intel_crtc_state, and get rid of all the conversion casts
where they don't add anything.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index eb25037d7b38..2ac381eb8103 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12665,8 +12665,9 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	struct drm_crtc_state *old_crtc_state, *new_crtc_state;
+	struct intel_crtc_state *new_intel_crtc_state, *old_intel_crtc_state;
 	struct drm_crtc *crtc;
-	struct intel_crtc_state *intel_cstate;
+	struct intel_crtc *intel_crtc;
 	u64 put_domains[I915_MAX_PIPES] = {};
 	int i;
 
@@ -12678,21 +12679,22 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 		intel_display_power_get(dev_priv, POWER_DOMAIN_MODESET);
 
 	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
-		struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+		old_intel_crtc_state = to_intel_crtc_state(old_crtc_state);
+		new_intel_crtc_state = to_intel_crtc_state(new_crtc_state);
+		intel_crtc = to_intel_crtc(crtc);
 
 		if (needs_modeset(new_crtc_state) ||
 		    to_intel_crtc_state(new_crtc_state)->update_pipe) {
 
-			put_domains[to_intel_crtc(crtc)->pipe] =
+			put_domains[intel_crtc->pipe] =
 				modeset_get_crtc_power_domains(crtc,
-					to_intel_crtc_state(new_crtc_state));
+					new_intel_crtc_state);
 		}
 
 		if (!needs_modeset(new_crtc_state))
 			continue;
 
-		intel_pre_plane_update(to_intel_crtc_state(old_crtc_state),
-				       to_intel_crtc_state(new_crtc_state));
+		intel_pre_plane_update(old_intel_crtc_state, new_intel_crtc_state);
 
 		if (old_crtc_state->active) {
 			intel_crtc_disable_planes(crtc, old_crtc_state->plane_mask);
@@ -12703,7 +12705,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 			 */
 			intel_crtc_disable_pipe_crc(intel_crtc);
 
-			dev_priv->display.crtc_disable(to_intel_crtc_state(old_crtc_state), state);
+			dev_priv->display.crtc_disable(old_intel_crtc_state, state);
 			intel_crtc->active = false;
 			intel_fbc_disable(intel_crtc);
 			intel_disable_shared_dpll(intel_crtc);
@@ -12724,7 +12726,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 				 */
 				if (INTEL_GEN(dev_priv) >= 9)
 					dev_priv->display.initial_watermarks(intel_state,
-									     to_intel_crtc_state(new_crtc_state));
+									     new_intel_crtc_state);
 			}
 		}
 	}
@@ -12784,11 +12786,11 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
 	 * TODO: Move this (and other cleanup) to an async worker eventually.
 	 */
 	for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) {
-		intel_cstate = to_intel_crtc_state(new_crtc_state);
+		new_intel_crtc_state = to_intel_crtc_state(new_crtc_state);
 
 		if (dev_priv->display.optimize_watermarks)
 			dev_priv->display.optimize_watermarks(intel_state,
-							      intel_cstate);
+							      new_intel_crtc_state);
 	}
 
 	for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
-- 
2.18.0

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

  reply	other threads:[~2018-09-19 13:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 13:56 [PATCH 00/15] drm/i915/gen11: Implement planar format support Maarten Lankhorst
2018-09-19 13:56 ` Maarten Lankhorst [this message]
2018-09-20  0:11   ` [PATCH 01/15] drm/i915: Clean up casts to crtc_state in intel_atomic_commit_tail() Matt Roper
2018-09-19 13:56 ` [PATCH 02/15] drm/i915: Handle cursor updating active_planes correctly Maarten Lankhorst
2018-09-20  0:12   ` Matt Roper
2018-09-20  9:56     ` Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 03/15] drm/i915: Make intel_crtc_disable_planes() use active planes mask Maarten Lankhorst
2018-09-20  0:13   ` Matt Roper
2018-09-19 13:56 ` [PATCH 04/15] drm/i915: Replace call to commit_planes_on_crtc with internal update, v2 Maarten Lankhorst
2018-09-20  0:13   ` Matt Roper
2018-09-19 13:56 ` [PATCH 05/15] drm/i915: Clean up scaler setup Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 06/15] drm/i915: Force NV12 coordinates to be a multiple of 2 Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 07/15] drm/i915: Unconditionally clear plane_state->visible flag Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 08/15] drm/i915/gen11: Enable 6 sprites on gen11 Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 09/15] drm/i915/gen11: Link nv12 Y and UV planes in the atomic state, v2 Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 10/15] drm/i915/gen11: Handle watermarks correctly for separate Y/UV planes Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 11/15] drm/i915: Move programming plane scaler to its own function Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 12/15] drm/i915/gen11: Program the scalers correctly for planar formats Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 13/15] drm/i915/gen11: Program the chroma upsampler for HDR planes Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 14/15] drm/i915/gen11: Program the Y and UV plane for planar mode correctly Maarten Lankhorst
2018-09-19 13:56 ` [PATCH 15/15] drm/i915/gen11: Expose planar format support on gen11 Maarten Lankhorst
2018-09-19 14:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Implement planar format support Patchwork
2018-09-19 14:21 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-09-19 14:36 ` ✗ Fi.CI.BAT: failure " 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=20180919135644.14182-2-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 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.