Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails
Date: Thu,  3 Feb 2022 20:38:15 +0200	[thread overview]
Message-ID: <20220203183823.22890-3-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20220203183823.22890-1-ville.syrjala@linux.intel.com>

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

We seem to be missing a few things from the bigjoiner state copy.
Namely hw.mode isn't getting copied (which probably causes PIPESRC
to be misconfigured), CTM/LUTs aren't getting copied (which could
cause the pipe to produced incorrect output), and we also forgot
to copy over the color_mgmt_changed flag so potentially we fail
to do the actual CTM/LUT programming (assuming we aren't doing
a full modeset or fastset). Fix it all.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 85dce8a093d4..2006eec6e166 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5827,8 +5827,10 @@ intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *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 (master_crtc_state)
+	if (master_crtc_state) {
+		crtc_state->uapi.color_mgmt_changed = master_crtc_state->uapi.color_mgmt_changed;
 		intel_crtc_copy_color_blobs(crtc_state, master_crtc_state);
+	}
 }
 
 static void
@@ -5890,13 +5892,23 @@ copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state,
 	memset(&crtc_state->hw, 0, sizeof(saved_state->hw));
 	crtc_state->hw.enable = from_crtc_state->hw.enable;
 	crtc_state->hw.active = from_crtc_state->hw.active;
+	crtc_state->hw.mode = from_crtc_state->hw.mode;
 	crtc_state->hw.pipe_mode = from_crtc_state->hw.pipe_mode;
 	crtc_state->hw.adjusted_mode = from_crtc_state->hw.adjusted_mode;
+	crtc_state->hw.scaling_filter = from_crtc_state->hw.scaling_filter;
+
+	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
+				  from_crtc_state->hw.degamma_lut);
+	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
+				  from_crtc_state->hw.gamma_lut);
+	drm_property_replace_blob(&crtc_state->uapi.ctm,
+				  from_crtc_state->hw.ctm);
 
 	/* Some fixups */
 	crtc_state->uapi.mode_changed = from_crtc_state->uapi.mode_changed;
 	crtc_state->uapi.connectors_changed = from_crtc_state->uapi.connectors_changed;
 	crtc_state->uapi.active_changed = from_crtc_state->uapi.active_changed;
+	crtc_state->uapi.color_mgmt_changed = from_crtc_state->uapi.color_mgmt_changed;
 	crtc_state->nv12_planes = crtc_state->c8_planes = crtc_state->update_planes = 0;
 	crtc_state->bigjoiner_linked_crtc = to_intel_crtc(from_crtc_state->uapi.crtc);
 	crtc_state->bigjoiner_slave = true;
-- 
2.34.1


  parent reply	other threads:[~2022-02-03 18:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
2022-02-03 18:38 ` [Intel-gfx] [PATCH 01/10] drm/i915: Flag crtc scaling_filter changes as modeset Ville Syrjala
2022-02-03 21:58   ` Navare, Manasi
2022-02-04  6:53     ` Ville Syrjälä
2022-02-03 18:38 ` Ville Syrjala [this message]
2022-02-03 22:13   ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Navare, Manasi
2022-02-04  7:05     ` Ville Syrjälä
2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-02-04 20:58     ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 03/10] drm/i915: Remove weird code from intel_atomic_check_bigjoiner() Ville Syrjala
2022-02-03 22:20   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 04/10] drm/i915: Clean up the bigjoiner state copy logic Ville Syrjala
2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
2022-02-04 20:52     ` Navare, Manasi
2022-02-07  7:32       ` Ville Syrjälä
2022-02-03 18:38 ` [Intel-gfx] [PATCH 05/10] drm/i915: Nuke some dead code Ville Syrjala
2022-02-04 21:08   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}() Ville Syrjala
2022-02-04 21:27   ` Navare, Manasi
2022-02-07  7:31     ` Ville Syrjälä
2022-02-15 10:53       ` Nautiyal, Ankit K
2022-02-03 18:38 ` [Intel-gfx] [PATCH 07/10] drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead Ville Syrjala
2022-02-09 19:57   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 08/10] drm/i915: Use for_each_intel_crtc_in_pipe_mask() more Ville Syrjala
2022-02-09 19:58   ` Navare, Manasi
2022-02-03 18:38 ` [Intel-gfx] [PATCH 09/10] drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes() Ville Syrjala
2022-02-09 20:00   ` Navare, Manasi
2022-02-09 20:10     ` Ville Syrjälä
2022-02-03 18:38 ` [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask Ville Syrjala
2022-02-04 23:58   ` Navare, Manasi
2022-02-07  7:31     ` Ville Syrjälä
2022-02-07 23:56       ` Navare, Manasi
2022-02-03 18:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking Patchwork
2022-02-03 18:51 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-03 19:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-03 21:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-04  7:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking (rev3) Patchwork
2022-02-04  7:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-04  8:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-04  9:22 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-02-15 22:34 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Use a bitmask for bigjoiner state tracking (rev4) 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=20220203183823.22890-3-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@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