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: Manasi Navare <manasi.d.navare@intel.com>
Subject: [Intel-gfx] [PATCH v2 5/9] drm/i915: Simplify intel_crtc_copy_uapi_to_hw_state_nomodeset()
Date: Fri, 22 Oct 2021 13:33:00 +0300	[thread overview]
Message-ID: <20211022103304.24164-6-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20211022103304.24164-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Rewrite intel_crtc_copy_uapi_to_hw_state_nomodeset() in a
slightly more straightforward manner.

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 640d87a00e15..e745eb4650e4 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5762,18 +5762,15 @@ static void
 intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
 					   struct intel_crtc_state *crtc_state)
 {
-	const struct intel_crtc_state *from_crtc_state = crtc_state;
+	const struct intel_crtc_state *master_crtc_state;
+	struct intel_crtc *master_crtc;
 
-	if (crtc_state->bigjoiner_slave) {
-		from_crtc_state = intel_atomic_get_new_crtc_state(state,
-								  crtc_state->bigjoiner_linked_crtc);
+	master_crtc = intel_master_crtc(crtc_state);
+	master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
 
-		/* No need to copy state if the master state is unchanged */
-		if (!from_crtc_state)
-			return;
-	}
-
-	intel_crtc_copy_color_blobs(crtc_state, from_crtc_state);
+	/* No need to copy state if the master state is unchanged */
+	if (master_crtc_state)
+		intel_crtc_copy_color_blobs(crtc_state, master_crtc_state);
 }
 
 static void
-- 
2.32.0


  parent reply	other threads:[~2021-10-22 10:33 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 10:32 [Intel-gfx] [PATCH v2 0/9] drm/i915: Fix bigjoiner state readout Ville Syrjala
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 1/9] drm/i915/psr: Disable PSR before modesets turn off all planes Ville Syrjala
2021-10-22 14:29   ` Hogander, Jouni
2021-10-22 15:26     ` Ville Syrjälä
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 2/9] Revert "drm/i915/display: Disable audio, DRRS and PSR before planes" Ville Syrjala
2021-10-26 19:39   ` Souza, Jose
2021-10-27 11:31     ` Ville Syrjälä
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 3/9] drm/i915: Disable all planes before modesetting any pipes Ville Syrjala
2021-10-26 19:39   ` Souza, Jose
2021-10-22 10:32 ` [Intel-gfx] [PATCH v2 4/9] drm/i915: Introduce intel_master_crtc() Ville Syrjala
2021-10-22 10:33 ` Ville Syrjala [this message]
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 6/9] drm/i915: Split PPS write from DSC enable Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 7/9] drm/i915: Perform correct cpu_transcoder readout for bigjoiner Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 8/9] drm/i915: Reduce bigjoiner special casing Ville Syrjala
2021-10-22 10:33 ` [Intel-gfx] [PATCH v2 9/9] drm/i915: Nuke PIPE_CONFIG_QUIRK_BIGJOINER_SLAVE Ville Syrjala
2021-10-22 17:13 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix bigjoiner state readout (rev2) Patchwork
2021-10-22 17:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-22 23:59 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=20211022103304.24164-6-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=manasi.d.navare@intel.com \
    /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.