All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking
@ 2022-02-03 18:38 Ville Syrjala
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 01/10] drm/i915: Flag crtc scaling_filter changes as modeset Ville Syrjala
                   ` (18 more replies)
  0 siblings, 19 replies; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

An attempt at making the bigjoiner state tracking both smaller and
more flexible for future needs. All we really need is a bitmask of
pipes.

I also managed to fix a bunch of issues with the state copy ...
I think. It's a bit hard to know for sure since I don't have
a DSC capably  displauy so I'm just forcing the driver to spew
out DSC but obviously I can't actually see anything on the screen.

The next thing that needs fixing is the actual modset sequence
since it's still kinda terrible. Also not flexible enough for
those future needs. I'm thinking we need suck all the logic into
the encoder hooks, and let those iterate over the pipes at
approprite times. But that's for another time.

Pushed the lot here if someone wants to consume it easier:
git://github.com/vsyrjala/linux.git bigjoiner_pipe_bitmask

Ville Syrjälä (10):
  drm/i915: Flag crtc scaling_filter changes as modeset
  drm/i915: Fix bigjoiner state copy fails
  drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
  drm/i915: Clean up the bigjoiner state copy logic
  drm/i915: Nuke some dead code
  drm/i915: Introduce intel_crtc_is_bigjoiner_{slave,master}()
  drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask
    instead
  drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
  drm/i915: Return both master and slave pipes from
    enabled_bigjoiner_pipes()
  drm/i915: Change bigjoiner state tracking to use the pipe bitmask

 drivers/gpu/drm/i915/display/intel_atomic.c   |  11 -
 drivers/gpu/drm/i915/display/intel_atomic.h   |   2 -
 .../gpu/drm/i915/display/intel_atomic_plane.c |   9 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |  14 +-
 drivers/gpu/drm/i915/display/intel_display.c  | 522 ++++++++++++------
 drivers/gpu/drm/i915/display/intel_display.h  |   8 +-
 .../drm/i915/display/intel_display_debugfs.c  |   7 +-
 .../drm/i915/display/intel_display_types.h    |   7 +-
 drivers/gpu/drm/i915/display/intel_dp.c       |  34 +-
 .../drm/i915/display/intel_plane_initial.c    |   7 -
 drivers/gpu/drm/i915/display/intel_vdsc.c     |  47 +-
 drivers/gpu/drm/i915/display/intel_vdsc.h     |   1 -
 12 files changed, 385 insertions(+), 284 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 01/10] drm/i915: Flag crtc scaling_filter changes as modeset
  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 ` Ville Syrjala
  2022-02-03 21:58   ` Navare, Manasi
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Ville Syrjala
                   ` (17 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

The core doesn't flag scaling_filter prop changes as needing
a modeset. That doesn't work for us since we only reprogram the
pipe scaler during full modesets and fastsets. So we need to
flag the prop change as a modeset ourselves. Assuming nothing else
has changed the operation will get promoted (demoted?) to a fastset
later.

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index df347329d90e..85dce8a093d4 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7846,6 +7846,10 @@ static int intel_atomic_check(struct drm_device *dev,
 					    new_crtc_state, i) {
 		if (new_crtc_state->inherited != old_crtc_state->inherited)
 			new_crtc_state->uapi.mode_changed = true;
+
+		if (new_crtc_state->uapi.scaling_filter !=
+		    old_crtc_state->uapi.scaling_filter)
+			new_crtc_state->uapi.mode_changed = true;
 	}
 
 	intel_vrr_check_modeset(state);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails
  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 18:38 ` Ville Syrjala
  2022-02-03 22:13   ` Navare, Manasi
  2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 03/10] drm/i915: Remove weird code from intel_atomic_check_bigjoiner() Ville Syrjala
                   ` (16 subsequent siblings)
  18 siblings, 2 replies; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 03/10] drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
  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 18:38 ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Ville Syrjala
@ 2022-02-03 18:38 ` 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
                   ` (15 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

There's some weird junk in intel_atomic_check_bigjoiner()
that's trying to look at the old crtc state's bigjoiner
usage for some reason. That code is totally unnecessary,
and maybe even actively harmful. Not entirely sure which
since it's such a mess that I can't actually wrap my brain
around what it ends up doing.

Either way, thanks to intel_bigjoiner_add_affected_crtcs()
all of the old bigjoiner crtcs are guaranteed to be in the
state already if any one of them is in the state. Also if
any one of those crtcs got flagged for a modeset, then all
of them will have been flagged, and the bigjoiner links
will have been detached via kill_bigjoiner_slave().

So there is no need to look examing any old bigjoiner
usage in intel_atomic_check_bigjoiner(). All we have to care
about is whether bigjoiner is needed for the new state,
and whether we can get the slave crtc we need.

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 2006eec6e166..b5701ca57889 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7584,38 +7584,28 @@ static bool intel_cpu_transcoders_need_modeset(struct intel_atomic_state *state,
 }
 
 static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
-					struct intel_crtc *crtc,
-					struct intel_crtc_state *old_crtc_state,
-					struct intel_crtc_state *new_crtc_state)
+					struct intel_crtc *master_crtc)
 {
 	struct drm_i915_private *i915 = to_i915(state->base.dev);
-	struct intel_crtc_state *slave_crtc_state, *master_crtc_state;
-	struct intel_crtc *slave_crtc, *master_crtc;
+	struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
+	struct intel_crtc_state *slave_crtc_state;
+	struct intel_crtc *slave_crtc;
 
-	/* slave being enabled, is master is still claiming this crtc? */
-	if (old_crtc_state->bigjoiner_slave) {
-		slave_crtc = crtc;
-		master_crtc = old_crtc_state->bigjoiner_linked_crtc;
-		master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
-		if (!master_crtc_state || !intel_crtc_needs_modeset(master_crtc_state))
-			goto claimed;
-	}
-
-	if (!new_crtc_state->bigjoiner)
+	if (!master_crtc_state->bigjoiner)
 		return 0;
 
-	slave_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
+	slave_crtc = intel_dsc_get_bigjoiner_secondary(master_crtc);
 	if (!slave_crtc) {
 		drm_dbg_kms(&i915->drm,
 			    "[CRTC:%d:%s] Big joiner configuration requires "
 			    "CRTC + 1 to be used, doesn't exist\n",
-			    crtc->base.base.id, crtc->base.name);
+			    master_crtc->base.base.id, master_crtc->base.name);
 		return -EINVAL;
 	}
 
-	new_crtc_state->bigjoiner_linked_crtc = slave_crtc;
+	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
 	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
-	master_crtc = crtc;
 	if (IS_ERR(slave_crtc_state))
 		return PTR_ERR(slave_crtc_state);
 
@@ -7627,7 +7617,7 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 		    "[CRTC:%d:%s] Used as slave for big joiner\n",
 		    slave_crtc->base.base.id, slave_crtc->base.name);
 
-	return copy_bigjoiner_crtc_state(slave_crtc_state, new_crtc_state);
+	return copy_bigjoiner_crtc_state(slave_crtc_state, master_crtc_state);
 
 claimed:
 	drm_dbg_kms(&i915->drm,
@@ -7899,8 +7889,7 @@ static int intel_atomic_check(struct drm_device *dev,
 		if (ret)
 			goto fail;
 
-		ret = intel_atomic_check_bigjoiner(state, crtc, old_crtc_state,
-						   new_crtc_state);
+		ret = intel_atomic_check_bigjoiner(state, crtc);
 		if (ret)
 			goto fail;
 	}
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 04/10] drm/i915: Clean up the bigjoiner state copy logic
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (2 preceding siblings ...)
  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 18:38 ` Ville Syrjala
  2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 05/10] drm/i915: Nuke some dead code Ville Syrjala
                   ` (14 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Currently the bigjoiner state copy logic is kind of
a byzantine mess.

Clean it up to operate in the following manner during a full
modeset:
1) master uapi -> hw state copy
2) master hw -> slave hw state copy

And during a non-modeset update we do:
1) master uapi -> hw state light copy
2) master hw -> slave hw state light copy

I think that is now easier to reason about since we never do
any kind of master uapi -> slave hw state copy short circuit
that could happen previously.

Obviously this does now depend on the master uapi->hw copy
always happening before the master hw -> slave hw copy, but
that is guaranteed by the fact that we always add both crtcs
to the state early, the crtcs are registered in pipe
order (so the compute_config loop happens in pipe order),
and the hardware requires the master pipe has to be lower
than the slave pipe as well. And for good measure we shall
add a check+WARN for this before doing the bigjoiner crtc
assignment.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic.c  |  11 --
 drivers/gpu/drm/i915/display/intel_atomic.h  |   2 -
 drivers/gpu/drm/i915/display/intel_display.c | 170 ++++++++++++-------
 3 files changed, 108 insertions(+), 75 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
index 093904065112..e0667d163266 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -281,17 +281,6 @@ void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state)
 	intel_crtc_put_color_blobs(crtc_state);
 }
 
-void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
-				 const struct intel_crtc_state *from_crtc_state)
-{
-	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
-				  from_crtc_state->uapi.degamma_lut);
-	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
-				  from_crtc_state->uapi.gamma_lut);
-	drm_property_replace_blob(&crtc_state->hw.ctm,
-				  from_crtc_state->uapi.ctm);
-}
-
 /**
  * intel_crtc_destroy_state - destroy crtc state
  * @crtc: drm crtc
diff --git a/drivers/gpu/drm/i915/display/intel_atomic.h b/drivers/gpu/drm/i915/display/intel_atomic.h
index d2700c74c9da..1dc439983dd9 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.h
+++ b/drivers/gpu/drm/i915/display/intel_atomic.h
@@ -44,8 +44,6 @@ struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
 void intel_crtc_destroy_state(struct drm_crtc *crtc,
 			       struct drm_crtc_state *state);
 void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
-void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
-				 const struct intel_crtc_state *from_crtc_state);
 struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
 void intel_atomic_state_free(struct drm_atomic_state *state);
 void intel_atomic_state_clear(struct drm_atomic_state *state);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b5701ca57889..48869478efc2 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5818,32 +5818,37 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)
 
 static void
 intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
-					   struct intel_crtc_state *crtc_state)
+					   struct intel_crtc *crtc)
 {
-	const struct intel_crtc_state *master_crtc_state;
-	struct intel_crtc *master_crtc;
+	struct intel_crtc_state *crtc_state =
+		intel_atomic_get_new_crtc_state(state, crtc);
 
-	master_crtc = intel_master_crtc(crtc_state);
-	master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
+	WARN_ON(crtc_state->bigjoiner_slave);
 
-	/* No need to copy state if the master state is unchanged */
-	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);
-	}
+	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
+				  crtc_state->uapi.degamma_lut);
+	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
+				  crtc_state->uapi.gamma_lut);
+	drm_property_replace_blob(&crtc_state->hw.ctm,
+				  crtc_state->uapi.ctm);
 }
 
 static void
-intel_crtc_copy_uapi_to_hw_state(struct intel_atomic_state *state,
-				 struct intel_crtc_state *crtc_state)
+intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
+					 struct intel_crtc *crtc)
 {
+	struct intel_crtc_state *crtc_state =
+		intel_atomic_get_new_crtc_state(state, crtc);
+
+	WARN_ON(crtc_state->bigjoiner_slave);
+
 	crtc_state->hw.enable = crtc_state->uapi.enable;
 	crtc_state->hw.active = crtc_state->uapi.active;
 	crtc_state->hw.mode = crtc_state->uapi.mode;
 	crtc_state->hw.adjusted_mode = crtc_state->uapi.adjusted_mode;
 	crtc_state->hw.scaling_filter = crtc_state->uapi.scaling_filter;
 
-	intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc_state);
+	intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
 }
 
 static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state)
@@ -5859,7 +5864,6 @@ static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state
 	crtc_state->uapi.adjusted_mode = crtc_state->hw.adjusted_mode;
 	crtc_state->uapi.scaling_filter = crtc_state->hw.scaling_filter;
 
-	/* copy color blobs to uapi */
 	drm_property_replace_blob(&crtc_state->uapi.degamma_lut,
 				  crtc_state->hw.degamma_lut);
 	drm_property_replace_blob(&crtc_state->uapi.gamma_lut,
@@ -5868,61 +5872,79 @@ static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state
 				  crtc_state->hw.ctm);
 }
 
+static void
+copy_bigjoiner_crtc_state_nomodeset(struct intel_atomic_state *state,
+				    struct intel_crtc *slave_crtc)
+{
+	struct intel_crtc_state *slave_crtc_state =
+		intel_atomic_get_new_crtc_state(state, slave_crtc);
+	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
+	const struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
+
+	drm_property_replace_blob(&slave_crtc_state->hw.degamma_lut,
+				  master_crtc_state->hw.degamma_lut);
+	drm_property_replace_blob(&slave_crtc_state->hw.gamma_lut,
+				  master_crtc_state->hw.gamma_lut);
+	drm_property_replace_blob(&slave_crtc_state->uapi.ctm,
+				  master_crtc_state->hw.ctm);
+
+	slave_crtc_state->uapi.color_mgmt_changed = master_crtc_state->uapi.color_mgmt_changed;
+}
+
 static int
-copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state,
-			  const struct intel_crtc_state *from_crtc_state)
+copy_bigjoiner_crtc_state_modeset(struct intel_atomic_state *state,
+				  struct intel_crtc *slave_crtc)
 {
+	struct intel_crtc_state *slave_crtc_state =
+		intel_atomic_get_new_crtc_state(state, slave_crtc);
+	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
+	const struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
 	struct intel_crtc_state *saved_state;
 
-	saved_state = kmemdup(from_crtc_state, sizeof(*saved_state), GFP_KERNEL);
+	saved_state = kmemdup(master_crtc_state, sizeof(*saved_state), GFP_KERNEL);
 	if (!saved_state)
 		return -ENOMEM;
 
-	saved_state->uapi = crtc_state->uapi;
-	saved_state->scaler_state = crtc_state->scaler_state;
-	saved_state->shared_dpll = crtc_state->shared_dpll;
-	saved_state->dpll_hw_state = crtc_state->dpll_hw_state;
-	saved_state->crc_enabled = crtc_state->crc_enabled;
+	/* preserve some things from the slave's original crtc state */
+	saved_state->uapi = slave_crtc_state->uapi;
+	saved_state->scaler_state = slave_crtc_state->scaler_state;
+	saved_state->shared_dpll = slave_crtc_state->shared_dpll;
+	saved_state->dpll_hw_state = slave_crtc_state->dpll_hw_state;
+	saved_state->crc_enabled = slave_crtc_state->crc_enabled;
 
-	intel_crtc_free_hw_state(crtc_state);
-	memcpy(crtc_state, saved_state, sizeof(*crtc_state));
+	intel_crtc_free_hw_state(slave_crtc_state);
+	memcpy(slave_crtc_state, saved_state, sizeof(*slave_crtc_state));
 	kfree(saved_state);
 
 	/* Re-init hw 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;
+	memset(&slave_crtc_state->hw, 0, sizeof(slave_crtc_state->hw));
+	slave_crtc_state->hw.enable = master_crtc_state->hw.enable;
+	slave_crtc_state->hw.active = master_crtc_state->hw.active;
+	slave_crtc_state->hw.mode = master_crtc_state->hw.mode;
+	slave_crtc_state->hw.pipe_mode = master_crtc_state->hw.pipe_mode;
+	slave_crtc_state->hw.adjusted_mode = master_crtc_state->hw.adjusted_mode;
+	slave_crtc_state->hw.scaling_filter = master_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);
+	copy_bigjoiner_crtc_state_nomodeset(state, slave_crtc);
 
 	/* 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;
-	crtc_state->cpu_transcoder = from_crtc_state->cpu_transcoder;
-	crtc_state->has_audio = from_crtc_state->has_audio;
+	slave_crtc_state->uapi.mode_changed = master_crtc_state->uapi.mode_changed;
+	slave_crtc_state->uapi.connectors_changed = master_crtc_state->uapi.connectors_changed;
+	slave_crtc_state->uapi.active_changed = master_crtc_state->uapi.active_changed;
+	slave_crtc_state->cpu_transcoder = master_crtc_state->cpu_transcoder;
+	slave_crtc_state->has_audio = master_crtc_state->has_audio;
 
 	return 0;
 }
 
 static int
 intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
-				 struct intel_crtc_state *crtc_state)
+				 struct intel_crtc *crtc)
 {
-	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+	struct intel_crtc_state *crtc_state =
+		intel_atomic_get_new_crtc_state(state, crtc);
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
 	struct intel_crtc_state *saved_state;
 
@@ -5952,7 +5974,7 @@ intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
 	memcpy(crtc_state, saved_state, sizeof(*crtc_state));
 	kfree(saved_state);
 
-	intel_crtc_copy_uapi_to_hw_state(state, crtc_state);
+	intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
 
 	return 0;
 }
@@ -7592,6 +7614,9 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 	struct intel_crtc_state *slave_crtc_state;
 	struct intel_crtc *slave_crtc;
 
+	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
+	WARN_ON(master_crtc_state->bigjoiner_slave);
+
 	if (!master_crtc_state->bigjoiner)
 		return 0;
 
@@ -7604,7 +7629,6 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 		return -EINVAL;
 	}
 
-	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
 	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
 	if (IS_ERR(slave_crtc_state))
 		return PTR_ERR(slave_crtc_state);
@@ -7613,11 +7637,28 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 	if (slave_crtc_state->uapi.enable)
 		goto claimed;
 
+	/*
+	 * The state copy logic assumes the master crtc gets processed
+	 * before the slave crtc during the main compute_config loop.
+	 * This works because the crtcs are created in pipe order,
+	 * and the hardware requires master pipe < slave pipe as well.
+	 * Should that change we need to rethink the logic.
+	 */
+	if (WARN_ON(drm_crtc_index(&master_crtc->base) > drm_crtc_index(&slave_crtc->base)))
+		return -EINVAL;
+
 	drm_dbg_kms(&i915->drm,
-		    "[CRTC:%d:%s] Used as slave for big joiner\n",
-		    slave_crtc->base.base.id, slave_crtc->base.name);
+		    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
+		    slave_crtc->base.base.id, slave_crtc->base.name,
+		    master_crtc->base.base.id, master_crtc->base.name);
 
-	return copy_bigjoiner_crtc_state(slave_crtc_state, master_crtc_state);
+	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
+	master_crtc_state->bigjoiner_slave = false;
+
+	slave_crtc_state->bigjoiner_linked_crtc = master_crtc;
+	slave_crtc_state->bigjoiner_slave = true;
+
+	return copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
 
 claimed:
 	drm_dbg_kms(&i915->drm,
@@ -7629,15 +7670,19 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 }
 
 static void kill_bigjoiner_slave(struct intel_atomic_state *state,
-				 struct intel_crtc_state *master_crtc_state)
+				 struct intel_crtc *master_crtc)
 {
+	struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
+	struct intel_crtc *slave_crtc = master_crtc_state->bigjoiner_linked_crtc;
 	struct intel_crtc_state *slave_crtc_state =
-		intel_atomic_get_new_crtc_state(state, master_crtc_state->bigjoiner_linked_crtc);
+		intel_atomic_get_new_crtc_state(state, slave_crtc);
 
 	slave_crtc_state->bigjoiner = master_crtc_state->bigjoiner = false;
 	slave_crtc_state->bigjoiner_slave = master_crtc_state->bigjoiner_slave = false;
 	slave_crtc_state->bigjoiner_linked_crtc = master_crtc_state->bigjoiner_linked_crtc = NULL;
-	intel_crtc_copy_uapi_to_hw_state(state, slave_crtc_state);
+
+	intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
 }
 
 /**
@@ -7823,7 +7868,7 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
 		/* Kill old bigjoiner link, we may re-establish afterwards */
 		if (intel_crtc_needs_modeset(crtc_state) &&
 		    crtc_state->bigjoiner && !crtc_state->bigjoiner_slave)
-			kill_bigjoiner_slave(state, crtc_state);
+			kill_bigjoiner_slave(state, crtc);
 	}
 
 	return 0;
@@ -7867,21 +7912,22 @@ static int intel_atomic_check(struct drm_device *dev,
 	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
 					    new_crtc_state, i) {
 		if (!intel_crtc_needs_modeset(new_crtc_state)) {
-			/* Light copy */
-			intel_crtc_copy_uapi_to_hw_state_nomodeset(state, new_crtc_state);
-
+			if (new_crtc_state->bigjoiner_slave)
+				copy_bigjoiner_crtc_state_nomodeset(state, crtc);
+			else
+				intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
 			continue;
 		}
 
 		if (!new_crtc_state->uapi.enable) {
 			if (!new_crtc_state->bigjoiner_slave) {
-				intel_crtc_copy_uapi_to_hw_state(state, new_crtc_state);
+				intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
 				any_ms = true;
 			}
 			continue;
 		}
 
-		ret = intel_crtc_prepare_cleared_state(state, new_crtc_state);
+		ret = intel_crtc_prepare_cleared_state(state, crtc);
 		if (ret)
 			goto fail;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 05/10] drm/i915: Nuke some dead code
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (3 preceding siblings ...)
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 04/10] drm/i915: Clean up the bigjoiner state copy logic Ville Syrjala
@ 2022-02-03 18:38 ` 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
                   ` (13 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Remove all the dead code from icl_ddi_bigjoiner_pre_enable().

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 48869478efc2..d5dc2c25c1f6 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1974,23 +1974,7 @@ static void hsw_set_frame_start_delay(const struct intel_crtc_state *crtc_state)
 static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
 					 const struct intel_crtc_state *crtc_state)
 {
-	struct intel_crtc_state *master_crtc_state;
-	struct intel_crtc *master_crtc;
-	struct drm_connector_state *conn_state;
-	struct drm_connector *conn;
-	struct intel_encoder *encoder = NULL;
-	int i;
-
-	master_crtc = intel_master_crtc(crtc_state);
-	master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
-
-	for_each_new_connector_in_state(&state->base, conn, conn_state, i) {
-		if (conn_state->crtc != &master_crtc->base)
-			continue;
-
-		encoder = to_intel_encoder(conn_state->best_encoder);
-		break;
-	}
+	struct intel_crtc *master_crtc = intel_master_crtc(crtc_state);
 
 	/*
 	 * Enable sequence steps 1-7 on bigjoiner master
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (4 preceding siblings ...)
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 05/10] drm/i915: Nuke some dead code Ville Syrjala
@ 2022-02-03 18:38 ` Ville Syrjala
  2022-02-04 21:27   ` Navare, Manasi
  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
                   ` (12 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Introduce helpers to query whether the crtc is the slave/master
for bigjoiner. This decouples most places from the exact
state layout we use to track this relationship, allowing us
to change and extend it more easily.

Performed with cocci:
@@
expression S, E;
@@
(
  S->bigjoiner_slave = E;
|
- S->bigjoiner_slave
+ intel_crtc_is_bigjoiner_slave(S)
)

@@
expression S, E;
@@
(
- E && S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
+ E && intel_crtc_is_bigjoiner_master(S)
|
- S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
+ intel_crtc_is_bigjoiner_master(S)
)

@@
expression S;
@@
- (intel_crtc_is_bigjoiner_master(S))
+ intel_crtc_is_bigjoiner_master(S)

@@
expression S, E1, E2, E3;
@@
- intel_crtc_is_bigjoiner_slave(S) ? E1 : S->bigjoiner ? E2 : E3
+ intel_crtc_is_bigjoiner_slave(S) ? E1 : intel_crtc_is_bigjoiner_master(S) ? E2 : E3

@@
typedef bool;
@@
+ bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
+ {
+ 	return crtc_state->bigjoiner_slave;
+ }
+
  intel_master_crtc(...) {...}

@@
typedef bool;
@@
+ bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
+ {
+ 	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
+ }
+
  intel_master_crtc(...) {...}

@@
typedef bool;
identifier S;
@@
- bool is_trans_port_sync_mode(const struct intel_crtc_state *S);
+ bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
+ bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
+ bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 .../gpu/drm/i915/display/intel_atomic_plane.c |  4 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |  2 +-
 drivers/gpu/drm/i915/display/intel_display.c  | 51 +++++++++++--------
 drivers/gpu/drm/i915/display/intel_display.h  |  2 +
 .../drm/i915/display/intel_display_debugfs.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_vdsc.c     |  4 +-
 6 files changed, 39 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index bec02333bdeb..41d52889dfce 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -403,7 +403,7 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
 	struct intel_crtc_state *new_crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
 
-	if (new_crtc_state && new_crtc_state->bigjoiner_slave) {
+	if (new_crtc_state && intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
 		struct intel_plane *master_plane =
 			intel_crtc_get_plane(new_crtc_state->bigjoiner_linked_crtc,
 					     plane->id);
@@ -633,7 +633,7 @@ int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
 	}
 
 	/* right side of the image is on the slave crtc, adjust dst to match */
-	if (crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(crtc_state))
 		drm_rect_translate(dst, -crtc_state->pipe_src_w, 0);
 
 	/*
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 354b08d6f81d..3f0e1e127595 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -2926,7 +2926,7 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
 {
 	drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
 
-	if (!crtc_state->bigjoiner_slave)
+	if (!intel_crtc_is_bigjoiner_slave(crtc_state))
 		intel_ddi_enable_transcoder_func(encoder, crtc_state);
 
 	intel_vrr_enable(encoder, crtc_state);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index d5dc2c25c1f6..9a7f40d17b79 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -337,9 +337,19 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
 		is_trans_port_sync_slave(crtc_state);
 }
 
+bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
+{
+	return crtc_state->bigjoiner_slave;
+}
+
+bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
+{
+	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
+}
+
 static struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
 {
-	if (crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(crtc_state))
 		return crtc_state->bigjoiner_linked_crtc;
 	else
 		return to_intel_crtc(crtc_state->uapi.crtc);
@@ -1979,13 +1989,13 @@ static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
 	/*
 	 * Enable sequence steps 1-7 on bigjoiner master
 	 */
-	if (crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(crtc_state))
 		intel_encoders_pre_pll_enable(state, master_crtc);
 
 	if (crtc_state->shared_dpll)
 		intel_enable_shared_dpll(crtc_state);
 
-	if (crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(crtc_state))
 		intel_encoders_pre_enable(state, master_crtc);
 }
 
@@ -2049,7 +2059,8 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
 	if (DISPLAY_VER(dev_priv) >= 9 || IS_BROADWELL(dev_priv))
 		bdw_set_pipemisc(new_crtc_state);
 
-	if (!new_crtc_state->bigjoiner_slave && !transcoder_is_dsi(cpu_transcoder))
+	if (!intel_crtc_is_bigjoiner_slave(new_crtc_state) &&
+	    !transcoder_is_dsi(cpu_transcoder))
 		hsw_configure_cpu_transcoder(new_crtc_state);
 
 	crtc->active = true;
@@ -2089,7 +2100,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
 		icl_pipe_mbus_enable(crtc, dbuf_state->joined_mbus);
 	}
 
-	if (new_crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(new_crtc_state))
 		intel_crtc_vblank_on(new_crtc_state);
 
 	intel_encoders_enable(state, crtc);
@@ -2174,7 +2185,7 @@ static void hsw_crtc_disable(struct intel_atomic_state *state,
 	 * FIXME collapse everything to one hook.
 	 * Need care with mst->ddi interactions.
 	 */
-	if (!old_crtc_state->bigjoiner_slave) {
+	if (!intel_crtc_is_bigjoiner_slave(old_crtc_state)) {
 		intel_encoders_disable(state, crtc);
 		intel_encoders_post_disable(state, crtc);
 	}
@@ -5604,8 +5615,8 @@ static void intel_dump_pipe_config(const struct intel_crtc_state *pipe_config,
 		    pipe_config->sync_mode_slaves_mask);
 
 	drm_dbg_kms(&dev_priv->drm, "bigjoiner: %s\n",
-		    pipe_config->bigjoiner_slave ? "slave" :
-		    pipe_config->bigjoiner ? "master" : "no");
+		    intel_crtc_is_bigjoiner_slave(pipe_config) ? "slave" :
+		    intel_crtc_is_bigjoiner_master(pipe_config) ? "master" : "no");
 
 	drm_dbg_kms(&dev_priv->drm, "splitter: %s, link count %d, overlap %d\n",
 		    enableddisabled(pipe_config->splitter.enable),
@@ -5807,7 +5818,7 @@ intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
 	struct intel_crtc_state *crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
 
-	WARN_ON(crtc_state->bigjoiner_slave);
+	WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
 
 	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
 				  crtc_state->uapi.degamma_lut);
@@ -5824,7 +5835,7 @@ intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
 	struct intel_crtc_state *crtc_state =
 		intel_atomic_get_new_crtc_state(state, crtc);
 
-	WARN_ON(crtc_state->bigjoiner_slave);
+	WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
 
 	crtc_state->hw.enable = crtc_state->uapi.enable;
 	crtc_state->hw.active = crtc_state->uapi.active;
@@ -5837,7 +5848,7 @@ intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
 
 static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state)
 {
-	if (crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(crtc_state))
 		return;
 
 	crtc_state->uapi.enable = crtc_state->hw.enable;
@@ -7599,7 +7610,7 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 	struct intel_crtc *slave_crtc;
 
 	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
-	WARN_ON(master_crtc_state->bigjoiner_slave);
+	WARN_ON(intel_crtc_is_bigjoiner_slave(master_crtc_state));
 
 	if (!master_crtc_state->bigjoiner)
 		return 0;
@@ -7851,7 +7862,7 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
 	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
 		/* Kill old bigjoiner link, we may re-establish afterwards */
 		if (intel_crtc_needs_modeset(crtc_state) &&
-		    crtc_state->bigjoiner && !crtc_state->bigjoiner_slave)
+		    intel_crtc_is_bigjoiner_master(crtc_state))
 			kill_bigjoiner_slave(state, crtc);
 	}
 
@@ -7896,7 +7907,7 @@ static int intel_atomic_check(struct drm_device *dev,
 	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
 					    new_crtc_state, i) {
 		if (!intel_crtc_needs_modeset(new_crtc_state)) {
-			if (new_crtc_state->bigjoiner_slave)
+			if (intel_crtc_is_bigjoiner_slave(new_crtc_state))
 				copy_bigjoiner_crtc_state_nomodeset(state, crtc);
 			else
 				intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
@@ -7904,7 +7915,7 @@ static int intel_atomic_check(struct drm_device *dev,
 		}
 
 		if (!new_crtc_state->uapi.enable) {
-			if (!new_crtc_state->bigjoiner_slave) {
+			if (!intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
 				intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
 				any_ms = true;
 			}
@@ -8223,7 +8234,7 @@ static void intel_enable_crtc(struct intel_atomic_state *state,
 
 	dev_priv->display->crtc_enable(state, crtc);
 
-	if (new_crtc_state->bigjoiner_slave)
+	if (intel_crtc_is_bigjoiner_slave(new_crtc_state))
 		return;
 
 	/* vblanks work again, re-enable pipe CRC. */
@@ -8340,7 +8351,7 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
 		 */
 		if (!is_trans_port_sync_slave(old_crtc_state) &&
 		    !intel_dp_mst_is_slave_trans(old_crtc_state) &&
-		    !old_crtc_state->bigjoiner_slave)
+		    !intel_crtc_is_bigjoiner_slave(old_crtc_state))
 			continue;
 
 		intel_old_crtc_state_disables(state, old_crtc_state,
@@ -8455,7 +8466,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
 
 		if (intel_dp_mst_is_slave_trans(new_crtc_state) ||
 		    is_trans_port_sync_master(new_crtc_state) ||
-		    (new_crtc_state->bigjoiner && !new_crtc_state->bigjoiner_slave))
+		    intel_crtc_is_bigjoiner_master(new_crtc_state))
 			continue;
 
 		modeset_pipes &= ~BIT(pipe);
@@ -10167,7 +10178,7 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
 	/* Adjust the state of the output pipe according to whether we
 	 * have active connectors/encoders. */
 	if (crtc_state->hw.active && !intel_crtc_has_encoders(crtc) &&
-	    !crtc_state->bigjoiner_slave)
+	    !intel_crtc_is_bigjoiner_slave(crtc_state))
 		intel_crtc_disable_noatomic(crtc, ctx);
 
 	if (crtc_state->hw.active || HAS_GMCH(dev_priv)) {
@@ -10381,7 +10392,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 			/* read out to slave crtc as well for bigjoiner */
 			if (crtc_state->bigjoiner) {
 				/* encoder should read be linked to bigjoiner master */
-				WARN_ON(crtc_state->bigjoiner_slave);
+				WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
 
 				crtc = crtc_state->bigjoiner_linked_crtc;
 				crtc_state = to_intel_crtc_state(crtc->base.state);
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 457738aeee3e..22e5f0d6e171 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -555,6 +555,8 @@ intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
 				bool bigjoiner);
 enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
 bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
+bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
+bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
 
 void intel_plane_destroy(struct drm_plane *plane);
 void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state);
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index f4de004d470f..053c74afe721 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -939,7 +939,7 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
 		seq_printf(m, "\tLinked to [CRTC:%d:%s] as a %s\n",
 			   crtc_state->bigjoiner_linked_crtc->base.base.id,
 			   crtc_state->bigjoiner_linked_crtc->base.name,
-			   crtc_state->bigjoiner_slave ? "slave" : "master");
+			   intel_crtc_is_bigjoiner_slave(crtc_state) ? "slave" : "master");
 
 	for_each_intel_encoder_mask(&dev_priv->drm, encoder,
 				    crtc_state->uapi.encoder_mask)
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
index 3faea903b9ae..b83b59cf2b78 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -1126,7 +1126,7 @@ void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
 	u32 dss_ctl1_val = 0;
 
 	if (crtc_state->bigjoiner && !crtc_state->dsc.compression_enable) {
-		if (crtc_state->bigjoiner_slave)
+		if (intel_crtc_is_bigjoiner_slave(crtc_state))
 			dss_ctl1_val |= UNCOMPRESSED_JOINER_SLAVE;
 		else
 			dss_ctl1_val |= UNCOMPRESSED_JOINER_MASTER;
@@ -1154,7 +1154,7 @@ void intel_dsc_enable(const struct intel_crtc_state *crtc_state)
 	}
 	if (crtc_state->bigjoiner) {
 		dss_ctl1_val |= BIG_JOINER_ENABLE;
-		if (!crtc_state->bigjoiner_slave)
+		if (!intel_crtc_is_bigjoiner_slave(crtc_state))
 			dss_ctl1_val |= MASTER_BIG_JOINER_ENABLE;
 	}
 	intel_de_write(dev_priv, dss_ctl1_reg(crtc, crtc_state->cpu_transcoder), dss_ctl1_val);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 07/10] drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (5 preceding siblings ...)
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}() Ville Syrjala
@ 2022-02-03 18:38 ` 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
                   ` (11 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Often using pipes is more convenient than crtc indices.
Convert the current for_each_intel_crtc_mask() to take a
pipe mask instead of a crtc index mask, and rename it to
for_each_intel_crtc_in_pipe_mask() to make it clear what
it does.

The current users of for_each_intel_crtc_mask() don't really
care which kind of mask we use, but for other uses a pipe
mask if better.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.h |  4 +--
 drivers/gpu/drm/i915/display/intel_dp.c      | 34 ++++++++++----------
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index 22e5f0d6e171..fe9eb3acee65 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -430,11 +430,11 @@ enum hpd_pin {
 			    &(dev)->mode_config.crtc_list,		\
 			    base.head)
 
-#define for_each_intel_crtc_mask(dev, intel_crtc, crtc_mask)		\
+#define for_each_intel_crtc_in_pipe_mask(dev, intel_crtc, pipe_mask)	\
 	list_for_each_entry(intel_crtc,					\
 			    &(dev)->mode_config.crtc_list,		\
 			    base.head)					\
-		for_each_if((crtc_mask) & drm_crtc_mask(&intel_crtc->base))
+		for_each_if((pipe_mask) & BIT(intel_crtc->pipe))
 
 #define for_each_intel_encoder(dev, intel_encoder)		\
 	list_for_each_entry(intel_encoder,			\
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 146b83916005..3fb9f643ebb9 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3810,14 +3810,14 @@ static bool intel_dp_has_connector(struct intel_dp *intel_dp,
 
 static int intel_dp_prep_link_retrain(struct intel_dp *intel_dp,
 				      struct drm_modeset_acquire_ctx *ctx,
-				      u32 *crtc_mask)
+				      u8 *pipe_mask)
 {
 	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
 	struct drm_connector_list_iter conn_iter;
 	struct intel_connector *connector;
 	int ret = 0;
 
-	*crtc_mask = 0;
+	*pipe_mask = 0;
 
 	if (!intel_dp_needs_link_retrain(intel_dp))
 		return 0;
@@ -3851,12 +3851,12 @@ static int intel_dp_prep_link_retrain(struct intel_dp *intel_dp,
 		    !try_wait_for_completion(&conn_state->commit->hw_done))
 			continue;
 
-		*crtc_mask |= drm_crtc_mask(&crtc->base);
+		*pipe_mask |= BIT(crtc->pipe);
 	}
 	drm_connector_list_iter_end(&conn_iter);
 
 	if (!intel_dp_needs_link_retrain(intel_dp))
-		*crtc_mask = 0;
+		*pipe_mask = 0;
 
 	return ret;
 }
@@ -3875,7 +3875,7 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
 	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
 	struct intel_crtc *crtc;
-	u32 crtc_mask;
+	u8 pipe_mask;
 	int ret;
 
 	if (!intel_dp_is_connected(intel_dp))
@@ -3886,17 +3886,17 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
 	if (ret)
 		return ret;
 
-	ret = intel_dp_prep_link_retrain(intel_dp, ctx, &crtc_mask);
+	ret = intel_dp_prep_link_retrain(intel_dp, ctx, &pipe_mask);
 	if (ret)
 		return ret;
 
-	if (crtc_mask == 0)
+	if (pipe_mask == 0)
 		return 0;
 
 	drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] retraining link\n",
 		    encoder->base.base.id, encoder->base.name);
 
-	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
+	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
 		const struct intel_crtc_state *crtc_state =
 			to_intel_crtc_state(crtc->base.state);
 
@@ -3907,7 +3907,7 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
 							      intel_crtc_pch_transcoder(crtc), false);
 	}
 
-	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
+	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
 		const struct intel_crtc_state *crtc_state =
 			to_intel_crtc_state(crtc->base.state);
 
@@ -3924,7 +3924,7 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
 		break;
 	}
 
-	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
+	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
 		const struct intel_crtc_state *crtc_state =
 			to_intel_crtc_state(crtc->base.state);
 
@@ -3942,14 +3942,14 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
 
 static int intel_dp_prep_phy_test(struct intel_dp *intel_dp,
 				  struct drm_modeset_acquire_ctx *ctx,
-				  u32 *crtc_mask)
+				  u8 *pipe_mask)
 {
 	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
 	struct drm_connector_list_iter conn_iter;
 	struct intel_connector *connector;
 	int ret = 0;
 
-	*crtc_mask = 0;
+	*pipe_mask = 0;
 
 	drm_connector_list_iter_begin(&i915->drm, &conn_iter);
 	for_each_intel_connector_iter(connector, &conn_iter) {
@@ -3980,7 +3980,7 @@ static int intel_dp_prep_phy_test(struct intel_dp *intel_dp,
 		    !try_wait_for_completion(&conn_state->commit->hw_done))
 			continue;
 
-		*crtc_mask |= drm_crtc_mask(&crtc->base);
+		*pipe_mask |= BIT(crtc->pipe);
 	}
 	drm_connector_list_iter_end(&conn_iter);
 
@@ -3993,7 +3993,7 @@ static int intel_dp_do_phy_test(struct intel_encoder *encoder,
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
 	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
 	struct intel_crtc *crtc;
-	u32 crtc_mask;
+	u8 pipe_mask;
 	int ret;
 
 	ret = drm_modeset_lock(&dev_priv->drm.mode_config.connection_mutex,
@@ -4001,17 +4001,17 @@ static int intel_dp_do_phy_test(struct intel_encoder *encoder,
 	if (ret)
 		return ret;
 
-	ret = intel_dp_prep_phy_test(intel_dp, ctx, &crtc_mask);
+	ret = intel_dp_prep_phy_test(intel_dp, ctx, &pipe_mask);
 	if (ret)
 		return ret;
 
-	if (crtc_mask == 0)
+	if (pipe_mask == 0)
 		return 0;
 
 	drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] PHY test\n",
 		    encoder->base.base.id, encoder->base.name);
 
-	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
+	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
 		const struct intel_crtc_state *crtc_state =
 			to_intel_crtc_state(crtc->base.state);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 08/10] drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (6 preceding siblings ...)
  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-03 18:38 ` 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
                   ` (10 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Convert a few hand roller for_each_intel_crtc_in_pipe_mask()
to the real thing.

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 9a7f40d17b79..6df498fc720a 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4069,14 +4069,12 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
 	u8 master_pipes = 0, slave_pipes = 0;
 	struct intel_crtc *crtc;
 
-	for_each_intel_crtc(&dev_priv->drm, crtc) {
+	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
+					 bigjoiner_pipes(dev_priv)) {
 		enum intel_display_power_domain power_domain;
 		enum pipe pipe = crtc->pipe;
 		intel_wakeref_t wakeref;
 
-		if ((bigjoiner_pipes(dev_priv) & BIT(pipe)) == 0)
-			continue;
-
 		power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
 		with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
 			u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
@@ -8993,10 +8991,8 @@ static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder)
 	struct intel_crtc *crtc;
 	u32 possible_crtcs = 0;
 
-	for_each_intel_crtc(dev, crtc) {
-		if (encoder->pipe_mask & BIT(crtc->pipe))
-			possible_crtcs |= drm_crtc_mask(&crtc->base);
-	}
+	for_each_intel_crtc_in_pipe_mask(dev, crtc, encoder->pipe_mask)
+		possible_crtcs |= drm_crtc_mask(&crtc->base);
 
 	return possible_crtcs;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 09/10] drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (7 preceding siblings ...)
  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-03 18:38 ` Ville Syrjala
  2022-02-09 20:00   ` Navare, Manasi
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask Ville Syrjala
                   ` (9 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Return both the master and slave pipe bitmasks from
enabled_bigjoiner_pipes(). We'll have use for both during
readout soon.

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

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 6df498fc720a..34b6b4ab3a1b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4064,11 +4064,14 @@ static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,
 	return tmp & TRANS_DDI_FUNC_ENABLE;
 }
 
-static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
+static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
+				    u8 *master_pipes, u8 *slave_pipes)
 {
-	u8 master_pipes = 0, slave_pipes = 0;
 	struct intel_crtc *crtc;
 
+	*master_pipes = 0;
+	*slave_pipes = 0;
+
 	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
 					 bigjoiner_pipes(dev_priv)) {
 		enum intel_display_power_domain power_domain;
@@ -4083,9 +4086,9 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
 				continue;
 
 			if (tmp & MASTER_BIG_JOINER_ENABLE)
-				master_pipes |= BIT(pipe);
+				*master_pipes |= BIT(pipe);
 			else
-				slave_pipes |= BIT(pipe);
+				*slave_pipes |= BIT(pipe);
 		}
 
 		if (DISPLAY_VER(dev_priv) < 13)
@@ -4096,18 +4099,16 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
 			u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
 
 			if (tmp & UNCOMPRESSED_JOINER_MASTER)
-				master_pipes |= BIT(pipe);
+				*master_pipes |= BIT(pipe);
 			if (tmp & UNCOMPRESSED_JOINER_SLAVE)
-				slave_pipes |= BIT(pipe);
+				*slave_pipes |= BIT(pipe);
 		}
 	}
 
 	/* Bigjoiner pipes should always be consecutive master and slave */
-	drm_WARN(&dev_priv->drm, slave_pipes != master_pipes << 1,
+	drm_WARN(&dev_priv->drm, *slave_pipes != *master_pipes << 1,
 		 "Bigjoiner misconfigured (master pipes 0x%x, slave pipes 0x%x)\n",
-		 master_pipes, slave_pipes);
-
-	return slave_pipes;
+		 *master_pipes, *slave_pipes);
 }
 
 static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
@@ -4126,6 +4127,7 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 	u8 panel_transcoder_mask = hsw_panel_transcoders(dev_priv);
 	enum transcoder cpu_transcoder;
+	u8 master_pipes, slave_pipes;
 	u8 enabled_transcoders = 0;
 
 	/*
@@ -4177,7 +4179,8 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
 		enabled_transcoders |= BIT(cpu_transcoder);
 
 	/* bigjoiner slave -> consider the master pipe's transcoder as well */
-	if (enabled_bigjoiner_pipes(dev_priv) & BIT(crtc->pipe)) {
+	enabled_bigjoiner_pipes(dev_priv, &master_pipes, &slave_pipes);
+	if (slave_pipes & BIT(crtc->pipe)) {
 		cpu_transcoder = (enum transcoder) crtc->pipe - 1;
 		if (transcoder_ddi_func_is_enabled(dev_priv, cpu_transcoder))
 			enabled_transcoders |= BIT(cpu_transcoder);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (8 preceding siblings ...)
  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-03 18:38 ` Ville Syrjala
  2022-02-04 23:58   ` Navare, Manasi
  2022-02-03 18:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking Patchwork
                   ` (8 subsequent siblings)
  18 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-03 18:38 UTC (permalink / raw)
  To: intel-gfx

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

Get rid of the inflexible bigjoiner_linked_crtc pointer thing
and just track things as a bitmask of pipes instead. We can
also nuke the bigjoiner_slave boolean as the role of the pipe
can be determined from its position in the bitmask.

It might be possible to nuke the bigjoiner boolean as well
if we make encoder.compute_config() do the bitmask assignment
directly for the master pipe. But for now I left that alone so
that encoer.compute_config() will just flag the state as needing
bigjoiner, and the intel_atomic_check_bigjoiner() is still
responsible for determining the bitmask. But that may have to change
as the encoder may be in the best position to determine how
exactly we should populate the bitmask.

Most places that just looked at the single bigjoiner_linked_crtc
now iterate over the whole bitmask, eliminating the singular
slave pipe assumption.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 .../gpu/drm/i915/display/intel_atomic_plane.c |   5 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |  12 +-
 drivers/gpu/drm/i915/display/intel_display.c  | 305 ++++++++++++------
 drivers/gpu/drm/i915/display/intel_display.h  |   2 +
 .../drm/i915/display/intel_display_debugfs.c  |   5 +-
 .../drm/i915/display/intel_display_types.h    |   7 +-
 .../drm/i915/display/intel_plane_initial.c    |   7 -
 drivers/gpu/drm/i915/display/intel_vdsc.c     |  43 ---
 drivers/gpu/drm/i915/display/intel_vdsc.h     |   1 -
 9 files changed, 227 insertions(+), 160 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index 41d52889dfce..0e15fe908855 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -404,9 +404,10 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
 		intel_atomic_get_new_crtc_state(state, crtc);
 
 	if (new_crtc_state && intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
+		struct intel_crtc *master_crtc =
+			intel_master_crtc(new_crtc_state);
 		struct intel_plane *master_plane =
-			intel_crtc_get_plane(new_crtc_state->bigjoiner_linked_crtc,
-					     plane->id);
+			intel_crtc_get_plane(master_crtc, plane->id);
 
 		new_master_plane_state =
 			intel_atomic_get_new_plane_state(state, master_plane);
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index 3f0e1e127595..9dee12986991 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -2703,6 +2703,7 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
 	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
 	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
 	bool is_tc_port = intel_phy_is_tc(dev_priv, phy);
+	struct intel_crtc *slave_crtc;
 
 	if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST)) {
 		intel_crtc_vblank_off(old_crtc_state);
@@ -2721,9 +2722,8 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
 			ilk_pfit_disable(old_crtc_state);
 	}
 
-	if (old_crtc_state->bigjoiner_linked_crtc) {
-		struct intel_crtc *slave_crtc =
-			old_crtc_state->bigjoiner_linked_crtc;
+	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
+					 intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
 		const struct intel_crtc_state *old_slave_crtc_state =
 			intel_atomic_get_old_crtc_state(state, slave_crtc);
 
@@ -3041,6 +3041,7 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
 			 struct intel_encoder *encoder,
 			 struct intel_crtc *crtc)
 {
+	struct drm_i915_private *i915 = to_i915(state->base.dev);
 	struct intel_crtc_state *crtc_state =
 		crtc ? intel_atomic_get_new_crtc_state(state, crtc) : NULL;
 	int required_lanes = crtc_state ? crtc_state->lane_count : 1;
@@ -3050,11 +3051,12 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
 	intel_tc_port_get_link(enc_to_dig_port(encoder),
 		               required_lanes);
 	if (crtc_state && crtc_state->hw.active) {
-		struct intel_crtc *slave_crtc = crtc_state->bigjoiner_linked_crtc;
+		struct intel_crtc *slave_crtc;
 
 		intel_update_active_dpll(state, crtc, encoder);
 
-		if (slave_crtc)
+		for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
+						 intel_crtc_bigjoiner_slave_pipes(crtc_state))
 			intel_update_active_dpll(state, slave_crtc, encoder);
 	}
 }
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 34b6b4ab3a1b..f5fc283f8f73 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -337,20 +337,38 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
 		is_trans_port_sync_slave(crtc_state);
 }
 
+static enum pipe bigjoiner_master_pipe(const struct intel_crtc_state *crtc_state)
+{
+	return ffs(crtc_state->bigjoiner_pipes) - 1;
+}
+
+u8 intel_crtc_bigjoiner_slave_pipes(const struct intel_crtc_state *crtc_state)
+{
+	return crtc_state->bigjoiner_pipes & ~BIT(bigjoiner_master_pipe(crtc_state));
+}
+
 bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
 {
-	return crtc_state->bigjoiner_slave;
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+	return crtc_state->bigjoiner_pipes &&
+		crtc->pipe != bigjoiner_master_pipe(crtc_state);
 }
 
 bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
 {
-	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+	return crtc_state->bigjoiner_pipes &&
+		crtc->pipe == bigjoiner_master_pipe(crtc_state);
 }
 
-static struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
+struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
 {
+	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
+
 	if (intel_crtc_is_bigjoiner_slave(crtc_state))
-		return crtc_state->bigjoiner_linked_crtc;
+		return intel_crtc_for_pipe(i915, bigjoiner_master_pipe(crtc_state));
 	else
 		return to_intel_crtc(crtc_state->uapi.crtc);
 }
@@ -4111,6 +4129,37 @@ static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
 		 *master_pipes, *slave_pipes);
 }
 
+static enum pipe get_bigjoiner_master_pipe(enum pipe pipe, u8 master_pipes, u8 slave_pipes)
+{
+	if ((slave_pipes & BIT(pipe)) == 0)
+		return pipe;
+
+	/* ignore everything above our pipe */
+	master_pipes &= ~GENMASK(7, pipe);
+
+	/* highest remaining bit should be our master pipe */
+	return fls(master_pipes) - 1;
+}
+
+static u8 get_bigjoiner_slave_pipes(enum pipe pipe, u8 master_pipes, u8 slave_pipes)
+{
+	enum pipe master_pipe, next_master_pipe;
+
+	master_pipe = get_bigjoiner_master_pipe(pipe, master_pipes, slave_pipes);
+
+	if ((master_pipes & BIT(master_pipe)) == 0)
+		return 0;
+
+	/* ignore our master pipe and everything below it */
+	master_pipes &= ~GENMASK(master_pipe, 0);
+	/* make sure a high bit is set for the ffs() */
+	master_pipes |= BIT(7);
+	/* lowest remaining bit should be the next master pipe */
+	next_master_pipe = ffs(master_pipes) - 1;
+
+	return slave_pipes & GENMASK(next_master_pipe - 1, master_pipe);
+}
+
 static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
 {
 	u8 panel_transcoder_mask = BIT(TRANSCODER_EDP);
@@ -4181,7 +4230,8 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
 	/* bigjoiner slave -> consider the master pipe's transcoder as well */
 	enabled_bigjoiner_pipes(dev_priv, &master_pipes, &slave_pipes);
 	if (slave_pipes & BIT(crtc->pipe)) {
-		cpu_transcoder = (enum transcoder) crtc->pipe - 1;
+		cpu_transcoder = (enum transcoder)
+			get_bigjoiner_master_pipe(crtc->pipe, master_pipes, slave_pipes);
 		if (transcoder_ddi_func_is_enabled(dev_priv, cpu_transcoder))
 			enabled_transcoders |= BIT(cpu_transcoder);
 	}
@@ -4306,6 +4356,24 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc,
 	return transcoder_is_dsi(pipe_config->cpu_transcoder);
 }
 
+static void intel_bigjoiner_get_config(struct intel_crtc_state *crtc_state)
+{
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+	u8 master_pipes, slave_pipes;
+	enum pipe pipe = crtc->pipe;
+
+	enabled_bigjoiner_pipes(i915, &master_pipes, &slave_pipes);
+
+	if (((master_pipes | slave_pipes) & BIT(pipe)) == 0)
+		return;
+
+	crtc_state->bigjoiner = true;
+	crtc_state->bigjoiner_pipes =
+		BIT(get_bigjoiner_master_pipe(pipe, master_pipes, slave_pipes)) |
+		get_bigjoiner_slave_pipes(pipe, master_pipes, slave_pipes);
+}
+
 static bool hsw_get_pipe_config(struct intel_crtc *crtc,
 				struct intel_crtc_state *pipe_config)
 {
@@ -4332,8 +4400,7 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc,
 		goto out;
 
 	intel_dsc_get_config(pipe_config);
-	if (DISPLAY_VER(dev_priv) >= 13 && !pipe_config->dsc.compression_enable)
-		intel_uncompressed_joiner_get_config(pipe_config);
+	intel_bigjoiner_get_config(pipe_config);
 
 	if (!transcoder_is_dsi(pipe_config->cpu_transcoder) ||
 	    DISPLAY_VER(dev_priv) >= 11)
@@ -5615,9 +5682,10 @@ static void intel_dump_pipe_config(const struct intel_crtc_state *pipe_config,
 		    transcoder_name(pipe_config->master_transcoder),
 		    pipe_config->sync_mode_slaves_mask);
 
-	drm_dbg_kms(&dev_priv->drm, "bigjoiner: %s\n",
+	drm_dbg_kms(&dev_priv->drm, "bigjoiner: %s, pipes: 0x%x\n",
 		    intel_crtc_is_bigjoiner_slave(pipe_config) ? "slave" :
-		    intel_crtc_is_bigjoiner_master(pipe_config) ? "master" : "no");
+		    intel_crtc_is_bigjoiner_master(pipe_config) ? "master" : "no",
+		    pipe_config->bigjoiner_pipes);
 
 	drm_dbg_kms(&dev_priv->drm, "splitter: %s, link count %d, overlap %d\n",
 		    enableddisabled(pipe_config->splitter.enable),
@@ -6699,8 +6767,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
 	PIPE_CONF_CHECK_X(sync_mode_slaves_mask);
 	PIPE_CONF_CHECK_I(master_transcoder);
 	PIPE_CONF_CHECK_BOOL(bigjoiner);
-	PIPE_CONF_CHECK_BOOL(bigjoiner_slave);
-	PIPE_CONF_CHECK_P(bigjoiner_linked_crtc);
+	PIPE_CONF_CHECK_X(bigjoiner_pipes);
 
 	PIPE_CONF_CHECK_I(dsc.compression_enable);
 	PIPE_CONF_CHECK_I(dsc.dsc_split);
@@ -7486,20 +7553,25 @@ static int intel_crtc_add_bigjoiner_planes(struct intel_atomic_state *state,
 
 static int intel_bigjoiner_add_affected_planes(struct intel_atomic_state *state)
 {
+	struct drm_i915_private *i915 = to_i915(state->base.dev);
 	const struct intel_crtc_state *crtc_state;
 	struct intel_crtc *crtc;
 	int i;
 
 	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
-		int ret;
+		struct intel_crtc *other;
 
-		if (!crtc_state->bigjoiner)
-			continue;
+		for_each_intel_crtc_in_pipe_mask(&i915->drm, other,
+						 crtc_state->bigjoiner_pipes) {
+			int ret;
 
-		ret = intel_crtc_add_bigjoiner_planes(state, crtc,
-						      crtc_state->bigjoiner_linked_crtc);
-		if (ret)
-			return ret;
+			if (crtc == other)
+				continue;
+
+			ret = intel_crtc_add_bigjoiner_planes(state, crtc, other);
+			if (ret)
+				return ret;
+		}
 	}
 
 	return 0;
@@ -7601,84 +7673,123 @@ static bool intel_cpu_transcoders_need_modeset(struct intel_atomic_state *state,
 	return false;
 }
 
+static bool intel_pipes_need_modeset(struct intel_atomic_state *state,
+				     u8 pipes)
+{
+	const struct intel_crtc_state *new_crtc_state;
+	struct intel_crtc *crtc;
+	int i;
+
+	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
+		if (new_crtc_state->hw.enable &&
+		    pipes & BIT(crtc->pipe) &&
+		    intel_crtc_needs_modeset(new_crtc_state))
+			return true;
+	}
+
+	return false;
+}
+
 static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 					struct intel_crtc *master_crtc)
 {
 	struct drm_i915_private *i915 = to_i915(state->base.dev);
 	struct intel_crtc_state *master_crtc_state =
 		intel_atomic_get_new_crtc_state(state, master_crtc);
-	struct intel_crtc_state *slave_crtc_state;
 	struct intel_crtc *slave_crtc;
+	u8 slave_pipes;
 
-	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
-	WARN_ON(intel_crtc_is_bigjoiner_slave(master_crtc_state));
+	/*
+	 * TODO: encoder.compute_config() may be the best
+	 * place to populate the bitmask for the master crtc.
+	 * For now encoder.compute_config() just flags things
+	 * as needing bigjoiner and we populate the bitmask
+	 * here.
+	 */
+	WARN_ON(master_crtc_state->bigjoiner_pipes);
 
 	if (!master_crtc_state->bigjoiner)
 		return 0;
 
-	slave_crtc = intel_dsc_get_bigjoiner_secondary(master_crtc);
-	if (!slave_crtc) {
+	slave_pipes = BIT(master_crtc->pipe + 1);
+
+	if (slave_pipes & ~bigjoiner_pipes(i915)) {
 		drm_dbg_kms(&i915->drm,
-			    "[CRTC:%d:%s] Big joiner configuration requires "
-			    "CRTC + 1 to be used, doesn't exist\n",
+			    "[CRTC:%d:%s] Cannot act as big joiner master "
+			    "(need 0x%x as slave pipes, only 0x%x possible)\n",
+			    master_crtc->base.base.id, master_crtc->base.name,
+			    slave_pipes, bigjoiner_pipes(i915));
+		return -EINVAL;
+	}
+
+	for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc, slave_pipes) {
+		struct intel_crtc_state *slave_crtc_state;
+		int ret;
+
+		slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
+		if (IS_ERR(slave_crtc_state))
+			return PTR_ERR(slave_crtc_state);
+
+		/* master being enabled, slave was already configured? */
+		if (slave_crtc_state->uapi.enable) {
+			drm_dbg_kms(&i915->drm,
+				    "[CRTC:%d:%s] Slave is enabled as normal CRTC, but "
+				    "[CRTC:%d:%s] claiming this CRTC for bigjoiner.\n",
+				    slave_crtc->base.base.id, slave_crtc->base.name,
+				    master_crtc->base.base.id, master_crtc->base.name);
+			return -EINVAL;
+		}
+
+		/*
+		 * The state copy logic assumes the master crtc gets processed
+		 * before the slave crtc during the main compute_config loop.
+		 * This works because the crtcs are created in pipe order,
+		 * and the hardware requires master pipe < slave pipe as well.
+		 * Should that change we need to rethink the logic.
+		 */
+		if (WARN_ON(drm_crtc_index(&master_crtc->base) >
+			    drm_crtc_index(&slave_crtc->base)))
+			return -EINVAL;
+
+		drm_dbg_kms(&i915->drm,
+			    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
+			    slave_crtc->base.base.id, slave_crtc->base.name,
 			    master_crtc->base.base.id, master_crtc->base.name);
-		return -EINVAL;
+
+		master_crtc_state->bigjoiner_pipes =
+			BIT(master_crtc->pipe) | BIT(slave_crtc->pipe);
+		slave_crtc_state->bigjoiner_pipes =
+			BIT(master_crtc->pipe) | BIT(slave_crtc->pipe);
+
+		ret = copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
+		if (ret)
+			return ret;
 	}
 
-	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
-	if (IS_ERR(slave_crtc_state))
-		return PTR_ERR(slave_crtc_state);
-
-	/* master being enabled, slave was already configured? */
-	if (slave_crtc_state->uapi.enable)
-		goto claimed;
-
-	/*
-	 * The state copy logic assumes the master crtc gets processed
-	 * before the slave crtc during the main compute_config loop.
-	 * This works because the crtcs are created in pipe order,
-	 * and the hardware requires master pipe < slave pipe as well.
-	 * Should that change we need to rethink the logic.
-	 */
-	if (WARN_ON(drm_crtc_index(&master_crtc->base) > drm_crtc_index(&slave_crtc->base)))
-		return -EINVAL;
-
-	drm_dbg_kms(&i915->drm,
-		    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
-		    slave_crtc->base.base.id, slave_crtc->base.name,
-		    master_crtc->base.base.id, master_crtc->base.name);
-
-	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
-	master_crtc_state->bigjoiner_slave = false;
-
-	slave_crtc_state->bigjoiner_linked_crtc = master_crtc;
-	slave_crtc_state->bigjoiner_slave = true;
-
-	return copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
-
-claimed:
-	drm_dbg_kms(&i915->drm,
-		    "[CRTC:%d:%s] Slave is enabled as normal CRTC, but "
-		    "[CRTC:%d:%s] claiming this CRTC for bigjoiner.\n",
-		    slave_crtc->base.base.id, slave_crtc->base.name,
-		    master_crtc->base.base.id, master_crtc->base.name);
-	return -EINVAL;
+	return 0;
 }
 
 static void kill_bigjoiner_slave(struct intel_atomic_state *state,
 				 struct intel_crtc *master_crtc)
 {
+	struct drm_i915_private *i915 = to_i915(state->base.dev);
 	struct intel_crtc_state *master_crtc_state =
 		intel_atomic_get_new_crtc_state(state, master_crtc);
-	struct intel_crtc *slave_crtc = master_crtc_state->bigjoiner_linked_crtc;
-	struct intel_crtc_state *slave_crtc_state =
-		intel_atomic_get_new_crtc_state(state, slave_crtc);
+	struct intel_crtc *slave_crtc;
 
-	slave_crtc_state->bigjoiner = master_crtc_state->bigjoiner = false;
-	slave_crtc_state->bigjoiner_slave = master_crtc_state->bigjoiner_slave = false;
-	slave_crtc_state->bigjoiner_linked_crtc = master_crtc_state->bigjoiner_linked_crtc = NULL;
+	for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
+					 intel_crtc_bigjoiner_slave_pipes(master_crtc_state)) {
+		struct intel_crtc_state *slave_crtc_state =
+			intel_atomic_get_new_crtc_state(state, slave_crtc);
 
-	intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
+		slave_crtc_state->bigjoiner = false;
+		slave_crtc_state->bigjoiner_pipes = 0;
+
+		intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
+	}
+
+	master_crtc_state->bigjoiner = false;
+	master_crtc_state->bigjoiner_pipes = 0;
 }
 
 /**
@@ -7828,34 +7939,37 @@ static int intel_atomic_check_async(struct intel_atomic_state *state, struct int
 
 static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
 {
+	struct drm_i915_private *i915 = to_i915(state->base.dev);
 	struct intel_crtc_state *crtc_state;
 	struct intel_crtc *crtc;
+	u8 affected_pipes = 0;
+	u8 modeset_pipes = 0;
 	int i;
 
 	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
-		struct intel_crtc_state *linked_crtc_state;
-		struct intel_crtc *linked_crtc;
+		affected_pipes |= crtc_state->bigjoiner_pipes;
+		if (intel_crtc_needs_modeset(crtc_state))
+			modeset_pipes |= crtc_state->bigjoiner_pipes;
+	}
+
+	for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, affected_pipes) {
+		crtc_state = intel_atomic_get_crtc_state(&state->base, crtc);
+		if (IS_ERR(crtc_state))
+			return PTR_ERR(crtc_state);
+	}
+
+	for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, modeset_pipes) {
 		int ret;
 
-		if (!crtc_state->bigjoiner)
-			continue;
+		crtc_state = intel_atomic_get_new_crtc_state(state, crtc);
 
-		linked_crtc = crtc_state->bigjoiner_linked_crtc;
-		linked_crtc_state = intel_atomic_get_crtc_state(&state->base, linked_crtc);
-		if (IS_ERR(linked_crtc_state))
-			return PTR_ERR(linked_crtc_state);
+		crtc_state->uapi.mode_changed = true;
 
-		if (!intel_crtc_needs_modeset(crtc_state))
-			continue;
-
-		linked_crtc_state->uapi.mode_changed = true;
-
-		ret = drm_atomic_add_affected_connectors(&state->base,
-							 &linked_crtc->base);
+		ret = drm_atomic_add_affected_connectors(&state->base, &crtc->base);
 		if (ret)
 			return ret;
 
-		ret = intel_atomic_add_affected_planes(state, linked_crtc);
+		ret = intel_atomic_add_affected_planes(state, crtc);
 		if (ret)
 			return ret;
 	}
@@ -7985,10 +8099,7 @@ static int intel_atomic_check(struct drm_device *dev,
 		}
 
 		if (new_crtc_state->bigjoiner) {
-			struct intel_crtc_state *linked_crtc_state =
-				intel_atomic_get_new_crtc_state(state, new_crtc_state->bigjoiner_linked_crtc);
-
-			if (intel_crtc_needs_modeset(linked_crtc_state)) {
+			if (intel_pipes_need_modeset(state, new_crtc_state->bigjoiner_pipes)) {
 				new_crtc_state->uapi.mode_changed = true;
 				new_crtc_state->update_pipe = false;
 			}
@@ -10390,12 +10501,18 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
 
 			/* read out to slave crtc as well for bigjoiner */
 			if (crtc_state->bigjoiner) {
+				struct intel_crtc *slave_crtc;
+
 				/* encoder should read be linked to bigjoiner master */
 				WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
 
-				crtc = crtc_state->bigjoiner_linked_crtc;
-				crtc_state = to_intel_crtc_state(crtc->base.state);
-				intel_encoder_get_config(encoder, crtc_state);
+				for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
+								 intel_crtc_bigjoiner_slave_pipes(crtc_state)) {
+					struct intel_crtc_state *slave_crtc_state;
+
+					slave_crtc_state = to_intel_crtc_state(slave_crtc->base.state);
+					intel_encoder_get_config(encoder, slave_crtc_state);
+				}
 			}
 		} else {
 			encoder->base.crtc = NULL;
diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index fe9eb3acee65..d8c5c507f54b 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -557,6 +557,8 @@ enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
 bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
 bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
 bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
+u8 intel_crtc_bigjoiner_slave_pipes(const struct intel_crtc_state *crtc_state);
+struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state);
 
 void intel_plane_destroy(struct drm_plane *plane);
 void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state);
diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
index 053c74afe721..1738a4050773 100644
--- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
+++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
@@ -936,9 +936,8 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
 	}
 
 	if (crtc_state->bigjoiner)
-		seq_printf(m, "\tLinked to [CRTC:%d:%s] as a %s\n",
-			   crtc_state->bigjoiner_linked_crtc->base.base.id,
-			   crtc_state->bigjoiner_linked_crtc->base.name,
+		seq_printf(m, "\tLinked to 0x%x pipes as a %s\n",
+			   crtc_state->bigjoiner_pipes,
 			   intel_crtc_is_bigjoiner_slave(crtc_state) ? "slave" : "master");
 
 	for_each_intel_encoder_mask(&dev_priv->drm, encoder,
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index 60e15226a8cb..641ecae42198 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1202,11 +1202,8 @@ struct intel_crtc_state {
 	/* enable pipe big joiner? */
 	bool bigjoiner;
 
-	/* big joiner slave crtc? */
-	bool bigjoiner_slave;
-
-	/* linked crtc for bigjoiner, either slave or master */
-	struct intel_crtc *bigjoiner_linked_crtc;
+	/* big joiner pipe bitmask */
+	u8 bigjoiner_pipes;
 
 	/* Display Stream compression state */
 	struct {
diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c
index e4186a0b8edb..542227d6d2f9 100644
--- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
+++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
@@ -165,8 +165,6 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
 {
 	struct drm_device *dev = crtc->base.dev;
 	struct drm_i915_private *dev_priv = to_i915(dev);
-	struct intel_crtc_state *crtc_state =
-		to_intel_crtc_state(crtc->base.state);
 	struct intel_plane *plane =
 		to_intel_plane(crtc->base.primary);
 	struct intel_plane_state *plane_state =
@@ -203,11 +201,6 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
 	 * pretend the BIOS never had it enabled.
 	 */
 	intel_plane_disable_noatomic(crtc, plane);
-	if (crtc_state->bigjoiner) {
-		struct intel_crtc *slave =
-			crtc_state->bigjoiner_linked_crtc;
-		intel_plane_disable_noatomic(slave, to_intel_plane(slave->base.primary));
-	}
 
 	return;
 
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
index b83b59cf2b78..545eff5bf158 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.c
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
@@ -1107,18 +1107,6 @@ static i915_reg_t dss_ctl2_reg(struct intel_crtc *crtc, enum transcoder cpu_tran
 		ICL_PIPE_DSS_CTL2(crtc->pipe) : DSS_CTL2;
 }
 
-struct intel_crtc *
-intel_dsc_get_bigjoiner_secondary(const struct intel_crtc *primary_crtc)
-{
-	return intel_crtc_for_pipe(to_i915(primary_crtc->base.dev), primary_crtc->pipe + 1);
-}
-
-static struct intel_crtc *
-intel_dsc_get_bigjoiner_primary(const struct intel_crtc *secondary_crtc)
-{
-	return intel_crtc_for_pipe(to_i915(secondary_crtc->base.dev), secondary_crtc->pipe - 1);
-}
-
 void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
 {
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
@@ -1174,25 +1162,6 @@ void intel_dsc_disable(const struct intel_crtc_state *old_crtc_state)
 	}
 }
 
-void intel_uncompressed_joiner_get_config(struct intel_crtc_state *crtc_state)
-{
-	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
-	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
-	u32 dss_ctl1;
-
-	dss_ctl1 = intel_de_read(dev_priv, dss_ctl1_reg(crtc, crtc_state->cpu_transcoder));
-	if (dss_ctl1 & UNCOMPRESSED_JOINER_MASTER) {
-		crtc_state->bigjoiner = true;
-		crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
-		drm_WARN_ON(&dev_priv->drm, !crtc_state->bigjoiner_linked_crtc);
-	} else if (dss_ctl1 & UNCOMPRESSED_JOINER_SLAVE) {
-		crtc_state->bigjoiner = true;
-		crtc_state->bigjoiner_slave = true;
-		crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_primary(crtc);
-		drm_WARN_ON(&dev_priv->drm, !crtc_state->bigjoiner_linked_crtc);
-	}
-}
-
 void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
 {
 	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
@@ -1223,18 +1192,6 @@ void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
 	crtc_state->dsc.dsc_split = (dss_ctl2 & RIGHT_BRANCH_VDSC_ENABLE) &&
 		(dss_ctl1 & JOINER_ENABLE);
 
-	if (dss_ctl1 & BIG_JOINER_ENABLE) {
-		crtc_state->bigjoiner = true;
-
-		if (!(dss_ctl1 & MASTER_BIG_JOINER_ENABLE)) {
-			crtc_state->bigjoiner_slave = true;
-			crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_primary(crtc);
-		} else {
-			crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
-		}
-		drm_WARN_ON(&dev_priv->drm, !crtc_state->bigjoiner_linked_crtc);
-	}
-
 	/* FIXME: add more state readout as needed */
 
 	/* PPS1 */
diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.h b/drivers/gpu/drm/i915/display/intel_vdsc.h
index 4ec75f715986..8763f00fa7e2 100644
--- a/drivers/gpu/drm/i915/display/intel_vdsc.h
+++ b/drivers/gpu/drm/i915/display/intel_vdsc.h
@@ -18,7 +18,6 @@ void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
 void intel_dsc_enable(const struct intel_crtc_state *crtc_state);
 void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
 int intel_dsc_compute_params(struct intel_crtc_state *pipe_config);
-void intel_uncompressed_joiner_get_config(struct intel_crtc_state *crtc_state);
 void intel_dsc_get_config(struct intel_crtc_state *crtc_state);
 enum intel_display_power_domain
 intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (9 preceding siblings ...)
  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-03 18:50 ` Patchwork
  2022-02-03 18:51 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-03 18:50 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking
URL   : https://patchwork.freedesktop.org/series/99680/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
9451ce773538 drm/i915: Flag crtc scaling_filter changes as modeset
a1b2697d7287 drm/i915: Fix bigjoiner state copy fails
30f3289be9ea drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
eb369188b6f9 drm/i915: Clean up the bigjoiner state copy logic
b8c9664a64ec drm/i915: Nuke some dead code
c7593cfe9487 drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
-:46: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#46: 
+ intel_crtc_is_bigjoiner_slave(S) ? E1 : intel_crtc_is_bigjoiner_master(S) ? E2 : E3

total: 0 errors, 1 warnings, 0 checks, 222 lines checked
530e8b8b8894 drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead
-:31: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#31: FILE: drivers/gpu/drm/i915/display/intel_display.h:433:
+#define for_each_intel_crtc_in_pipe_mask(dev, intel_crtc, pipe_mask)	\
 	list_for_each_entry(intel_crtc,					\
 			    &(dev)->mode_config.crtc_list,		\
 			    base.head)					\
+		for_each_if((pipe_mask) & BIT(intel_crtc->pipe))

-:31: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'intel_crtc' - possible side-effects?
#31: FILE: drivers/gpu/drm/i915/display/intel_display.h:433:
+#define for_each_intel_crtc_in_pipe_mask(dev, intel_crtc, pipe_mask)	\
 	list_for_each_entry(intel_crtc,					\
 			    &(dev)->mode_config.crtc_list,		\
 			    base.head)					\
+		for_each_if((pipe_mask) & BIT(intel_crtc->pipe))

total: 1 errors, 0 warnings, 1 checks, 139 lines checked
d5dfb430dc97 drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
2a5f134f4a89 drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
e91cede7c36e drm/i915: Change bigjoiner state tracking to use the pipe bitmask
-:528: WARNING:LONG_LINE: line length of 112 exceeds 100 columns
#528: FILE: drivers/gpu/drm/i915/display/intel_display.c:10510:
+								 intel_crtc_bigjoiner_slave_pipes(crtc_state)) {

-:531: WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#531: FILE: drivers/gpu/drm/i915/display/intel_display.c:10513:
+					slave_crtc_state = to_intel_crtc_state(slave_crtc->base.state);

total: 0 errors, 2 warnings, 0 checks, 597 lines checked



^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Use a bitmask for bigjoiner state tracking
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (10 preceding siblings ...)
  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 ` Patchwork
  2022-02-03 19:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-03 18:51 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking
URL   : https://patchwork.freedesktop.org/series/99680/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.



^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use a bitmask for bigjoiner state tracking
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (11 preceding siblings ...)
  2022-02-03 18:51 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
@ 2022-02-03 19:19 ` Patchwork
  2022-02-03 21:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-03 19:19 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 6358 bytes --]

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking
URL   : https://patchwork.freedesktop.org/series/99680/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11185 -> Patchwork_22171
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/index.html

Participating hosts (49 -> 42)
------------------------------

  Missing    (7): fi-kbl-soraka fi-bdw-5557u shard-tglu fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 

Known issues
------------

  Here are the changes found in Patchwork_22171 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-6:          NOTRUN -> [DMESG-FAIL][1] ([i915#4957])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/bat-dg1-6/igt@i915_selftest@live@hangcheck.html
    - bat-dg1-5:          [PASS][2] -> [DMESG-FAIL][3] ([i915#4494] / [i915#4957])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
    - fi-hsw-4770:        [PASS][4] -> [INCOMPLETE][5] ([i915#3303])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@requests:
    - fi-blb-e6850:       [PASS][6] -> [DMESG-FAIL][7] ([i915#5026])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/fi-blb-e6850/igt@i915_selftest@live@requests.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-blb-e6850/igt@i915_selftest@live@requests.html

  * igt@kms_psr@primary_page_flip:
    - fi-skl-6600u:       [PASS][8] -> [INCOMPLETE][9] ([i915#4838])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/fi-skl-6600u/igt@kms_psr@primary_page_flip.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-skl-6600u/igt@kms_psr@primary_page_flip.html

  * igt@runner@aborted:
    - fi-hsw-4770:        NOTRUN -> [FAIL][10] ([fdo#109271] / [i915#1436] / [i915#4312])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-hsw-4770/igt@runner@aborted.html
    - fi-blb-e6850:       NOTRUN -> [FAIL][11] ([fdo#109271] / [i915#2403] / [i915#2426] / [i915#4312])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-blb-e6850/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@gt_engines:
    - bat-dg1-6:          [INCOMPLETE][12] ([i915#4418]) -> [PASS][13]
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/bat-dg1-6/igt@i915_selftest@live@gt_engines.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/bat-dg1-6/igt@i915_selftest@live@gt_engines.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-skl-6700k2:      [DMESG-FAIL][14] ([i915#2291] / [i915#541]) -> [PASS][15]
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/fi-skl-6700k2/igt@i915_selftest@live@gt_heartbeat.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-skl-6700k2/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@gt_pm:
    - fi-tgl-1115g4:      [DMESG-FAIL][16] ([i915#3987]) -> [PASS][17]
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - fi-cfl-8109u:       [DMESG-WARN][18] ([i915#295]) -> [PASS][19]
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/fi-cfl-8109u/igt@kms_force_connector_basic@prune-stale-modes.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/fi-cfl-8109u/igt@kms_force_connector_basic@prune-stale-modes.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#1436]: https://gitlab.freedesktop.org/drm/intel/issues/1436
  [i915#2291]: https://gitlab.freedesktop.org/drm/intel/issues/2291
  [i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
  [i915#3987]: https://gitlab.freedesktop.org/drm/intel/issues/3987
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4418]: https://gitlab.freedesktop.org/drm/intel/issues/4418
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
  [i915#4838]: https://gitlab.freedesktop.org/drm/intel/issues/4838
  [i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
  [i915#5026]: https://gitlab.freedesktop.org/drm/intel/issues/5026
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541


Build changes
-------------

  * Linux: CI_DRM_11185 -> Patchwork_22171

  CI-20190529: 20190529
  CI_DRM_11185: 40bd6069e8af4f23b824157534613e92e600226f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6339: 9cd99d763440ae75d9981ce4e361d3deb5edb4e4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22171: e91cede7c36e59d78da69a3435c28bbb8d8eea87 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

e91cede7c36e drm/i915: Change bigjoiner state tracking to use the pipe bitmask
2a5f134f4a89 drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
d5dfb430dc97 drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
530e8b8b8894 drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead
c7593cfe9487 drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
b8c9664a64ec drm/i915: Nuke some dead code
eb369188b6f9 drm/i915: Clean up the bigjoiner state copy logic
30f3289be9ea drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
a1b2697d7287 drm/i915: Fix bigjoiner state copy fails
9451ce773538 drm/i915: Flag crtc scaling_filter changes as modeset

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/index.html

[-- Attachment #2: Type: text/html, Size: 7443 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Use a bitmask for bigjoiner state tracking
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (12 preceding siblings ...)
  2022-02-03 19:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2022-02-03 21:18 ` Patchwork
  2022-02-04  7:33 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking (rev3) Patchwork
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-03 21:18 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 28186 bytes --]

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking
URL   : https://patchwork.freedesktop.org/series/99680/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11185_full -> Patchwork_22171_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_22171_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22171_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_22171_full:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@live@gem_contexts:
    - shard-skl:          [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl8/igt@i915_selftest@live@gem_contexts.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl3/igt@i915_selftest@live@gem_contexts.html

  
Known issues
------------

  Here are the changes found in Patchwork_22171_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@many-contexts:
    - shard-glk:          [PASS][3] -> [DMESG-WARN][4] ([i915#118])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-glk5/igt@gem_ctx_persistence@many-contexts.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-glk1/igt@gem_ctx_persistence@many-contexts.html

  * igt@gem_exec_balancer@parallel-keep-submit-fence:
    - shard-iclb:         [PASS][5] -> [SKIP][6] ([i915#4525]) +2 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb4/igt@gem_exec_balancer@parallel-keep-submit-fence.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb5/igt@gem_exec_balancer@parallel-keep-submit-fence.html

  * igt@gem_exec_capture@pi@rcs0:
    - shard-skl:          [PASS][7] -> [INCOMPLETE][8] ([i915#4547])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl6/igt@gem_exec_capture@pi@rcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl9/igt@gem_exec_capture@pi@rcs0.html

  * igt@gem_exec_fair@basic-deadline:
    - shard-kbl:          NOTRUN -> [FAIL][9] ([i915#2846])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl3/igt@gem_exec_fair@basic-deadline.html
    - shard-apl:          NOTRUN -> [FAIL][10] ([i915#2846])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl4/igt@gem_exec_fair@basic-deadline.html

  * igt@gem_exec_fair@basic-flow@rcs0:
    - shard-tglb:         [PASS][11] -> [FAIL][12] ([i915#2842])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-tglb7/igt@gem_exec_fair@basic-flow@rcs0.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-tglb6/igt@gem_exec_fair@basic-flow@rcs0.html

  * igt@gem_exec_fair@basic-pace@rcs0:
    - shard-kbl:          [PASS][13] -> [FAIL][14] ([i915#2842])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-kbl6/igt@gem_exec_fair@basic-pace@rcs0.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl4/igt@gem_exec_fair@basic-pace@rcs0.html
    - shard-iclb:         NOTRUN -> [FAIL][15] ([i915#2842]) +2 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb7/igt@gem_exec_fair@basic-pace@rcs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-iclb:         [PASS][16] -> [FAIL][17] ([i915#2849])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb1/igt@gem_exec_fair@basic-throttle@rcs0.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb3/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_lmem_swapping@verify-random:
    - shard-skl:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#4613]) +3 similar issues
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl7/igt@gem_lmem_swapping@verify-random.html

  * igt@gem_pread@exhaustion:
    - shard-skl:          NOTRUN -> [WARN][19] ([i915#2658])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl7/igt@gem_pread@exhaustion.html

  * igt@i915_pm_dc@dc6-dpms:
    - shard-skl:          NOTRUN -> [FAIL][20] ([i915#454])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl2/igt@i915_pm_dc@dc6-dpms.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          NOTRUN -> [INCOMPLETE][21] ([i915#3921])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-snb6/igt@i915_selftest@live@hangcheck.html

  * igt@kms_big_fb@linear-16bpp-rotate-90:
    - shard-apl:          NOTRUN -> [SKIP][22] ([fdo#109271]) +19 similar issues
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl4/igt@kms_big_fb@linear-16bpp-rotate-90.html

  * igt@kms_big_fb@linear-32bpp-rotate-270:
    - shard-snb:          NOTRUN -> [SKIP][23] ([fdo#109271]) +48 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-snb6/igt@kms_big_fb@linear-32bpp-rotate-270.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][24] ([i915#3743]) +3 similar issues
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl6/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180:
    - shard-glk:          [PASS][25] -> [FAIL][26] ([i915#1888])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-glk5/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-glk6/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
    - shard-skl:          NOTRUN -> [SKIP][27] ([fdo#109271] / [i915#3777]) +2 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl7/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html

  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc:
    - shard-skl:          NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#3886]) +12 similar issues
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl4/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
    - shard-kbl:          NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#3886])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl3/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html
    - shard-apl:          NOTRUN -> [SKIP][30] ([fdo#109271] / [i915#3886])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl4/igt@kms_ccs@pipe-c-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@dp-edid-change-during-suspend:
    - shard-apl:          NOTRUN -> [SKIP][31] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl4/igt@kms_chamelium@dp-edid-change-during-suspend.html
    - shard-kbl:          NOTRUN -> [SKIP][32] ([fdo#109271] / [fdo#111827]) +1 similar issue
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl3/igt@kms_chamelium@dp-edid-change-during-suspend.html

  * igt@kms_chamelium@vga-hpd-after-suspend:
    - shard-skl:          NOTRUN -> [SKIP][33] ([fdo#109271] / [fdo#111827]) +27 similar issues
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl6/igt@kms_chamelium@vga-hpd-after-suspend.html

  * igt@kms_color_chamelium@pipe-d-gamma:
    - shard-snb:          NOTRUN -> [SKIP][34] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-snb6/igt@kms_color_chamelium@pipe-d-gamma.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x170-random:
    - shard-iclb:         NOTRUN -> [SKIP][35] ([fdo#109278] / [fdo#109279])
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb7/igt@kms_cursor_crc@pipe-c-cursor-512x170-random.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-iclb:         [PASS][36] -> [FAIL][37] ([i915#2346])
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb1/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size:
    - shard-skl:          NOTRUN -> [FAIL][38] ([i915#2346] / [i915#533])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl10/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@pipe-d-torture-bo:
    - shard-skl:          NOTRUN -> [SKIP][39] ([fdo#109271] / [i915#533]) +1 similar issue
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl9/igt@kms_cursor_legacy@pipe-d-torture-bo.html

  * igt@kms_fbcon_fbt@fbc-suspend:
    - shard-apl:          [PASS][40] -> [INCOMPLETE][41] ([i915#180] / [i915#1982])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl2/igt@kms_fbcon_fbt@fbc-suspend.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl4/igt@kms_fbcon_fbt@fbc-suspend.html

  * igt@kms_flip@2x-flip-vs-modeset-vs-hang:
    - shard-kbl:          NOTRUN -> [SKIP][42] ([fdo#109271]) +15 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl3/igt@kms_flip@2x-flip-vs-modeset-vs-hang.html

  * igt@kms_flip@flip-vs-expired-vblank@b-dp1:
    - shard-apl:          [PASS][43] -> [FAIL][44] ([i915#79])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl7/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl2/igt@kms_flip@flip-vs-expired-vblank@b-dp1.html

  * igt@kms_flip@flip-vs-fences-interruptible@a-edp1:
    - shard-skl:          NOTRUN -> [DMESG-WARN][45] ([i915#1982])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl2/igt@kms_flip@flip-vs-fences-interruptible@a-edp1.html

  * igt@kms_flip@plain-flip-ts-check-interruptible@c-edp1:
    - shard-skl:          [PASS][46] -> [FAIL][47] ([i915#2122])
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl6/igt@kms_flip@plain-flip-ts-check-interruptible@c-edp1.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl1/igt@kms_flip@plain-flip-ts-check-interruptible@c-edp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling:
    - shard-iclb:         [PASS][48] -> [SKIP][49] ([i915#3701])
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb6/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-downscaling.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling:
    - shard-glk:          [PASS][50] -> [FAIL][51] ([i915#4911])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-glk6/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-glk8/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-blt:
    - shard-skl:          NOTRUN -> [SKIP][52] ([fdo#109271]) +306 similar issues
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl8/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-pgflip-blt:
    - shard-iclb:         NOTRUN -> [SKIP][53] ([fdo#109280])
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-pgflip-blt.html

  * igt@kms_hdr@bpc-switch-dpms:
    - shard-skl:          NOTRUN -> [FAIL][54] ([i915#1188]) +1 similar issue
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl9/igt@kms_hdr@bpc-switch-dpms.html

  * igt@kms_hdr@bpc-switch-suspend:
    - shard-apl:          [PASS][55] -> [DMESG-WARN][56] ([i915#180]) +1 similar issue
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl3/igt@kms_hdr@bpc-switch-suspend.html
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl8/igt@kms_hdr@bpc-switch-suspend.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb:
    - shard-skl:          NOTRUN -> [FAIL][57] ([i915#265]) +1 similar issue
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl6/igt@kms_plane_alpha_blend@pipe-a-alpha-transparent-fb.html

  * igt@kms_plane_alpha_blend@pipe-b-alpha-7efc:
    - shard-skl:          NOTRUN -> [FAIL][58] ([fdo#108145] / [i915#265]) +2 similar issues
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl9/igt@kms_plane_alpha_blend@pipe-b-alpha-7efc.html

  * igt@kms_psr2_su@frontbuffer-xrgb8888:
    - shard-skl:          NOTRUN -> [SKIP][59] ([fdo#109271] / [i915#658]) +1 similar issue
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl6/igt@kms_psr2_su@frontbuffer-xrgb8888.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][60] -> [SKIP][61] ([fdo#109441]) +1 similar issue
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb8/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@kms_setmode@basic:
    - shard-glk:          [PASS][62] -> [FAIL][63] ([i915#31])
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-glk2/igt@kms_setmode@basic.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-glk3/igt@kms_setmode@basic.html

  * igt@kms_writeback@writeback-pixel-formats:
    - shard-skl:          NOTRUN -> [SKIP][64] ([fdo#109271] / [i915#2437]) +1 similar issue
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl1/igt@kms_writeback@writeback-pixel-formats.html

  * igt@sysfs_clients@sema-10:
    - shard-skl:          NOTRUN -> [SKIP][65] ([fdo#109271] / [i915#2994]) +5 similar issues
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl8/igt@sysfs_clients@sema-10.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@preservation-s3@bcs0:
    - shard-apl:          [DMESG-WARN][66] ([i915#180]) -> [PASS][67] +2 similar issues
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl8/igt@gem_ctx_isolation@preservation-s3@bcs0.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl3/igt@gem_ctx_isolation@preservation-s3@bcs0.html

  * igt@gem_exec_balancer@parallel-out-fence:
    - shard-iclb:         [SKIP][68] ([i915#4525]) -> [PASS][69] +1 similar issue
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb6/igt@gem_exec_balancer@parallel-out-fence.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb1/igt@gem_exec_balancer@parallel-out-fence.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [FAIL][70] ([i915#2842]) -> [PASS][71]
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb7/igt@gem_exec_fair@basic-none-share@rcs0.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb4/igt@gem_exec_fair@basic-none-share@rcs0.html
    - shard-tglb:         [FAIL][72] ([i915#2842]) -> [PASS][73]
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-tglb1/igt@gem_exec_fair@basic-none-share@rcs0.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-tglb8/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - shard-apl:          [FAIL][74] ([i915#2842]) -> [PASS][75]
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl6/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl2/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [FAIL][76] ([i915#2842]) -> [PASS][77] +4 similar issues
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-kbl6/igt@gem_exec_fair@basic-pace@vecs0.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl4/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_suspend@basic-s3@smem:
    - shard-skl:          [INCOMPLETE][78] ([i915#4547]) -> [PASS][79]
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl7/igt@gem_exec_suspend@basic-s3@smem.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl10/igt@gem_exec_suspend@basic-s3@smem.html

  * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a:
    - {shard-tglu}:       [FAIL][80] ([i915#3825]) -> [PASS][81]
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-tglu-2/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-tglu-1/igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-hdmi-a.html

  * igt@i915_suspend@debugfs-reader:
    - shard-kbl:          [DMESG-WARN][82] ([i915#180]) -> [PASS][83]
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-kbl4/igt@i915_suspend@debugfs-reader.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-kbl3/igt@i915_suspend@debugfs-reader.html

  * igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
    - shard-iclb:         [FAIL][84] ([i915#2346]) -> [PASS][85]
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb5/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html

  * igt@kms_fbcon_fbt@fbc:
    - {shard-tglu}:       [FAIL][86] ([i915#64]) -> [PASS][87]
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-tglu-3/igt@kms_fbcon_fbt@fbc.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-tglu-8/igt@kms_fbcon_fbt@fbc.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-downscaling:
    - shard-iclb:         [SKIP][88] ([i915#3701]) -> [PASS][89]
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-downscaling.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb4/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-downscaling.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [FAIL][90] ([fdo#108145] / [i915#265]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl1/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl4/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [SKIP][92] ([fdo#109441]) -> [PASS][93] +1 similar issue
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb3/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html

  
#### Warnings ####

  * igt@i915_pm_rc6_residency@rc6-idle:
    - shard-iclb:         [WARN][94] ([i915#1804] / [i915#2684]) -> [WARN][95] ([i915#2684])
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb3/igt@i915_pm_rc6_residency@rc6-idle.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb2/igt@i915_pm_rc6_residency@rc6-idle.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
    - shard-glk:          [SKIP][96] ([fdo#109271] / [i915#1888] / [i915#3777]) -> [SKIP][97] ([fdo#109271] / [i915#3777])
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-glk4/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-glk1/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html

  * igt@kms_psr2_sf@overlay-plane-update-continuous-sf:
    - shard-iclb:         [SKIP][98] ([i915#2920]) -> [SKIP][99] ([fdo#111068] / [i915#658])
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-continuous-sf.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb8/igt@kms_psr2_sf@overlay-plane-update-continuous-sf.html

  * igt@kms_psr2_su@page_flip-p010:
    - shard-iclb:         [SKIP][100] ([fdo#109642] / [fdo#111068] / [i915#658]) -> [FAIL][101] ([i915#4148])
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-iclb3/igt@kms_psr2_su@page_flip-p010.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-iclb2/igt@kms_psr2_su@page_flip-p010.html

  * igt@runner@aborted:
    - shard-apl:          ([FAIL][102], [FAIL][103], [FAIL][104], [FAIL][105], [FAIL][106]) ([fdo#109271] / [i915#180] / [i915#1814] / [i915#3002] / [i915#4312]) -> ([FAIL][107], [FAIL][108], [FAIL][109], [FAIL][110], [FAIL][111]) ([i915#180] / [i915#3002] / [i915#4312])
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl8/igt@runner@aborted.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl1/igt@runner@aborted.html
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl8/igt@runner@aborted.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl2/igt@runner@aborted.html
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-apl8/igt@runner@aborted.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl7/igt@runner@aborted.html
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl8/igt@runner@aborted.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl7/igt@runner@aborted.html
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl3/igt@runner@aborted.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-apl4/igt@runner@aborted.html
    - shard-skl:          ([FAIL][112], [FAIL][113], [FAIL][114]) ([i915#3002] / [i915#4312]) -> ([FAIL][115], [FAIL][116], [FAIL][117], [FAIL][118]) ([i915#2029] / [i915#3002] / [i915#4312])
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl9/igt@runner@aborted.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl6/igt@runner@aborted.html
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11185/shard-skl3/igt@runner@aborted.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl2/igt@runner@aborted.html
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl1/igt@runner@aborted.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl1/igt@runner@aborted.html
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/shard-skl9/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#109279]: https://bugs.freedesktop.org/show_bug.cgi?id=109279
  [fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#118]: https://gitlab.freedesktop.org/drm/intel/issues/118
  [i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
  [i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
  [i915#1804]: https://gitlab.freedesktop.org/drm/intel/issues/1804
  [i915#1814]: https://gitlab.freedesktop.org/drm/intel/issues/1814
  [i915#1888]: https://gitlab.freedesktop.org/drm/intel/issues/1888
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2029]: https://gitlab.freedesktop.org/drm/intel/issues/2029
  [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122
  [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
  [i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
  [i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
  [i915#2658]: https://gitlab.freedesktop.org/drm/intel/issues/2658
  [i915#2684]: https://gitlab.freedesktop.org/drm/intel/issues/2684
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
  [i915#2849]: https://gitlab.freedesktop.org/drm/intel/issues/2849
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
  [i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
  [i915#3063]: https://gitlab.freedesktop.org/drm/intel/issues/3063
  [i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
  [i915#3648]: https://gitlab.freedesktop.org/drm/intel/issues/3648
  [i915#3701]: https://gitlab.freedesktop.org/drm/intel/issues/3701
  [i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
  [i915#3777]: https://gitlab.freedesktop.org/drm/intel/issues/3777
  [i915#3825]: https://gitlab.freedesktop.org/drm/intel/issues/3825
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#4148]: https://gitlab.freedesktop.org/drm/intel/issues/4148
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4911]: https://gitlab.freedesktop.org/drm/intel/issues/4911
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#64]: https://gitlab.freedesktop.org/drm/intel/issues/64
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79


Build changes
-------------

  * Linux: CI_DRM_11185 -> Patchwork_22171

  CI-20190529: 20190529
  CI_DRM_11185: 40bd6069e8af4f23b824157534613e92e600226f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6339: 9cd99d763440ae75d9981ce4e361d3deb5edb4e4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22171: e91cede7c36e59d78da69a3435c28bbb8d8eea87 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22171/index.html

[-- Attachment #2: Type: text/html, Size: 34634 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 01/10] drm/i915: Flag crtc scaling_filter changes as modeset
  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ä
  0 siblings, 1 reply; 41+ messages in thread
From: Navare, Manasi @ 2022-02-03 21:58 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:14PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The core doesn't flag scaling_filter prop changes as needing
> a modeset. That doesn't work for us since we only reprogram the
> pipe scaler during full modesets and fastsets. So we need to
> flag the prop change as a modeset ourselves. Assuming nothing else
> has changed the operation will get promoted (demoted?) to a fastset
> later.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Makes sense, although not sure why this was sent as part of bigjoiner bitmask series

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index df347329d90e..85dce8a093d4 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7846,6 +7846,10 @@ static int intel_atomic_check(struct drm_device *dev,
>  					    new_crtc_state, i) {
>  		if (new_crtc_state->inherited != old_crtc_state->inherited)
>  			new_crtc_state->uapi.mode_changed = true;
> +
> +		if (new_crtc_state->uapi.scaling_filter !=
> +		    old_crtc_state->uapi.scaling_filter)
> +			new_crtc_state->uapi.mode_changed = true;
>  	}
>  
>  	intel_vrr_check_modeset(state);
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Ville Syrjala
@ 2022-02-03 22:13   ` Navare, Manasi
  2022-02-04  7:05     ` Ville Syrjälä
  2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
  1 sibling, 1 reply; 41+ messages in thread
From: Navare, Manasi @ 2022-02-03 22:13 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:15PM +0200, Ville Syrjala wrote:
> 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;

Since in this function we are copying from uapi_to_hw_state, is this the right function to copy to uapi state ?


>  		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;

This looks good

Manasi

> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 03/10] drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
  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
  0 siblings, 0 replies; 41+ messages in thread
From: Navare, Manasi @ 2022-02-03 22:20 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:16PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> There's some weird junk in intel_atomic_check_bigjoiner()
> that's trying to look at the old crtc state's bigjoiner
> usage for some reason. That code is totally unnecessary,
> and maybe even actively harmful. Not entirely sure which
> since it's such a mess that I can't actually wrap my brain
> around what it ends up doing.
> 
> Either way, thanks to intel_bigjoiner_add_affected_crtcs()
> all of the old bigjoiner crtcs are guaranteed to be in the
> state already if any one of them is in the state. Also if
> any one of those crtcs got flagged for a modeset, then all
> of them will have been flagged, and the bigjoiner links
> will have been detached via kill_bigjoiner_slave().
> 
> So there is no need to look examing any old bigjoiner
> usage in intel_atomic_check_bigjoiner(). All we have to care
> about is whether bigjoiner is needed for the new state,
> and whether we can get the slave crtc we need.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Completely agree with this cleanup, makes it so much easier to add new future code

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 33 +++++++-------------
>  1 file changed, 11 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 2006eec6e166..b5701ca57889 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7584,38 +7584,28 @@ static bool intel_cpu_transcoders_need_modeset(struct intel_atomic_state *state,
>  }
>  
>  static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
> -					struct intel_crtc *crtc,
> -					struct intel_crtc_state *old_crtc_state,
> -					struct intel_crtc_state *new_crtc_state)
> +					struct intel_crtc *master_crtc)
>  {
>  	struct drm_i915_private *i915 = to_i915(state->base.dev);
> -	struct intel_crtc_state *slave_crtc_state, *master_crtc_state;
> -	struct intel_crtc *slave_crtc, *master_crtc;
> +	struct intel_crtc_state *master_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, master_crtc);
> +	struct intel_crtc_state *slave_crtc_state;
> +	struct intel_crtc *slave_crtc;
>  
> -	/* slave being enabled, is master is still claiming this crtc? */
> -	if (old_crtc_state->bigjoiner_slave) {
> -		slave_crtc = crtc;
> -		master_crtc = old_crtc_state->bigjoiner_linked_crtc;
> -		master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
> -		if (!master_crtc_state || !intel_crtc_needs_modeset(master_crtc_state))
> -			goto claimed;
> -	}
> -
> -	if (!new_crtc_state->bigjoiner)
> +	if (!master_crtc_state->bigjoiner)
>  		return 0;
>  
> -	slave_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
> +	slave_crtc = intel_dsc_get_bigjoiner_secondary(master_crtc);
>  	if (!slave_crtc) {
>  		drm_dbg_kms(&i915->drm,
>  			    "[CRTC:%d:%s] Big joiner configuration requires "
>  			    "CRTC + 1 to be used, doesn't exist\n",
> -			    crtc->base.base.id, crtc->base.name);
> +			    master_crtc->base.base.id, master_crtc->base.name);
>  		return -EINVAL;
>  	}
>  
> -	new_crtc_state->bigjoiner_linked_crtc = slave_crtc;
> +	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
>  	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
> -	master_crtc = crtc;
>  	if (IS_ERR(slave_crtc_state))
>  		return PTR_ERR(slave_crtc_state);
>  
> @@ -7627,7 +7617,7 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  		    "[CRTC:%d:%s] Used as slave for big joiner\n",
>  		    slave_crtc->base.base.id, slave_crtc->base.name);
>  
> -	return copy_bigjoiner_crtc_state(slave_crtc_state, new_crtc_state);
> +	return copy_bigjoiner_crtc_state(slave_crtc_state, master_crtc_state);
>  
>  claimed:
>  	drm_dbg_kms(&i915->drm,
> @@ -7899,8 +7889,7 @@ static int intel_atomic_check(struct drm_device *dev,
>  		if (ret)
>  			goto fail;
>  
> -		ret = intel_atomic_check_bigjoiner(state, crtc, old_crtc_state,
> -						   new_crtc_state);
> +		ret = intel_atomic_check_bigjoiner(state, crtc);
>  		if (ret)
>  			goto fail;
>  	}
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 01/10] drm/i915: Flag crtc scaling_filter changes as modeset
  2022-02-03 21:58   ` Navare, Manasi
@ 2022-02-04  6:53     ` Ville Syrjälä
  0 siblings, 0 replies; 41+ messages in thread
From: Ville Syrjälä @ 2022-02-04  6:53 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 01:58:01PM -0800, Navare, Manasi wrote:
> On Thu, Feb 03, 2022 at 08:38:14PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > The core doesn't flag scaling_filter prop changes as needing
> > a modeset. That doesn't work for us since we only reprogram the
> > pipe scaler during full modesets and fastsets. So we need to
> > flag the prop change as a modeset ourselves. Assuming nothing else
> > has changed the operation will get promoted (demoted?) to a fastset
> > later.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Makes sense, although not sure why this was sent as part of bigjoiner bitmask series

Because I noticed it while examining the bigjoiner state copy mess.

> 
> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Thanks.

> 
> Manasi
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index df347329d90e..85dce8a093d4 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -7846,6 +7846,10 @@ static int intel_atomic_check(struct drm_device *dev,
> >  					    new_crtc_state, i) {
> >  		if (new_crtc_state->inherited != old_crtc_state->inherited)
> >  			new_crtc_state->uapi.mode_changed = true;
> > +
> > +		if (new_crtc_state->uapi.scaling_filter !=
> > +		    old_crtc_state->uapi.scaling_filter)
> > +			new_crtc_state->uapi.mode_changed = true;
> >  	}
> >  
> >  	intel_vrr_check_modeset(state);
> > -- 
> > 2.34.1
> > 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails
  2022-02-03 22:13   ` Navare, Manasi
@ 2022-02-04  7:05     ` Ville Syrjälä
  0 siblings, 0 replies; 41+ messages in thread
From: Ville Syrjälä @ 2022-02-04  7:05 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 02:13:41PM -0800, Navare, Manasi wrote:
> On Thu, Feb 03, 2022 at 08:38:15PM +0200, Ville Syrjala wrote:
> > 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;
> 
> Since in this function we are copying from uapi_to_hw_state, is this the right function to copy to uapi state ?

These *_changed flags aren't really state. They're just
ephemeral properties of the atomic transaction to indicate what
has changed since last time. I've occasionally pondered about
moving all them to  live as bitmasks in the top level 
drm_atomic_state instead to make that more clear, but haven't
actually gotten bored enough to do it. Also there are other things
hanging off the various state objects that arent really part of the
state proper either.

> 
> 
> >  		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,

Just noticed a copy pasta fail here...

> > +				  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;
> 
> This looks good
> 
> Manasi
> 
> > -- 
> > 2.34.1
> > 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH v2 02/10] drm/i915: Fix bigjoiner state copy fails
  2022-02-03 18:38 ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Ville Syrjala
  2022-02-03 22:13   ` Navare, Manasi
@ 2022-02-04  7:20   ` Ville Syrjala
  2022-02-04 20:58     ` Navare, Manasi
  1 sibling, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-04  7:20 UTC (permalink / raw)
  To: intel-gfx

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.

v2: Fix uapi.ctm vs. hw.ctm copy-paste fail

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..4f5f023417a6 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->hw.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


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] [PATCH v2 04/10] drm/i915: Clean up the bigjoiner state copy logic
  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   ` Ville Syrjala
  2022-02-04 20:52     ` Navare, Manasi
  0 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjala @ 2022-02-04  7:20 UTC (permalink / raw)
  To: intel-gfx

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

Currently the bigjoiner state copy logic is kind of
a byzantine mess.

Clean it up to operate in the following manner during a full
modeset:
1) master uapi -> hw state copy
2) master hw -> slave hw state copy

And during a non-modeset update we do:
1) master uapi -> hw state light copy
2) master hw -> slave hw state light copy

I think that is now easier to reason about since we never do
any kind of master uapi -> slave hw state copy short circuit
that could happen previously.

Obviously this does now depend on the master uapi->hw copy
always happening before the master hw -> slave hw copy, but
that is guaranteed by the fact that we always add both crtcs
to the state early, the crtcs are registered in pipe
order (so the compute_config loop happens in pipe order),
and the hardware requires the master pipe has to be lower
than the slave pipe as well. And for good measure we shall
add a check+WARN for this before doing the bigjoiner crtc
assignment.

v2: Fix uapi.ctm vs. hw.ctm copy-paste fail

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic.c  |  11 --
 drivers/gpu/drm/i915/display/intel_atomic.h  |   2 -
 drivers/gpu/drm/i915/display/intel_display.c | 170 ++++++++++++-------
 3 files changed, 108 insertions(+), 75 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
index 093904065112..e0667d163266 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic.c
@@ -281,17 +281,6 @@ void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state)
 	intel_crtc_put_color_blobs(crtc_state);
 }
 
-void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
-				 const struct intel_crtc_state *from_crtc_state)
-{
-	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
-				  from_crtc_state->uapi.degamma_lut);
-	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
-				  from_crtc_state->uapi.gamma_lut);
-	drm_property_replace_blob(&crtc_state->hw.ctm,
-				  from_crtc_state->uapi.ctm);
-}
-
 /**
  * intel_crtc_destroy_state - destroy crtc state
  * @crtc: drm crtc
diff --git a/drivers/gpu/drm/i915/display/intel_atomic.h b/drivers/gpu/drm/i915/display/intel_atomic.h
index d2700c74c9da..1dc439983dd9 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic.h
+++ b/drivers/gpu/drm/i915/display/intel_atomic.h
@@ -44,8 +44,6 @@ struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
 void intel_crtc_destroy_state(struct drm_crtc *crtc,
 			       struct drm_crtc_state *state);
 void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
-void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
-				 const struct intel_crtc_state *from_crtc_state);
 struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
 void intel_atomic_state_free(struct drm_atomic_state *state);
 void intel_atomic_state_clear(struct drm_atomic_state *state);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 349cc3807e8b..b391cb98b12f 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5818,32 +5818,37 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)
 
 static void
 intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
-					   struct intel_crtc_state *crtc_state)
+					   struct intel_crtc *crtc)
 {
-	const struct intel_crtc_state *master_crtc_state;
-	struct intel_crtc *master_crtc;
+	struct intel_crtc_state *crtc_state =
+		intel_atomic_get_new_crtc_state(state, crtc);
 
-	master_crtc = intel_master_crtc(crtc_state);
-	master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
+	WARN_ON(crtc_state->bigjoiner_slave);
 
-	/* No need to copy state if the master state is unchanged */
-	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);
-	}
+	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
+				  crtc_state->uapi.degamma_lut);
+	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
+				  crtc_state->uapi.gamma_lut);
+	drm_property_replace_blob(&crtc_state->hw.ctm,
+				  crtc_state->uapi.ctm);
 }
 
 static void
-intel_crtc_copy_uapi_to_hw_state(struct intel_atomic_state *state,
-				 struct intel_crtc_state *crtc_state)
+intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
+					 struct intel_crtc *crtc)
 {
+	struct intel_crtc_state *crtc_state =
+		intel_atomic_get_new_crtc_state(state, crtc);
+
+	WARN_ON(crtc_state->bigjoiner_slave);
+
 	crtc_state->hw.enable = crtc_state->uapi.enable;
 	crtc_state->hw.active = crtc_state->uapi.active;
 	crtc_state->hw.mode = crtc_state->uapi.mode;
 	crtc_state->hw.adjusted_mode = crtc_state->uapi.adjusted_mode;
 	crtc_state->hw.scaling_filter = crtc_state->uapi.scaling_filter;
 
-	intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc_state);
+	intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
 }
 
 static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state)
@@ -5859,7 +5864,6 @@ static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state
 	crtc_state->uapi.adjusted_mode = crtc_state->hw.adjusted_mode;
 	crtc_state->uapi.scaling_filter = crtc_state->hw.scaling_filter;
 
-	/* copy color blobs to uapi */
 	drm_property_replace_blob(&crtc_state->uapi.degamma_lut,
 				  crtc_state->hw.degamma_lut);
 	drm_property_replace_blob(&crtc_state->uapi.gamma_lut,
@@ -5868,61 +5872,79 @@ static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state
 				  crtc_state->hw.ctm);
 }
 
+static void
+copy_bigjoiner_crtc_state_nomodeset(struct intel_atomic_state *state,
+				    struct intel_crtc *slave_crtc)
+{
+	struct intel_crtc_state *slave_crtc_state =
+		intel_atomic_get_new_crtc_state(state, slave_crtc);
+	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
+	const struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
+
+	drm_property_replace_blob(&slave_crtc_state->hw.degamma_lut,
+				  master_crtc_state->hw.degamma_lut);
+	drm_property_replace_blob(&slave_crtc_state->hw.gamma_lut,
+				  master_crtc_state->hw.gamma_lut);
+	drm_property_replace_blob(&slave_crtc_state->hw.ctm,
+				  master_crtc_state->hw.ctm);
+
+	slave_crtc_state->uapi.color_mgmt_changed = master_crtc_state->uapi.color_mgmt_changed;
+}
+
 static int
-copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state,
-			  const struct intel_crtc_state *from_crtc_state)
+copy_bigjoiner_crtc_state_modeset(struct intel_atomic_state *state,
+				  struct intel_crtc *slave_crtc)
 {
+	struct intel_crtc_state *slave_crtc_state =
+		intel_atomic_get_new_crtc_state(state, slave_crtc);
+	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
+	const struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
 	struct intel_crtc_state *saved_state;
 
-	saved_state = kmemdup(from_crtc_state, sizeof(*saved_state), GFP_KERNEL);
+	saved_state = kmemdup(master_crtc_state, sizeof(*saved_state), GFP_KERNEL);
 	if (!saved_state)
 		return -ENOMEM;
 
-	saved_state->uapi = crtc_state->uapi;
-	saved_state->scaler_state = crtc_state->scaler_state;
-	saved_state->shared_dpll = crtc_state->shared_dpll;
-	saved_state->dpll_hw_state = crtc_state->dpll_hw_state;
-	saved_state->crc_enabled = crtc_state->crc_enabled;
+	/* preserve some things from the slave's original crtc state */
+	saved_state->uapi = slave_crtc_state->uapi;
+	saved_state->scaler_state = slave_crtc_state->scaler_state;
+	saved_state->shared_dpll = slave_crtc_state->shared_dpll;
+	saved_state->dpll_hw_state = slave_crtc_state->dpll_hw_state;
+	saved_state->crc_enabled = slave_crtc_state->crc_enabled;
 
-	intel_crtc_free_hw_state(crtc_state);
-	memcpy(crtc_state, saved_state, sizeof(*crtc_state));
+	intel_crtc_free_hw_state(slave_crtc_state);
+	memcpy(slave_crtc_state, saved_state, sizeof(*slave_crtc_state));
 	kfree(saved_state);
 
 	/* Re-init hw 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;
+	memset(&slave_crtc_state->hw, 0, sizeof(slave_crtc_state->hw));
+	slave_crtc_state->hw.enable = master_crtc_state->hw.enable;
+	slave_crtc_state->hw.active = master_crtc_state->hw.active;
+	slave_crtc_state->hw.mode = master_crtc_state->hw.mode;
+	slave_crtc_state->hw.pipe_mode = master_crtc_state->hw.pipe_mode;
+	slave_crtc_state->hw.adjusted_mode = master_crtc_state->hw.adjusted_mode;
+	slave_crtc_state->hw.scaling_filter = master_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->hw.ctm,
-				  from_crtc_state->hw.ctm);
+	copy_bigjoiner_crtc_state_nomodeset(state, slave_crtc);
 
 	/* 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;
-	crtc_state->cpu_transcoder = from_crtc_state->cpu_transcoder;
-	crtc_state->has_audio = from_crtc_state->has_audio;
+	slave_crtc_state->uapi.mode_changed = master_crtc_state->uapi.mode_changed;
+	slave_crtc_state->uapi.connectors_changed = master_crtc_state->uapi.connectors_changed;
+	slave_crtc_state->uapi.active_changed = master_crtc_state->uapi.active_changed;
+	slave_crtc_state->cpu_transcoder = master_crtc_state->cpu_transcoder;
+	slave_crtc_state->has_audio = master_crtc_state->has_audio;
 
 	return 0;
 }
 
 static int
 intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
-				 struct intel_crtc_state *crtc_state)
+				 struct intel_crtc *crtc)
 {
-	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+	struct intel_crtc_state *crtc_state =
+		intel_atomic_get_new_crtc_state(state, crtc);
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
 	struct intel_crtc_state *saved_state;
 
@@ -5952,7 +5974,7 @@ intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
 	memcpy(crtc_state, saved_state, sizeof(*crtc_state));
 	kfree(saved_state);
 
-	intel_crtc_copy_uapi_to_hw_state(state, crtc_state);
+	intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
 
 	return 0;
 }
@@ -7592,6 +7614,9 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 	struct intel_crtc_state *slave_crtc_state;
 	struct intel_crtc *slave_crtc;
 
+	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
+	WARN_ON(master_crtc_state->bigjoiner_slave);
+
 	if (!master_crtc_state->bigjoiner)
 		return 0;
 
@@ -7604,7 +7629,6 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 		return -EINVAL;
 	}
 
-	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
 	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
 	if (IS_ERR(slave_crtc_state))
 		return PTR_ERR(slave_crtc_state);
@@ -7613,11 +7637,28 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 	if (slave_crtc_state->uapi.enable)
 		goto claimed;
 
+	/*
+	 * The state copy logic assumes the master crtc gets processed
+	 * before the slave crtc during the main compute_config loop.
+	 * This works because the crtcs are created in pipe order,
+	 * and the hardware requires master pipe < slave pipe as well.
+	 * Should that change we need to rethink the logic.
+	 */
+	if (WARN_ON(drm_crtc_index(&master_crtc->base) > drm_crtc_index(&slave_crtc->base)))
+		return -EINVAL;
+
 	drm_dbg_kms(&i915->drm,
-		    "[CRTC:%d:%s] Used as slave for big joiner\n",
-		    slave_crtc->base.base.id, slave_crtc->base.name);
+		    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
+		    slave_crtc->base.base.id, slave_crtc->base.name,
+		    master_crtc->base.base.id, master_crtc->base.name);
 
-	return copy_bigjoiner_crtc_state(slave_crtc_state, master_crtc_state);
+	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
+	master_crtc_state->bigjoiner_slave = false;
+
+	slave_crtc_state->bigjoiner_linked_crtc = master_crtc;
+	slave_crtc_state->bigjoiner_slave = true;
+
+	return copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
 
 claimed:
 	drm_dbg_kms(&i915->drm,
@@ -7629,15 +7670,19 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
 }
 
 static void kill_bigjoiner_slave(struct intel_atomic_state *state,
-				 struct intel_crtc_state *master_crtc_state)
+				 struct intel_crtc *master_crtc)
 {
+	struct intel_crtc_state *master_crtc_state =
+		intel_atomic_get_new_crtc_state(state, master_crtc);
+	struct intel_crtc *slave_crtc = master_crtc_state->bigjoiner_linked_crtc;
 	struct intel_crtc_state *slave_crtc_state =
-		intel_atomic_get_new_crtc_state(state, master_crtc_state->bigjoiner_linked_crtc);
+		intel_atomic_get_new_crtc_state(state, slave_crtc);
 
 	slave_crtc_state->bigjoiner = master_crtc_state->bigjoiner = false;
 	slave_crtc_state->bigjoiner_slave = master_crtc_state->bigjoiner_slave = false;
 	slave_crtc_state->bigjoiner_linked_crtc = master_crtc_state->bigjoiner_linked_crtc = NULL;
-	intel_crtc_copy_uapi_to_hw_state(state, slave_crtc_state);
+
+	intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
 }
 
 /**
@@ -7823,7 +7868,7 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
 		/* Kill old bigjoiner link, we may re-establish afterwards */
 		if (intel_crtc_needs_modeset(crtc_state) &&
 		    crtc_state->bigjoiner && !crtc_state->bigjoiner_slave)
-			kill_bigjoiner_slave(state, crtc_state);
+			kill_bigjoiner_slave(state, crtc);
 	}
 
 	return 0;
@@ -7867,21 +7912,22 @@ static int intel_atomic_check(struct drm_device *dev,
 	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
 					    new_crtc_state, i) {
 		if (!intel_crtc_needs_modeset(new_crtc_state)) {
-			/* Light copy */
-			intel_crtc_copy_uapi_to_hw_state_nomodeset(state, new_crtc_state);
-
+			if (new_crtc_state->bigjoiner_slave)
+				copy_bigjoiner_crtc_state_nomodeset(state, crtc);
+			else
+				intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
 			continue;
 		}
 
 		if (!new_crtc_state->uapi.enable) {
 			if (!new_crtc_state->bigjoiner_slave) {
-				intel_crtc_copy_uapi_to_hw_state(state, new_crtc_state);
+				intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
 				any_ms = true;
 			}
 			continue;
 		}
 
-		ret = intel_crtc_prepare_cleared_state(state, new_crtc_state);
+		ret = intel_crtc_prepare_cleared_state(state, crtc);
 		if (ret)
 			goto fail;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (13 preceding siblings ...)
  2022-02-03 21:18 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2022-02-04  7:33 ` Patchwork
  2022-02-04  7:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-04  7:33 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
URL   : https://patchwork.freedesktop.org/series/99680/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
70bac4e4c094 drm/i915: Flag crtc scaling_filter changes as modeset
af5ef233b8e4 drm/i915: Fix bigjoiner state copy fails
414ad2151468 drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
1779ba955b06 drm/i915: Clean up the bigjoiner state copy logic
3dd5243283ec drm/i915: Nuke some dead code
5cb49a708185 drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
-:46: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#46: 
+ intel_crtc_is_bigjoiner_slave(S) ? E1 : intel_crtc_is_bigjoiner_master(S) ? E2 : E3

total: 0 errors, 1 warnings, 0 checks, 222 lines checked
71cb08d3ef98 drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead
-:31: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#31: FILE: drivers/gpu/drm/i915/display/intel_display.h:433:
+#define for_each_intel_crtc_in_pipe_mask(dev, intel_crtc, pipe_mask)	\
 	list_for_each_entry(intel_crtc,					\
 			    &(dev)->mode_config.crtc_list,		\
 			    base.head)					\
+		for_each_if((pipe_mask) & BIT(intel_crtc->pipe))

-:31: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'intel_crtc' - possible side-effects?
#31: FILE: drivers/gpu/drm/i915/display/intel_display.h:433:
+#define for_each_intel_crtc_in_pipe_mask(dev, intel_crtc, pipe_mask)	\
 	list_for_each_entry(intel_crtc,					\
 			    &(dev)->mode_config.crtc_list,		\
 			    base.head)					\
+		for_each_if((pipe_mask) & BIT(intel_crtc->pipe))

total: 1 errors, 0 warnings, 1 checks, 139 lines checked
abf4ac559145 drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
72702ca376f8 drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
d7ef79ee8751 drm/i915: Change bigjoiner state tracking to use the pipe bitmask
-:528: WARNING:LONG_LINE: line length of 112 exceeds 100 columns
#528: FILE: drivers/gpu/drm/i915/display/intel_display.c:10510:
+								 intel_crtc_bigjoiner_slave_pipes(crtc_state)) {

-:531: WARNING:LONG_LINE: line length of 103 exceeds 100 columns
#531: FILE: drivers/gpu/drm/i915/display/intel_display.c:10513:
+					slave_crtc_state = to_intel_crtc_state(slave_crtc->base.state);

total: 0 errors, 2 warnings, 0 checks, 597 lines checked



^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (14 preceding siblings ...)
  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 ` Patchwork
  2022-02-04  8:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-04  7:34 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
URL   : https://patchwork.freedesktop.org/series/99680/
State : warning

== Summary ==

$ dim sparse --fast origin/drm-tip
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.



^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (15 preceding siblings ...)
  2022-02-04  7:34 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
@ 2022-02-04  8:03 ` 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
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-04  8:03 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 9025 bytes --]

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
URL   : https://patchwork.freedesktop.org/series/99680/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_11188 -> Patchwork_22174
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/index.html

Participating hosts (52 -> 44)
------------------------------

  Missing    (8): shard-tglu fi-hsw-4200u fi-icl-u2 fi-bsw-cyan fi-ctg-p8600 shard-rkl shard-dg1 fi-bdw-samus 

Known issues
------------

  Here are the changes found in Patchwork_22174 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@amdgpu/amd_basic@semaphore:
    - fi-hsw-4770:        NOTRUN -> [SKIP][1] ([fdo#109271] / [fdo#109315]) +17 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-hsw-4770/igt@amdgpu/amd_basic@semaphore.html

  * igt@amdgpu/amd_cs_nop@sync-fork-compute0:
    - fi-snb-2600:        NOTRUN -> [SKIP][2] ([fdo#109271]) +17 similar issues
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-snb-2600/igt@amdgpu/amd_cs_nop@sync-fork-compute0.html

  * igt@gem_huc_copy@huc-copy:
    - fi-skl-6600u:       NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#2190])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@verify-random:
    - fi-skl-6600u:       NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 similar issues
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@gem_lmem_swapping@verify-random.html

  * igt@i915_selftest@live@requests:
    - fi-blb-e6850:       [PASS][5] -> [DMESG-FAIL][6] ([i915#4610])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-blb-e6850/igt@i915_selftest@live@requests.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-blb-e6850/igt@i915_selftest@live@requests.html

  * igt@kms_chamelium@vga-edid-read:
    - fi-skl-6600u:       NOTRUN -> [SKIP][7] ([fdo#109271] / [fdo#111827]) +8 similar issues
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@kms_chamelium@vga-edid-read.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - fi-skl-6600u:       NOTRUN -> [SKIP][8] ([fdo#109271]) +2 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d:
    - fi-skl-6600u:       NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#533])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-d.html

  * igt@kms_psr@primary_page_flip:
    - fi-skl-6600u:       NOTRUN -> [INCOMPLETE][10] ([i915#4547] / [i915#4838])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@kms_psr@primary_page_flip.html

  * igt@runner@aborted:
    - fi-blb-e6850:       NOTRUN -> [FAIL][11] ([fdo#109271] / [i915#2403] / [i915#2426] / [i915#4312])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-blb-e6850/igt@runner@aborted.html
    - fi-bdw-5557u:       NOTRUN -> [FAIL][12] ([i915#2426] / [i915#4312])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-bdw-5557u/igt@runner@aborted.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3@smem:
    - fi-skl-6600u:       [INCOMPLETE][13] ([i915#4547]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-skl-6600u/igt@gem_exec_suspend@basic-s3@smem.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@gem_exec_suspend@basic-s3@smem.html

  * igt@i915_selftest@live@gt_heartbeat:
    - fi-bsw-kefka:       [DMESG-FAIL][15] ([i915#541]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-bsw-kefka/igt@i915_selftest@live@gt_heartbeat.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-bsw-kefka/igt@i915_selftest@live@gt_heartbeat.html

  * igt@i915_selftest@live@hangcheck:
    - fi-hsw-4770:        [INCOMPLETE][17] ([i915#3303]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-hsw-4770/igt@i915_selftest@live@hangcheck.html
    - fi-snb-2600:        [INCOMPLETE][19] ([i915#3921]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-snb-2600/igt@i915_selftest@live@hangcheck.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-snb-2600/igt@i915_selftest@live@hangcheck.html

  * igt@i915_selftest@live@reset:
    - {bat-adlp-6}:       [DMESG-FAIL][21] ([i915#4983]) -> [PASS][22]
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/bat-adlp-6/igt@i915_selftest@live@reset.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/bat-adlp-6/igt@i915_selftest@live@reset.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-b:
    - fi-cfl-8109u:       [DMESG-WARN][23] ([i915#295]) -> [PASS][24] +12 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc-pipe-b.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc-pipe-b.html

  
#### Warnings ####

  * igt@i915_selftest@live@hangcheck:
    - bat-dg1-5:          [DMESG-FAIL][25] ([i915#4957]) -> [DMESG-FAIL][26] ([i915#4494] / [i915#4957])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/bat-dg1-5/igt@i915_selftest@live@hangcheck.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/bat-dg1-5/igt@i915_selftest@live@hangcheck.html

  * igt@runner@aborted:
    - fi-skl-6600u:       [FAIL][27] ([i915#4312]) -> [FAIL][28] ([i915#2722] / [i915#4312])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/fi-skl-6600u/igt@runner@aborted.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/fi-skl-6600u/igt@runner@aborted.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
  [i915#2403]: https://gitlab.freedesktop.org/drm/intel/issues/2403
  [i915#2426]: https://gitlab.freedesktop.org/drm/intel/issues/2426
  [i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
  [i915#295]: https://gitlab.freedesktop.org/drm/intel/issues/295
  [i915#3303]: https://gitlab.freedesktop.org/drm/intel/issues/3303
  [i915#3921]: https://gitlab.freedesktop.org/drm/intel/issues/3921
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4494]: https://gitlab.freedesktop.org/drm/intel/issues/4494
  [i915#4547]: https://gitlab.freedesktop.org/drm/intel/issues/4547
  [i915#4610]: https://gitlab.freedesktop.org/drm/intel/issues/4610
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4838]: https://gitlab.freedesktop.org/drm/intel/issues/4838
  [i915#4957]: https://gitlab.freedesktop.org/drm/intel/issues/4957
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541


Build changes
-------------

  * Linux: CI_DRM_11188 -> Patchwork_22174

  CI-20190529: 20190529
  CI_DRM_11188: 4aa02b40e13239b675b5b1ad5e6e69f2743c82c0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_6339: 9cd99d763440ae75d9981ce4e361d3deb5edb4e4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_22174: d7ef79ee8751323f0d43af1b5a0457293bbecdb4 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

d7ef79ee8751 drm/i915: Change bigjoiner state tracking to use the pipe bitmask
72702ca376f8 drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
abf4ac559145 drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
71cb08d3ef98 drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead
5cb49a708185 drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
3dd5243283ec drm/i915: Nuke some dead code
1779ba955b06 drm/i915: Clean up the bigjoiner state copy logic
414ad2151468 drm/i915: Remove weird code from intel_atomic_check_bigjoiner()
af5ef233b8e4 drm/i915: Fix bigjoiner state copy fails
70bac4e4c094 drm/i915: Flag crtc scaling_filter changes as modeset

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/index.html

[-- Attachment #2: Type: text/html, Size: 11000 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (16 preceding siblings ...)
  2022-02-04  8:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2022-02-04  9:22 ` Patchwork
  2022-02-15 22:34 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Use a bitmask for bigjoiner state tracking (rev4) Patchwork
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-04  9:22 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 30282 bytes --]

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking (rev3)
URL   : https://patchwork.freedesktop.org/series/99680/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_11188_full -> Patchwork_22174_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_22174_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_22174_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (13 -> 13)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_22174_full:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_selftest@mock@vma:
    - shard-skl:          NOTRUN -> [INCOMPLETE][1] +2 similar issues
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl1/igt@i915_selftest@mock@vma.html

  
Known issues
------------

  Here are the changes found in Patchwork_22174_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_persistence@idempotent:
    - shard-snb:          NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#1099])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-snb5/igt@gem_ctx_persistence@idempotent.html

  * igt@gem_exec_balancer@parallel-out-fence:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([i915#4525]) +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-iclb4/igt@gem_exec_balancer@parallel-out-fence.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb3/igt@gem_exec_balancer@parallel-out-fence.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-iclb:         NOTRUN -> [FAIL][5] ([i915#2842]) +4 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb5/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_fair@basic-pace@vecs0:
    - shard-kbl:          [PASS][6] -> [FAIL][7] ([i915#2842]) +1 similar issue
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-kbl4/igt@gem_exec_fair@basic-pace@vecs0.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl7/igt@gem_exec_fair@basic-pace@vecs0.html

  * igt@gem_exec_fair@basic-throttle@rcs0:
    - shard-glk:          [PASS][8] -> [FAIL][9] ([i915#2842])
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-glk5/igt@gem_exec_fair@basic-throttle@rcs0.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-glk2/igt@gem_exec_fair@basic-throttle@rcs0.html
    - shard-iclb:         [PASS][10] -> [FAIL][11] ([i915#2849])
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-iclb3/igt@gem_exec_fair@basic-throttle@rcs0.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb8/igt@gem_exec_fair@basic-throttle@rcs0.html

  * igt@gem_exec_whisper@basic-forked-all:
    - shard-glk:          [PASS][12] -> [DMESG-WARN][13] ([i915#118]) +1 similar issue
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-glk2/igt@gem_exec_whisper@basic-forked-all.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-glk8/igt@gem_exec_whisper@basic-forked-all.html

  * igt@gem_huc_copy@huc-copy:
    - shard-tglb:         [PASS][14] -> [SKIP][15] ([i915#2190])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-tglb1/igt@gem_huc_copy@huc-copy.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-tglb6/igt@gem_huc_copy@huc-copy.html

  * igt@gem_lmem_swapping@heavy-random:
    - shard-skl:          NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#4613]) +4 similar issues
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl1/igt@gem_lmem_swapping@heavy-random.html

  * igt@gem_lmem_swapping@verify-random:
    - shard-apl:          NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#4613])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl2/igt@gem_lmem_swapping@verify-random.html

  * igt@gem_pwrite@basic-exhaustion:
    - shard-skl:          NOTRUN -> [WARN][18] ([i915#2658])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl2/igt@gem_pwrite@basic-exhaustion.html

  * igt@gem_pxp@fail-invalid-protected-context:
    - shard-iclb:         NOTRUN -> [SKIP][19] ([i915#4270]) +1 similar issue
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@gem_pxp@fail-invalid-protected-context.html

  * igt@gem_render_copy@yf-tiled-to-vebox-x-tiled:
    - shard-kbl:          NOTRUN -> [SKIP][20] ([fdo#109271]) +29 similar issues
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl4/igt@gem_render_copy@yf-tiled-to-vebox-x-tiled.html

  * igt@gem_userptr_blits@dmabuf-sync:
    - shard-skl:          NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#3323])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl4/igt@gem_userptr_blits@dmabuf-sync.html

  * igt@gen9_exec_parse@valid-registers:
    - shard-iclb:         NOTRUN -> [SKIP][22] ([i915#2856])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@gen9_exec_parse@valid-registers.html

  * igt@i915_pm_dc@dc3co-vpb-simulation:
    - shard-skl:          NOTRUN -> [SKIP][23] ([fdo#109271] / [i915#658]) +1 similar issue
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl4/igt@i915_pm_dc@dc3co-vpb-simulation.html

  * igt@i915_pm_rpm@dpms-non-lpsp:
    - shard-iclb:         NOTRUN -> [SKIP][24] ([fdo#110892])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@i915_pm_rpm@dpms-non-lpsp.html

  * igt@i915_selftest@live@gt_pm:
    - shard-skl:          NOTRUN -> [DMESG-FAIL][25] ([i915#1886] / [i915#2291])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl7/igt@i915_selftest@live@gt_pm.html

  * igt@kms_atomic@atomic_plane_damage:
    - shard-iclb:         NOTRUN -> [SKIP][26] ([i915#4765])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_atomic@atomic_plane_damage.html

  * igt@kms_big_fb@linear-32bpp-rotate-90:
    - shard-iclb:         NOTRUN -> [SKIP][27] ([fdo#110725] / [fdo#111614]) +1 similar issue
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_big_fb@linear-32bpp-rotate-90.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][28] ([i915#3763])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl2/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-async-flip.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip:
    - shard-skl:          NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#3777]) +5 similar issues
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl2/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip:
    - shard-skl:          NOTRUN -> [FAIL][30] ([i915#3743]) +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl1/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-180-async-flip.html

  * igt@kms_big_joiner@2x-modeset:
    - shard-iclb:         NOTRUN -> [SKIP][31] ([i915#2705])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_big_joiner@2x-modeset.html

  * igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
    - shard-kbl:          NOTRUN -> [SKIP][32] ([fdo#109271] / [i915#3886])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl4/igt@kms_ccs@pipe-b-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_rc_ccs_cc:
    - shard-iclb:         NOTRUN -> [SKIP][33] ([fdo#109278] / [i915#3886])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_ccs@pipe-c-bad-aux-stride-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][34] ([fdo#109271] / [i915#3886])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl2/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs:
    - shard-skl:          NOTRUN -> [SKIP][35] ([fdo#109271] / [i915#3886]) +14 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl2/igt@kms_ccs@pipe-c-crc-primary-rotation-180-y_tiled_gen12_mc_ccs.html

  * igt@kms_chamelium@hdmi-crc-single:
    - shard-iclb:         NOTRUN -> [SKIP][36] ([fdo#109284] / [fdo#111827]) +3 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_chamelium@hdmi-crc-single.html

  * igt@kms_chamelium@vga-hpd-for-each-pipe:
    - shard-skl:          NOTRUN -> [SKIP][37] ([fdo#109271] / [fdo#111827]) +25 similar issues
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl2/igt@kms_chamelium@vga-hpd-for-each-pipe.html

  * igt@kms_color@pipe-d-ctm-green-to-red:
    - shard-iclb:         NOTRUN -> [SKIP][38] ([fdo#109278] / [i915#1149])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_color@pipe-d-ctm-green-to-red.html

  * igt@kms_color_chamelium@pipe-b-ctm-red-to-blue:
    - shard-apl:          NOTRUN -> [SKIP][39] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl2/igt@kms_color_chamelium@pipe-b-ctm-red-to-blue.html

  * igt@kms_content_protection@atomic:
    - shard-iclb:         NOTRUN -> [SKIP][40] ([fdo#109300] / [fdo#111066])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_content_protection@atomic.html

  * igt@kms_cursor_crc@pipe-c-cursor-512x170-random:
    - shard-iclb:         NOTRUN -> [SKIP][41] ([fdo#109278] / [fdo#109279])
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb5/igt@kms_cursor_crc@pipe-c-cursor-512x170-random.html

  * igt@kms_cursor_crc@pipe-d-cursor-64x64-rapid-movement:
    - shard-iclb:         NOTRUN -> [SKIP][42] ([fdo#109278]) +10 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_cursor_crc@pipe-d-cursor-64x64-rapid-movement.html

  * igt@kms_cursor_legacy@cursorb-vs-flipb-toggle:
    - shard-iclb:         NOTRUN -> [SKIP][43] ([fdo#109274] / [fdo#109278])
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_cursor_legacy@cursorb-vs-flipb-toggle.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-skl:          [PASS][44] -> [FAIL][45] ([i915#2346])
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-skl10/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl9/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_flip@2x-blocking-wf_vblank:
    - shard-iclb:         NOTRUN -> [SKIP][46] ([fdo#109274]) +1 similar issue
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_flip@2x-blocking-wf_vblank.html

  * igt@kms_flip@flip-vs-suspend-interruptible@a-dp1:
    - shard-apl:          [PASS][47] -> [DMESG-WARN][48] ([i915#180]) +2 similar issues
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-apl7/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl8/igt@kms_flip@flip-vs-suspend-interruptible@a-dp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling:
    - shard-skl:          NOTRUN -> [INCOMPLETE][49] ([i915#3701])
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl7/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html
    - shard-iclb:         [PASS][50] -> [SKIP][51] ([i915#3701])
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-iclb5/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytileccs-downscaling.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-upscaling:
    - shard-glk:          [PASS][52] -> [FAIL][53] ([i915#4911])
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-glk2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-upscaling.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-glk8/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-64bpp-ytile-upscaling.html

  * igt@kms_force_connector_basic@force-load-detect:
    - shard-iclb:         NOTRUN -> [SKIP][54] ([fdo#109285])
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt:
    - shard-iclb:         NOTRUN -> [SKIP][55] ([fdo#109280]) +10 similar issues
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-2p-primscrn-cur-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-apl:          [PASS][56] -> [DMESG-WARN][57] ([i915#180] / [i915#1982])
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-apl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl6/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-blt:
    - shard-tglb:         NOTRUN -> [SKIP][58] ([fdo#109280] / [fdo#111825])
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-tglb5/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-pwrite:
    - shard-apl:          NOTRUN -> [SKIP][59] ([fdo#109271]) +14 similar issues
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl2/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-pwrite.html

  * igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d:
    - shard-kbl:          NOTRUN -> [SKIP][60] ([fdo#109271] / [i915#533])
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl4/igt@kms_pipe_crc_basic@disable-crc-after-crtc-pipe-d.html

  * igt@kms_pipe_crc_basic@read-crc-pipe-d:
    - shard-skl:          NOTRUN -> [SKIP][61] ([fdo#109271] / [i915#533]) +3 similar issues
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl7/igt@kms_pipe_crc_basic@read-crc-pipe-d.html

  * igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
    - shard-skl:          NOTRUN -> [FAIL][62] ([fdo#108145] / [i915#265]) +4 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl4/igt@kms_plane_alpha_blend@pipe-a-alpha-7efc.html

  * igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping:
    - shard-skl:          NOTRUN -> [SKIP][63] ([fdo#109271] / [i915#2733])
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl1/igt@kms_plane_scaling@scaler-with-clipping-clamping@pipe-c-scaler-with-clipping-clamping.html

  * igt@kms_psr2_su@page_flip-nv12:
    - shard-apl:          NOTRUN -> [SKIP][64] ([fdo#109271] / [i915#658])
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-apl2/igt@kms_psr2_su@page_flip-nv12.html

  * igt@kms_psr@psr2_cursor_mmap_cpu:
    - shard-iclb:         [PASS][65] -> [SKIP][66] ([fdo#109441]) +3 similar issues
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb7/igt@kms_psr@psr2_cursor_mmap_cpu.html

  * igt@kms_psr@psr2_primary_mmap_gtt:
    - shard-iclb:         NOTRUN -> [SKIP][67] ([fdo#109441])
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@kms_psr@psr2_primary_mmap_gtt.html

  * igt@kms_psr@suspend:
    - shard-snb:          NOTRUN -> [SKIP][68] ([fdo#109271]) +20 similar issues
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-snb5/igt@kms_psr@suspend.html

  * igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a:
    - shard-skl:          NOTRUN -> [SKIP][69] ([fdo#109271]) +306 similar issues
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl4/igt@kms_scaling_modes@scaling-mode-none@edp-1-pipe-a.html

  * igt@kms_writeback@writeback-check-output:
    - shard-skl:          NOTRUN -> [SKIP][70] ([fdo#109271] / [i915#2437])
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl6/igt@kms_writeback@writeback-check-output.html

  * igt@nouveau_crc@pipe-a-source-rg:
    - shard-iclb:         NOTRUN -> [SKIP][71] ([i915#2530])
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@nouveau_crc@pipe-a-source-rg.html

  * igt@perf@unprivileged-single-ctx-counters:
    - shard-iclb:         NOTRUN -> [SKIP][72] ([fdo#109289]) +1 similar issue
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@perf@unprivileged-single-ctx-counters.html

  * igt@prime_nv_pcopy@test3_1:
    - shard-iclb:         NOTRUN -> [SKIP][73] ([fdo#109291])
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@prime_nv_pcopy@test3_1.html

  * igt@sysfs_clients@fair-0:
    - shard-skl:          NOTRUN -> [SKIP][74] ([fdo#109271] / [i915#2994]) +4 similar issues
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl3/igt@sysfs_clients@fair-0.html
    - shard-kbl:          NOTRUN -> [SKIP][75] ([fdo#109271] / [i915#2994])
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl4/igt@sysfs_clients@fair-0.html

  * igt@sysfs_clients@split-10:
    - shard-iclb:         NOTRUN -> [SKIP][76] ([i915#2994])
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@sysfs_clients@split-10.html

  * igt@tools_test@sysfs_l3_parity:
    - shard-iclb:         NOTRUN -> [SKIP][77] ([fdo#109307])
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb6/igt@tools_test@sysfs_l3_parity.html

  
#### Possible fixes ####

  * igt@drm_read@empty-block:
    - {shard-rkl}:        ([SKIP][78], [SKIP][79]) ([i915#1845]) -> [PASS][80]
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-4/igt@drm_read@empty-block.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@drm_read@empty-block.html
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@drm_read@empty-block.html

  * igt@fbdev@eof:
    - {shard-rkl}:        ([SKIP][81], [SKIP][82]) ([i915#2582]) -> [PASS][83]
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@fbdev@eof.html
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-4/igt@fbdev@eof.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@fbdev@eof.html

  * igt@feature_discovery@psr2:
    - {shard-rkl}:        [SKIP][84] ([i915#658]) -> [PASS][85]
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-1/igt@feature_discovery@psr2.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@feature_discovery@psr2.html

  * igt@gem_ctx_persistence@smoketest:
    - shard-tglb:         [FAIL][86] -> [PASS][87]
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-tglb2/igt@gem_ctx_persistence@smoketest.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-tglb3/igt@gem_ctx_persistence@smoketest.html

  * igt@gem_eio@unwedge-stress:
    - {shard-rkl}:        [TIMEOUT][88] ([i915#3063]) -> [PASS][89]
   [88]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@gem_eio@unwedge-stress.html
   [89]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-1/igt@gem_eio@unwedge-stress.html

  * igt@gem_exec_balancer@parallel-balancer:
    - shard-iclb:         [SKIP][90] ([i915#4525]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-iclb5/igt@gem_exec_balancer@parallel-balancer.html
   [91]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb2/igt@gem_exec_balancer@parallel-balancer.html

  * igt@gem_exec_endless@dispatch@vecs0:
    - shard-tglb:         [INCOMPLETE][92] ([i915#3778]) -> [PASS][93]
   [92]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-tglb1/igt@gem_exec_endless@dispatch@vecs0.html
   [93]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-tglb3/igt@gem_exec_endless@dispatch@vecs0.html

  * igt@gem_exec_fair@basic-none@vecs0:
    - shard-kbl:          [FAIL][94] ([i915#2842]) -> [PASS][95] +1 similar issue
   [94]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-kbl3/igt@gem_exec_fair@basic-none@vecs0.html
   [95]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl6/igt@gem_exec_fair@basic-none@vecs0.html

  * igt@gem_exec_fair@basic-pace-share@rcs0:
    - {shard-rkl}:        [FAIL][96] ([i915#2842]) -> [PASS][97]
   [96]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-1/igt@gem_exec_fair@basic-pace-share@rcs0.html
   [97]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@gem_exec_fair@basic-pace-share@rcs0.html

  * igt@gem_exec_fair@basic-pace@vcs0:
    - shard-kbl:          [SKIP][98] ([fdo#109271]) -> [PASS][99]
   [98]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-kbl4/igt@gem_exec_fair@basic-pace@vcs0.html
   [99]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-kbl7/igt@gem_exec_fair@basic-pace@vcs0.html

  * igt@gem_exec_whisper@basic-fds-priority:
    - shard-glk:          [DMESG-WARN][100] ([i915#118]) -> [PASS][101] +2 similar issues
   [100]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-glk1/igt@gem_exec_whisper@basic-fds-priority.html
   [101]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-glk8/igt@gem_exec_whisper@basic-fds-priority.html

  * igt@gen9_exec_parse@allowed-single:
    - shard-skl:          [DMESG-WARN][102] ([i915#1436] / [i915#716]) -> [PASS][103]
   [102]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-skl4/igt@gen9_exec_parse@allowed-single.html
   [103]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl7/igt@gen9_exec_parse@allowed-single.html

  * igt@i915_pm_rpm@dpms-mode-unset-lpsp:
    - {shard-dg1}:        [SKIP][104] ([i915#1397]) -> [PASS][105] +1 similar issue
   [104]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-dg1-18/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html
   [105]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-dg1-15/igt@i915_pm_rpm@dpms-mode-unset-lpsp.html

  * igt@i915_pm_rps@waitboost:
    - {shard-rkl}:        [FAIL][106] ([i915#4016]) -> [PASS][107]
   [106]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@i915_pm_rps@waitboost.html
   [107]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-1/igt@i915_pm_rps@waitboost.html

  * igt@i915_selftest@live@hangcheck:
    - shard-snb:          [INCOMPLETE][108] ([i915#3921]) -> [PASS][109]
   [108]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-snb2/igt@i915_selftest@live@hangcheck.html
   [109]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-snb5/igt@i915_selftest@live@hangcheck.html
    - {shard-dg1}:        [DMESG-FAIL][110] ([i915#4494] / [i915#4957]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-dg1-15/igt@i915_selftest@live@hangcheck.html
   [111]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-dg1-12/igt@i915_selftest@live@hangcheck.html

  * igt@kms_big_fb@x-tiled-32bpp-rotate-180:
    - {shard-tglu}:       [DMESG-WARN][112] ([i915#402]) -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-tglu-8/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html
   [113]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-tglu-1/igt@kms_big_fb@x-tiled-32bpp-rotate-180.html

  * igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc:
    - {shard-rkl}:        [SKIP][114] ([i915#1845] / [i915#4098]) -> [PASS][115] +3 similar issues
   [114]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html
   [115]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_ccs@pipe-b-crc-primary-rotation-180-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_color@pipe-a-ctm-blue-to-red:
    - {shard-rkl}:        [SKIP][116] ([i915#1149] / [i915#1849] / [i915#4070]) -> [PASS][117]
   [116]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@kms_color@pipe-a-ctm-blue-to-red.html
   [117]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_color@pipe-a-ctm-blue-to-red.html

  * igt@kms_cursor_crc@pipe-a-cursor-256x256-onscreen:
    - {shard-rkl}:        [SKIP][118] ([fdo#112022] / [i915#4070]) -> [PASS][119] +2 similar issues
   [118]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@kms_cursor_crc@pipe-a-cursor-256x256-onscreen.html
   [119]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_cursor_crc@pipe-a-cursor-256x256-onscreen.html

  * igt@kms_cursor_crc@pipe-a-cursor-64x64-random:
    - {shard-rkl}:        ([SKIP][120], [SKIP][121]) ([fdo#112022] / [i915#4070]) -> [PASS][122] +2 similar issues
   [120]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-4/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html
   [121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html
   [122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_cursor_crc@pipe-a-cursor-64x64-random.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size:
    - {shard-rkl}:        ([SKIP][123], [SKIP][124]) ([fdo#111825] / [i915#4070]) -> [PASS][125]
   [123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-4/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size.html
   [124]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-1/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size.html
   [125]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size.html

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - shard-iclb:         [FAIL][126] ([i915#2346]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [127]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-iclb5/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_cursor_legacy@flip-vs-cursor-legacy:
    - shard-skl:          [FAIL][128] ([i915#2346]) -> [PASS][129]
   [128]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-skl3/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html
   [129]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl6/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html

  * igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled:
    - {shard-rkl}:        ([SKIP][130], [SKIP][131]) ([fdo#111314] / [i915#4098]) -> [PASS][132] +2 similar issues
   [130]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-4/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html
   [131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-2/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html
   [132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_draw_crc@draw-method-xrgb8888-mmap-wc-untiled.html

  * igt@kms_draw_crc@draw-method-xrgb8888-pwrite-xtiled:
    - {shard-rkl}:        [SKIP][133] ([fdo#111314]) -> [PASS][134] +2 similar issues
   [133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-rkl-1/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-xtiled.html
   [134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-rkl-6/igt@kms_draw_crc@draw-method-xrgb8888-pwrite-xtiled.html

  * igt@kms_fbcon_fbt@fbc:
    - {shard-tglu}:       [FAIL][135] ([i915#64]) -> [PASS][136]
   [135]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-tglu-5/igt@kms_fbcon_fbt@fbc.html
   [136]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-tglu-4/igt@kms_fbcon_fbt@fbc.html

  * igt@kms_flip@flip-vs-expired-vblank@a-edp1:
    - shard-skl:          [FAIL][137] ([i915#2122]) -> [PASS][138] +4 similar issues
   [137]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-skl2/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html
   [138]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl9/igt@kms_flip@flip-vs-expired-vblank@a-edp1.html

  * igt@kms_flip@flip-vs-expired-vblank@c-edp1:
    - shard-skl:          [FAIL][139] ([i915#79]) -> [PASS][140]
   [139]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11188/shard-skl2/igt@kms_flip@flip-vs-expired-vblank@c-edp1.html
   [140]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/shard-skl9/igt@kms_flip@flip-vs-expired-vblank@c-edp1.html

  * igt@kms_flip@flip-vs-suspend@c-dp1:
    - shard-kbl:          [DMESG-WARN][141] ([i915#180]) -> [PASS]

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22174/index.html

[-- Attachment #2: Type: text/html, Size: 33444 bytes --]

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH v2 04/10] drm/i915: Clean up the bigjoiner state copy logic
  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ä
  0 siblings, 1 reply; 41+ messages in thread
From: Navare, Manasi @ 2022-02-04 20:52 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Fri, Feb 04, 2022 at 09:20:49AM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Currently the bigjoiner state copy logic is kind of
> a byzantine mess.
> 
> Clean it up to operate in the following manner during a full
> modeset:
> 1) master uapi -> hw state copy
> 2) master hw -> slave hw state copy
> 
> And during a non-modeset update we do:
> 1) master uapi -> hw state light copy
> 2) master hw -> slave hw state light copy
> 
> I think that is now easier to reason about since we never do
> any kind of master uapi -> slave hw state copy short circuit
> that could happen previously.
> 
> Obviously this does now depend on the master uapi->hw copy
> always happening before the master hw -> slave hw copy, but
> that is guaranteed by the fact that we always add both crtcs
> to the state early, the crtcs are registered in pipe
> order (so the compute_config loop happens in pipe order),
> and the hardware requires the master pipe has to be lower
> than the slave pipe as well. And for good measure we shall
> add a check+WARN for this before doing the bigjoiner crtc
> assignment.
> 
> v2: Fix uapi.ctm vs. hw.ctm copy-paste fail
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks good to me, jus one question on how we decide what state from orginal slave crtc state to preserve.
But in either case

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_atomic.c  |  11 --
>  drivers/gpu/drm/i915/display/intel_atomic.h  |   2 -
>  drivers/gpu/drm/i915/display/intel_display.c | 170 ++++++++++++-------
>  3 files changed, 108 insertions(+), 75 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
> index 093904065112..e0667d163266 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic.c
> @@ -281,17 +281,6 @@ void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state)
>  	intel_crtc_put_color_blobs(crtc_state);
>  }
>  
> -void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
> -				 const struct intel_crtc_state *from_crtc_state)
> -{
> -	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
> -				  from_crtc_state->uapi.degamma_lut);
> -	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
> -				  from_crtc_state->uapi.gamma_lut);
> -	drm_property_replace_blob(&crtc_state->hw.ctm,
> -				  from_crtc_state->uapi.ctm);
> -}
> -
>  /**
>   * intel_crtc_destroy_state - destroy crtc state
>   * @crtc: drm crtc
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic.h b/drivers/gpu/drm/i915/display/intel_atomic.h
> index d2700c74c9da..1dc439983dd9 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic.h
> +++ b/drivers/gpu/drm/i915/display/intel_atomic.h
> @@ -44,8 +44,6 @@ struct drm_crtc_state *intel_crtc_duplicate_state(struct drm_crtc *crtc);
>  void intel_crtc_destroy_state(struct drm_crtc *crtc,
>  			       struct drm_crtc_state *state);
>  void intel_crtc_free_hw_state(struct intel_crtc_state *crtc_state);
> -void intel_crtc_copy_color_blobs(struct intel_crtc_state *crtc_state,
> -				 const struct intel_crtc_state *from_crtc_state);
>  struct drm_atomic_state *intel_atomic_state_alloc(struct drm_device *dev);
>  void intel_atomic_state_free(struct drm_atomic_state *state);
>  void intel_atomic_state_clear(struct drm_atomic_state *state);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 349cc3807e8b..b391cb98b12f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5818,32 +5818,37 @@ static bool check_digital_port_conflicts(struct intel_atomic_state *state)
>  
>  static void
>  intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
> -					   struct intel_crtc_state *crtc_state)
> +					   struct intel_crtc *crtc)
>  {
> -	const struct intel_crtc_state *master_crtc_state;
> -	struct intel_crtc *master_crtc;
> +	struct intel_crtc_state *crtc_state =
> +		intel_atomic_get_new_crtc_state(state, crtc);
>  
> -	master_crtc = intel_master_crtc(crtc_state);
> -	master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
> +	WARN_ON(crtc_state->bigjoiner_slave);
>  
> -	/* No need to copy state if the master state is unchanged */
> -	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);
> -	}
> +	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
> +				  crtc_state->uapi.degamma_lut);
> +	drm_property_replace_blob(&crtc_state->hw.gamma_lut,
> +				  crtc_state->uapi.gamma_lut);
> +	drm_property_replace_blob(&crtc_state->hw.ctm,
> +				  crtc_state->uapi.ctm);
>  }
>  
>  static void
> -intel_crtc_copy_uapi_to_hw_state(struct intel_atomic_state *state,
> -				 struct intel_crtc_state *crtc_state)
> +intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
> +					 struct intel_crtc *crtc)
>  {
> +	struct intel_crtc_state *crtc_state =
> +		intel_atomic_get_new_crtc_state(state, crtc);
> +
> +	WARN_ON(crtc_state->bigjoiner_slave);
> +
>  	crtc_state->hw.enable = crtc_state->uapi.enable;
>  	crtc_state->hw.active = crtc_state->uapi.active;
>  	crtc_state->hw.mode = crtc_state->uapi.mode;
>  	crtc_state->hw.adjusted_mode = crtc_state->uapi.adjusted_mode;
>  	crtc_state->hw.scaling_filter = crtc_state->uapi.scaling_filter;
>  
> -	intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc_state);
> +	intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
>  }
>  
>  static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state)
> @@ -5859,7 +5864,6 @@ static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state
>  	crtc_state->uapi.adjusted_mode = crtc_state->hw.adjusted_mode;
>  	crtc_state->uapi.scaling_filter = crtc_state->hw.scaling_filter;
>  
> -	/* copy color blobs to uapi */
>  	drm_property_replace_blob(&crtc_state->uapi.degamma_lut,
>  				  crtc_state->hw.degamma_lut);
>  	drm_property_replace_blob(&crtc_state->uapi.gamma_lut,
> @@ -5868,61 +5872,79 @@ static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state
>  				  crtc_state->hw.ctm);
>  }
>  
> +static void
> +copy_bigjoiner_crtc_state_nomodeset(struct intel_atomic_state *state,
> +				    struct intel_crtc *slave_crtc)
> +{
> +	struct intel_crtc_state *slave_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, slave_crtc);
> +	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
> +	const struct intel_crtc_state *master_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, master_crtc);
> +
> +	drm_property_replace_blob(&slave_crtc_state->hw.degamma_lut,
> +				  master_crtc_state->hw.degamma_lut);
> +	drm_property_replace_blob(&slave_crtc_state->hw.gamma_lut,
> +				  master_crtc_state->hw.gamma_lut);
> +	drm_property_replace_blob(&slave_crtc_state->hw.ctm,
> +				  master_crtc_state->hw.ctm);
> +
> +	slave_crtc_state->uapi.color_mgmt_changed = master_crtc_state->uapi.color_mgmt_changed;
> +}
> +
>  static int
> -copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state,
> -			  const struct intel_crtc_state *from_crtc_state)
> +copy_bigjoiner_crtc_state_modeset(struct intel_atomic_state *state,
> +				  struct intel_crtc *slave_crtc)
>  {
> +	struct intel_crtc_state *slave_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, slave_crtc);
> +	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
> +	const struct intel_crtc_state *master_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, master_crtc);
>  	struct intel_crtc_state *saved_state;
>  
> -	saved_state = kmemdup(from_crtc_state, sizeof(*saved_state), GFP_KERNEL);
> +	saved_state = kmemdup(master_crtc_state, sizeof(*saved_state), GFP_KERNEL);
>  	if (!saved_state)
>  		return -ENOMEM;
>  
> -	saved_state->uapi = crtc_state->uapi;
> -	saved_state->scaler_state = crtc_state->scaler_state;
> -	saved_state->shared_dpll = crtc_state->shared_dpll;
> -	saved_state->dpll_hw_state = crtc_state->dpll_hw_state;
> -	saved_state->crc_enabled = crtc_state->crc_enabled;
> +	/* preserve some things from the slave's original crtc state */
> +	saved_state->uapi = slave_crtc_state->uapi;
> +	saved_state->scaler_state = slave_crtc_state->scaler_state;
> +	saved_state->shared_dpll = slave_crtc_state->shared_dpll;
> +	saved_state->dpll_hw_state = slave_crtc_state->dpll_hw_state;
> +	saved_state->crc_enabled = slave_crtc_state->crc_enabled;

Slave crtc state here not set at all , so why do we preserve the things from slave's original crtc state and how we
decide on what all to preserve?

Manasi
>  
> -	intel_crtc_free_hw_state(crtc_state);
> -	memcpy(crtc_state, saved_state, sizeof(*crtc_state));
> +	intel_crtc_free_hw_state(slave_crtc_state);
> +	memcpy(slave_crtc_state, saved_state, sizeof(*slave_crtc_state));
>  	kfree(saved_state);
>  
>  	/* Re-init hw 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;
> +	memset(&slave_crtc_state->hw, 0, sizeof(slave_crtc_state->hw));
> +	slave_crtc_state->hw.enable = master_crtc_state->hw.enable;
> +	slave_crtc_state->hw.active = master_crtc_state->hw.active;
> +	slave_crtc_state->hw.mode = master_crtc_state->hw.mode;
> +	slave_crtc_state->hw.pipe_mode = master_crtc_state->hw.pipe_mode;
> +	slave_crtc_state->hw.adjusted_mode = master_crtc_state->hw.adjusted_mode;
> +	slave_crtc_state->hw.scaling_filter = master_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->hw.ctm,
> -				  from_crtc_state->hw.ctm);
> +	copy_bigjoiner_crtc_state_nomodeset(state, slave_crtc);
>  
>  	/* 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;
> -	crtc_state->cpu_transcoder = from_crtc_state->cpu_transcoder;
> -	crtc_state->has_audio = from_crtc_state->has_audio;
> +	slave_crtc_state->uapi.mode_changed = master_crtc_state->uapi.mode_changed;
> +	slave_crtc_state->uapi.connectors_changed = master_crtc_state->uapi.connectors_changed;
> +	slave_crtc_state->uapi.active_changed = master_crtc_state->uapi.active_changed;
> +	slave_crtc_state->cpu_transcoder = master_crtc_state->cpu_transcoder;
> +	slave_crtc_state->has_audio = master_crtc_state->has_audio;
>  
>  	return 0;
>  }
>  
>  static int
>  intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
> -				 struct intel_crtc_state *crtc_state)
> +				 struct intel_crtc *crtc)
>  {
> -	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +	struct intel_crtc_state *crtc_state =
> +		intel_atomic_get_new_crtc_state(state, crtc);
>  	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  	struct intel_crtc_state *saved_state;
>  
> @@ -5952,7 +5974,7 @@ intel_crtc_prepare_cleared_state(struct intel_atomic_state *state,
>  	memcpy(crtc_state, saved_state, sizeof(*crtc_state));
>  	kfree(saved_state);
>  
> -	intel_crtc_copy_uapi_to_hw_state(state, crtc_state);
> +	intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
>  
>  	return 0;
>  }
> @@ -7592,6 +7614,9 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  	struct intel_crtc_state *slave_crtc_state;
>  	struct intel_crtc *slave_crtc;
>  
> +	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
> +	WARN_ON(master_crtc_state->bigjoiner_slave);
> +
>  	if (!master_crtc_state->bigjoiner)
>  		return 0;
>  
> @@ -7604,7 +7629,6 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  		return -EINVAL;
>  	}
>  
> -	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
>  	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
>  	if (IS_ERR(slave_crtc_state))
>  		return PTR_ERR(slave_crtc_state);
> @@ -7613,11 +7637,28 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  	if (slave_crtc_state->uapi.enable)
>  		goto claimed;
>  
> +	/*
> +	 * The state copy logic assumes the master crtc gets processed
> +	 * before the slave crtc during the main compute_config loop.
> +	 * This works because the crtcs are created in pipe order,
> +	 * and the hardware requires master pipe < slave pipe as well.
> +	 * Should that change we need to rethink the logic.
> +	 */
> +	if (WARN_ON(drm_crtc_index(&master_crtc->base) > drm_crtc_index(&slave_crtc->base)))
> +		return -EINVAL;
> +
>  	drm_dbg_kms(&i915->drm,
> -		    "[CRTC:%d:%s] Used as slave for big joiner\n",
> -		    slave_crtc->base.base.id, slave_crtc->base.name);
> +		    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
> +		    slave_crtc->base.base.id, slave_crtc->base.name,
> +		    master_crtc->base.base.id, master_crtc->base.name);
>  
> -	return copy_bigjoiner_crtc_state(slave_crtc_state, master_crtc_state);
> +	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
> +	master_crtc_state->bigjoiner_slave = false;
> +
> +	slave_crtc_state->bigjoiner_linked_crtc = master_crtc;
> +	slave_crtc_state->bigjoiner_slave = true;
> +
> +	return copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
>  
>  claimed:
>  	drm_dbg_kms(&i915->drm,
> @@ -7629,15 +7670,19 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  }
>  
>  static void kill_bigjoiner_slave(struct intel_atomic_state *state,
> -				 struct intel_crtc_state *master_crtc_state)
> +				 struct intel_crtc *master_crtc)
>  {
> +	struct intel_crtc_state *master_crtc_state =
> +		intel_atomic_get_new_crtc_state(state, master_crtc);
> +	struct intel_crtc *slave_crtc = master_crtc_state->bigjoiner_linked_crtc;
>  	struct intel_crtc_state *slave_crtc_state =
> -		intel_atomic_get_new_crtc_state(state, master_crtc_state->bigjoiner_linked_crtc);
> +		intel_atomic_get_new_crtc_state(state, slave_crtc);
>  
>  	slave_crtc_state->bigjoiner = master_crtc_state->bigjoiner = false;
>  	slave_crtc_state->bigjoiner_slave = master_crtc_state->bigjoiner_slave = false;
>  	slave_crtc_state->bigjoiner_linked_crtc = master_crtc_state->bigjoiner_linked_crtc = NULL;
> -	intel_crtc_copy_uapi_to_hw_state(state, slave_crtc_state);
> +
> +	intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
>  }
>  
>  /**
> @@ -7823,7 +7868,7 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
>  		/* Kill old bigjoiner link, we may re-establish afterwards */
>  		if (intel_crtc_needs_modeset(crtc_state) &&
>  		    crtc_state->bigjoiner && !crtc_state->bigjoiner_slave)
> -			kill_bigjoiner_slave(state, crtc_state);
> +			kill_bigjoiner_slave(state, crtc);
>  	}
>  
>  	return 0;
> @@ -7867,21 +7912,22 @@ static int intel_atomic_check(struct drm_device *dev,
>  	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
>  					    new_crtc_state, i) {
>  		if (!intel_crtc_needs_modeset(new_crtc_state)) {
> -			/* Light copy */
> -			intel_crtc_copy_uapi_to_hw_state_nomodeset(state, new_crtc_state);
> -
> +			if (new_crtc_state->bigjoiner_slave)
> +				copy_bigjoiner_crtc_state_nomodeset(state, crtc);
> +			else
> +				intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
>  			continue;
>  		}
>  
>  		if (!new_crtc_state->uapi.enable) {
>  			if (!new_crtc_state->bigjoiner_slave) {
> -				intel_crtc_copy_uapi_to_hw_state(state, new_crtc_state);
> +				intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
>  				any_ms = true;
>  			}
>  			continue;
>  		}
>  
> -		ret = intel_crtc_prepare_cleared_state(state, new_crtc_state);
> +		ret = intel_crtc_prepare_cleared_state(state, crtc);
>  		if (ret)
>  			goto fail;
>  
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH v2 02/10] drm/i915: Fix bigjoiner state copy fails
  2022-02-04  7:20   ` [Intel-gfx] [PATCH v2 " Ville Syrjala
@ 2022-02-04 20:58     ` Navare, Manasi
  0 siblings, 0 replies; 41+ messages in thread
From: Navare, Manasi @ 2022-02-04 20:58 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Fri, Feb 04, 2022 at 09:20:09AM +0200, Ville Syrjala wrote:
> 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.
> 
> v2: Fix uapi.ctm vs. hw.ctm copy-paste fail
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Yup looks good

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  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..4f5f023417a6 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->hw.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
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 05/10] drm/i915: Nuke some dead code
  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
  0 siblings, 0 replies; 41+ messages in thread
From: Navare, Manasi @ 2022-02-04 21:08 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:18PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Remove all the dead code from icl_ddi_bigjoiner_pre_enable().
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Yup good catch here and thank you for cleaning up the dead code

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 48869478efc2..d5dc2c25c1f6 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -1974,23 +1974,7 @@ static void hsw_set_frame_start_delay(const struct intel_crtc_state *crtc_state)
>  static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
>  					 const struct intel_crtc_state *crtc_state)
>  {
> -	struct intel_crtc_state *master_crtc_state;
> -	struct intel_crtc *master_crtc;
> -	struct drm_connector_state *conn_state;
> -	struct drm_connector *conn;
> -	struct intel_encoder *encoder = NULL;
> -	int i;
> -
> -	master_crtc = intel_master_crtc(crtc_state);
> -	master_crtc_state = intel_atomic_get_new_crtc_state(state, master_crtc);
> -
> -	for_each_new_connector_in_state(&state->base, conn, conn_state, i) {
> -		if (conn_state->crtc != &master_crtc->base)
> -			continue;
> -
> -		encoder = to_intel_encoder(conn_state->best_encoder);
> -		break;
> -	}
> +	struct intel_crtc *master_crtc = intel_master_crtc(crtc_state);
>  
>  	/*
>  	 * Enable sequence steps 1-7 on bigjoiner master
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
  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ä
  0 siblings, 1 reply; 41+ messages in thread
From: Navare, Manasi @ 2022-02-04 21:27 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:19PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Introduce helpers to query whether the crtc is the slave/master
> for bigjoiner. This decouples most places from the exact
> state layout we use to track this relationship, allowing us
> to change and extend it more easily.

So even with the bitmask approach, we still plan to have bools for bigjoiner_slave?

> 
> Performed with cocci:
> @@
> expression S, E;
> @@
> (
>   S->bigjoiner_slave = E;
> |
> - S->bigjoiner_slave
> + intel_crtc_is_bigjoiner_slave(S)
> )
> 
> @@
> expression S, E;
> @@
> (
> - E && S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
> + E && intel_crtc_is_bigjoiner_master(S)
> |
> - S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
> + intel_crtc_is_bigjoiner_master(S)
> )
> 
> @@
> expression S;
> @@
> - (intel_crtc_is_bigjoiner_master(S))
> + intel_crtc_is_bigjoiner_master(S)
> 
> @@
> expression S, E1, E2, E3;
> @@
> - intel_crtc_is_bigjoiner_slave(S) ? E1 : S->bigjoiner ? E2 : E3
> + intel_crtc_is_bigjoiner_slave(S) ? E1 : intel_crtc_is_bigjoiner_master(S) ? E2 : E3
> 
> @@
> typedef bool;
> @@
> + bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
> + {
> + 	return crtc_state->bigjoiner_slave;
> + }
> +
>   intel_master_crtc(...) {...}
> 
> @@
> typedef bool;
> @@
> + bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
> + {
> + 	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
> + }
> +
>   intel_master_crtc(...) {...}
> 
> @@
> typedef bool;
> identifier S;
> @@
> - bool is_trans_port_sync_mode(const struct intel_crtc_state *S);
> + bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
> + bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
> + bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);

Is all of the above part of the commit message? Dont understand why its changing is_trans_port_sync_mode() ?

Manasi

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  .../gpu/drm/i915/display/intel_atomic_plane.c |  4 +-
>  drivers/gpu/drm/i915/display/intel_ddi.c      |  2 +-
>  drivers/gpu/drm/i915/display/intel_display.c  | 51 +++++++++++--------
>  drivers/gpu/drm/i915/display/intel_display.h  |  2 +
>  .../drm/i915/display/intel_display_debugfs.c  |  2 +-
>  drivers/gpu/drm/i915/display/intel_vdsc.c     |  4 +-
>  6 files changed, 39 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index bec02333bdeb..41d52889dfce 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -403,7 +403,7 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
>  	struct intel_crtc_state *new_crtc_state =
>  		intel_atomic_get_new_crtc_state(state, crtc);
>  
> -	if (new_crtc_state && new_crtc_state->bigjoiner_slave) {
> +	if (new_crtc_state && intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
>  		struct intel_plane *master_plane =
>  			intel_crtc_get_plane(new_crtc_state->bigjoiner_linked_crtc,
>  					     plane->id);
> @@ -633,7 +633,7 @@ int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
>  	}
>  
>  	/* right side of the image is on the slave crtc, adjust dst to match */
> -	if (crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(crtc_state))
>  		drm_rect_translate(dst, -crtc_state->pipe_src_w, 0);
>  
>  	/*
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 354b08d6f81d..3f0e1e127595 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -2926,7 +2926,7 @@ static void intel_enable_ddi(struct intel_atomic_state *state,
>  {
>  	drm_WARN_ON(state->base.dev, crtc_state->has_pch_encoder);
>  
> -	if (!crtc_state->bigjoiner_slave)
> +	if (!intel_crtc_is_bigjoiner_slave(crtc_state))
>  		intel_ddi_enable_transcoder_func(encoder, crtc_state);
>  
>  	intel_vrr_enable(encoder, crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index d5dc2c25c1f6..9a7f40d17b79 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -337,9 +337,19 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
>  		is_trans_port_sync_slave(crtc_state);
>  }
>  
> +bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
> +{
> +	return crtc_state->bigjoiner_slave;
> +}
> +
> +bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
> +{
> +	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
> +}
> +
>  static struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
>  {
> -	if (crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(crtc_state))
>  		return crtc_state->bigjoiner_linked_crtc;
>  	else
>  		return to_intel_crtc(crtc_state->uapi.crtc);
> @@ -1979,13 +1989,13 @@ static void icl_ddi_bigjoiner_pre_enable(struct intel_atomic_state *state,
>  	/*
>  	 * Enable sequence steps 1-7 on bigjoiner master
>  	 */
> -	if (crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(crtc_state))
>  		intel_encoders_pre_pll_enable(state, master_crtc);
>  
>  	if (crtc_state->shared_dpll)
>  		intel_enable_shared_dpll(crtc_state);
>  
> -	if (crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(crtc_state))
>  		intel_encoders_pre_enable(state, master_crtc);
>  }
>  
> @@ -2049,7 +2059,8 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
>  	if (DISPLAY_VER(dev_priv) >= 9 || IS_BROADWELL(dev_priv))
>  		bdw_set_pipemisc(new_crtc_state);
>  
> -	if (!new_crtc_state->bigjoiner_slave && !transcoder_is_dsi(cpu_transcoder))
> +	if (!intel_crtc_is_bigjoiner_slave(new_crtc_state) &&
> +	    !transcoder_is_dsi(cpu_transcoder))
>  		hsw_configure_cpu_transcoder(new_crtc_state);
>  
>  	crtc->active = true;
> @@ -2089,7 +2100,7 @@ static void hsw_crtc_enable(struct intel_atomic_state *state,
>  		icl_pipe_mbus_enable(crtc, dbuf_state->joined_mbus);
>  	}
>  
> -	if (new_crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(new_crtc_state))
>  		intel_crtc_vblank_on(new_crtc_state);
>  
>  	intel_encoders_enable(state, crtc);
> @@ -2174,7 +2185,7 @@ static void hsw_crtc_disable(struct intel_atomic_state *state,
>  	 * FIXME collapse everything to one hook.
>  	 * Need care with mst->ddi interactions.
>  	 */
> -	if (!old_crtc_state->bigjoiner_slave) {
> +	if (!intel_crtc_is_bigjoiner_slave(old_crtc_state)) {
>  		intel_encoders_disable(state, crtc);
>  		intel_encoders_post_disable(state, crtc);
>  	}
> @@ -5604,8 +5615,8 @@ static void intel_dump_pipe_config(const struct intel_crtc_state *pipe_config,
>  		    pipe_config->sync_mode_slaves_mask);
>  
>  	drm_dbg_kms(&dev_priv->drm, "bigjoiner: %s\n",
> -		    pipe_config->bigjoiner_slave ? "slave" :
> -		    pipe_config->bigjoiner ? "master" : "no");
> +		    intel_crtc_is_bigjoiner_slave(pipe_config) ? "slave" :
> +		    intel_crtc_is_bigjoiner_master(pipe_config) ? "master" : "no");
>  
>  	drm_dbg_kms(&dev_priv->drm, "splitter: %s, link count %d, overlap %d\n",
>  		    enableddisabled(pipe_config->splitter.enable),
> @@ -5807,7 +5818,7 @@ intel_crtc_copy_uapi_to_hw_state_nomodeset(struct intel_atomic_state *state,
>  	struct intel_crtc_state *crtc_state =
>  		intel_atomic_get_new_crtc_state(state, crtc);
>  
> -	WARN_ON(crtc_state->bigjoiner_slave);
> +	WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
>  
>  	drm_property_replace_blob(&crtc_state->hw.degamma_lut,
>  				  crtc_state->uapi.degamma_lut);
> @@ -5824,7 +5835,7 @@ intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
>  	struct intel_crtc_state *crtc_state =
>  		intel_atomic_get_new_crtc_state(state, crtc);
>  
> -	WARN_ON(crtc_state->bigjoiner_slave);
> +	WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
>  
>  	crtc_state->hw.enable = crtc_state->uapi.enable;
>  	crtc_state->hw.active = crtc_state->uapi.active;
> @@ -5837,7 +5848,7 @@ intel_crtc_copy_uapi_to_hw_state_modeset(struct intel_atomic_state *state,
>  
>  static void intel_crtc_copy_hw_to_uapi_state(struct intel_crtc_state *crtc_state)
>  {
> -	if (crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(crtc_state))
>  		return;
>  
>  	crtc_state->uapi.enable = crtc_state->hw.enable;
> @@ -7599,7 +7610,7 @@ static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  	struct intel_crtc *slave_crtc;
>  
>  	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
> -	WARN_ON(master_crtc_state->bigjoiner_slave);
> +	WARN_ON(intel_crtc_is_bigjoiner_slave(master_crtc_state));
>  
>  	if (!master_crtc_state->bigjoiner)
>  		return 0;
> @@ -7851,7 +7862,7 @@ static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
>  	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
>  		/* Kill old bigjoiner link, we may re-establish afterwards */
>  		if (intel_crtc_needs_modeset(crtc_state) &&
> -		    crtc_state->bigjoiner && !crtc_state->bigjoiner_slave)
> +		    intel_crtc_is_bigjoiner_master(crtc_state))
>  			kill_bigjoiner_slave(state, crtc);
>  	}
>  
> @@ -7896,7 +7907,7 @@ static int intel_atomic_check(struct drm_device *dev,
>  	for_each_oldnew_intel_crtc_in_state(state, crtc, old_crtc_state,
>  					    new_crtc_state, i) {
>  		if (!intel_crtc_needs_modeset(new_crtc_state)) {
> -			if (new_crtc_state->bigjoiner_slave)
> +			if (intel_crtc_is_bigjoiner_slave(new_crtc_state))
>  				copy_bigjoiner_crtc_state_nomodeset(state, crtc);
>  			else
>  				intel_crtc_copy_uapi_to_hw_state_nomodeset(state, crtc);
> @@ -7904,7 +7915,7 @@ static int intel_atomic_check(struct drm_device *dev,
>  		}
>  
>  		if (!new_crtc_state->uapi.enable) {
> -			if (!new_crtc_state->bigjoiner_slave) {
> +			if (!intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
>  				intel_crtc_copy_uapi_to_hw_state_modeset(state, crtc);
>  				any_ms = true;
>  			}
> @@ -8223,7 +8234,7 @@ static void intel_enable_crtc(struct intel_atomic_state *state,
>  
>  	dev_priv->display->crtc_enable(state, crtc);
>  
> -	if (new_crtc_state->bigjoiner_slave)
> +	if (intel_crtc_is_bigjoiner_slave(new_crtc_state))
>  		return;
>  
>  	/* vblanks work again, re-enable pipe CRC. */
> @@ -8340,7 +8351,7 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
>  		 */
>  		if (!is_trans_port_sync_slave(old_crtc_state) &&
>  		    !intel_dp_mst_is_slave_trans(old_crtc_state) &&
> -		    !old_crtc_state->bigjoiner_slave)
> +		    !intel_crtc_is_bigjoiner_slave(old_crtc_state))
>  			continue;
>  
>  		intel_old_crtc_state_disables(state, old_crtc_state,
> @@ -8455,7 +8466,7 @@ static void skl_commit_modeset_enables(struct intel_atomic_state *state)
>  
>  		if (intel_dp_mst_is_slave_trans(new_crtc_state) ||
>  		    is_trans_port_sync_master(new_crtc_state) ||
> -		    (new_crtc_state->bigjoiner && !new_crtc_state->bigjoiner_slave))
> +		    intel_crtc_is_bigjoiner_master(new_crtc_state))
>  			continue;
>  
>  		modeset_pipes &= ~BIT(pipe);
> @@ -10167,7 +10178,7 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc,
>  	/* Adjust the state of the output pipe according to whether we
>  	 * have active connectors/encoders. */
>  	if (crtc_state->hw.active && !intel_crtc_has_encoders(crtc) &&
> -	    !crtc_state->bigjoiner_slave)
> +	    !intel_crtc_is_bigjoiner_slave(crtc_state))
>  		intel_crtc_disable_noatomic(crtc, ctx);
>  
>  	if (crtc_state->hw.active || HAS_GMCH(dev_priv)) {
> @@ -10381,7 +10392,7 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
>  			/* read out to slave crtc as well for bigjoiner */
>  			if (crtc_state->bigjoiner) {
>  				/* encoder should read be linked to bigjoiner master */
> -				WARN_ON(crtc_state->bigjoiner_slave);
> +				WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
>  
>  				crtc = crtc_state->bigjoiner_linked_crtc;
>  				crtc_state = to_intel_crtc_state(crtc->base.state);
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 457738aeee3e..22e5f0d6e171 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -555,6 +555,8 @@ intel_mode_valid_max_plane_size(struct drm_i915_private *dev_priv,
>  				bool bigjoiner);
>  enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
>  bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
> +bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
> +bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
>  
>  void intel_plane_destroy(struct drm_plane *plane);
>  void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index f4de004d470f..053c74afe721 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -939,7 +939,7 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
>  		seq_printf(m, "\tLinked to [CRTC:%d:%s] as a %s\n",
>  			   crtc_state->bigjoiner_linked_crtc->base.base.id,
>  			   crtc_state->bigjoiner_linked_crtc->base.name,
> -			   crtc_state->bigjoiner_slave ? "slave" : "master");
> +			   intel_crtc_is_bigjoiner_slave(crtc_state) ? "slave" : "master");
>  
>  	for_each_intel_encoder_mask(&dev_priv->drm, encoder,
>  				    crtc_state->uapi.encoder_mask)
> diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
> index 3faea903b9ae..b83b59cf2b78 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> @@ -1126,7 +1126,7 @@ void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
>  	u32 dss_ctl1_val = 0;
>  
>  	if (crtc_state->bigjoiner && !crtc_state->dsc.compression_enable) {
> -		if (crtc_state->bigjoiner_slave)
> +		if (intel_crtc_is_bigjoiner_slave(crtc_state))
>  			dss_ctl1_val |= UNCOMPRESSED_JOINER_SLAVE;
>  		else
>  			dss_ctl1_val |= UNCOMPRESSED_JOINER_MASTER;
> @@ -1154,7 +1154,7 @@ void intel_dsc_enable(const struct intel_crtc_state *crtc_state)
>  	}
>  	if (crtc_state->bigjoiner) {
>  		dss_ctl1_val |= BIG_JOINER_ENABLE;
> -		if (!crtc_state->bigjoiner_slave)
> +		if (!intel_crtc_is_bigjoiner_slave(crtc_state))
>  			dss_ctl1_val |= MASTER_BIG_JOINER_ENABLE;
>  	}
>  	intel_de_write(dev_priv, dss_ctl1_reg(crtc, crtc_state->cpu_transcoder), dss_ctl1_val);
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask
  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ä
  0 siblings, 1 reply; 41+ messages in thread
From: Navare, Manasi @ 2022-02-04 23:58 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:23PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Get rid of the inflexible bigjoiner_linked_crtc pointer thing
> and just track things as a bitmask of pipes instead. We can
> also nuke the bigjoiner_slave boolean as the role of the pipe
> can be determined from its position in the bitmask.
> 
> It might be possible to nuke the bigjoiner boolean as well
> if we make encoder.compute_config() do the bitmask assignment
> directly for the master pipe. But for now I left that alone so
> that encoer.compute_config() will just flag the state as needing
> bigjoiner, and the intel_atomic_check_bigjoiner() is still
> responsible for determining the bitmask. But that may have to change
> as the encoder may be in the best position to determine how
> exactly we should populate the bitmask.
> 
> Most places that just looked at the single bigjoiner_linked_crtc
> now iterate over the whole bitmask, eliminating the singular
> slave pipe assumption.

Okay so trying to understand the design here:
For Pipe A + B Bigjoiner and C + D bigjoiner for example,
bitmasks will be as below:

A : 0011
B:  0011

C: 1100
D: 1100

Is this correct understanding? Because we would mark both the master pipe and slave pipe in a bitmask right?

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  .../gpu/drm/i915/display/intel_atomic_plane.c |   5 +-
>  drivers/gpu/drm/i915/display/intel_ddi.c      |  12 +-
>  drivers/gpu/drm/i915/display/intel_display.c  | 305 ++++++++++++------
>  drivers/gpu/drm/i915/display/intel_display.h  |   2 +
>  .../drm/i915/display/intel_display_debugfs.c  |   5 +-
>  .../drm/i915/display/intel_display_types.h    |   7 +-
>  .../drm/i915/display/intel_plane_initial.c    |   7 -
>  drivers/gpu/drm/i915/display/intel_vdsc.c     |  43 ---
>  drivers/gpu/drm/i915/display/intel_vdsc.h     |   1 -
>  9 files changed, 227 insertions(+), 160 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 41d52889dfce..0e15fe908855 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -404,9 +404,10 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
>  		intel_atomic_get_new_crtc_state(state, crtc);
>  
>  	if (new_crtc_state && intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
> +		struct intel_crtc *master_crtc =
> +			intel_master_crtc(new_crtc_state);
>  		struct intel_plane *master_plane =
> -			intel_crtc_get_plane(new_crtc_state->bigjoiner_linked_crtc,
> -					     plane->id);
> +			intel_crtc_get_plane(master_crtc, plane->id);
>  
>  		new_master_plane_state =
>  			intel_atomic_get_new_plane_state(state, master_plane);
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index 3f0e1e127595..9dee12986991 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -2703,6 +2703,7 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
>  	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
>  	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
>  	bool is_tc_port = intel_phy_is_tc(dev_priv, phy);
> +	struct intel_crtc *slave_crtc;
>  
>  	if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST)) {
>  		intel_crtc_vblank_off(old_crtc_state);
> @@ -2721,9 +2722,8 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
>  			ilk_pfit_disable(old_crtc_state);
>  	}
>  
> -	if (old_crtc_state->bigjoiner_linked_crtc) {
> -		struct intel_crtc *slave_crtc =
> -			old_crtc_state->bigjoiner_linked_crtc;
> +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
> +					 intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
>  		const struct intel_crtc_state *old_slave_crtc_state =
>  			intel_atomic_get_old_crtc_state(state, slave_crtc);
>  
> @@ -3041,6 +3041,7 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
>  			 struct intel_encoder *encoder,
>  			 struct intel_crtc *crtc)
>  {
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	struct intel_crtc_state *crtc_state =
>  		crtc ? intel_atomic_get_new_crtc_state(state, crtc) : NULL;
>  	int required_lanes = crtc_state ? crtc_state->lane_count : 1;
> @@ -3050,11 +3051,12 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
>  	intel_tc_port_get_link(enc_to_dig_port(encoder),
>  		               required_lanes);
>  	if (crtc_state && crtc_state->hw.active) {
> -		struct intel_crtc *slave_crtc = crtc_state->bigjoiner_linked_crtc;
> +		struct intel_crtc *slave_crtc;
>  
>  		intel_update_active_dpll(state, crtc, encoder);
>  
> -		if (slave_crtc)
> +		for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
> +						 intel_crtc_bigjoiner_slave_pipes(crtc_state))
>  			intel_update_active_dpll(state, slave_crtc, encoder);
>  	}
>  }
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 34b6b4ab3a1b..f5fc283f8f73 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -337,20 +337,38 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
>  		is_trans_port_sync_slave(crtc_state);
>  }
>  
> +static enum pipe bigjoiner_master_pipe(const struct intel_crtc_state *crtc_state)
> +{
> +	return ffs(crtc_state->bigjoiner_pipes) - 1;

Here we have both master and slave pipe bits set in a bitmask: This would result in ffs(0011) -1 = 2 which wouldnt be correct?

> +}
> +
> +u8 intel_crtc_bigjoiner_slave_pipes(const struct intel_crtc_state *crtc_state)
> +{
> +	return crtc_state->bigjoiner_pipes & ~BIT(bigjoiner_master_pipe(crtc_state));
> +}
> +
>  bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
>  {
> -	return crtc_state->bigjoiner_slave;
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +
> +	return crtc_state->bigjoiner_pipes &&
> +		crtc->pipe != bigjoiner_master_pipe(crtc_state);
>  }
>  
>  bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
>  {
> -	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +
> +	return crtc_state->bigjoiner_pipes &&
> +		crtc->pipe == bigjoiner_master_pipe(crtc_state);
>  }
>  
> -static struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
> +struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state)
>  {
> +	struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
> +
>  	if (intel_crtc_is_bigjoiner_slave(crtc_state))
> -		return crtc_state->bigjoiner_linked_crtc;
> +		return intel_crtc_for_pipe(i915, bigjoiner_master_pipe(crtc_state));
>  	else
>  		return to_intel_crtc(crtc_state->uapi.crtc);
>  }
> @@ -4111,6 +4129,37 @@ static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
>  		 *master_pipes, *slave_pipes);
>  }
>  
> +static enum pipe get_bigjoiner_master_pipe(enum pipe pipe, u8 master_pipes, u8 slave_pipes)
> +{
> +	if ((slave_pipes & BIT(pipe)) == 0)
> +		return pipe;
> +
> +	/* ignore everything above our pipe */
> +	master_pipes &= ~GENMASK(7, pipe);
> +
> +	/* highest remaining bit should be our master pipe */
> +	return fls(master_pipes) - 1;
> +}
> +
> +static u8 get_bigjoiner_slave_pipes(enum pipe pipe, u8 master_pipes, u8 slave_pipes)
> +{
> +	enum pipe master_pipe, next_master_pipe;
> +
> +	master_pipe = get_bigjoiner_master_pipe(pipe, master_pipes, slave_pipes);
> +
> +	if ((master_pipes & BIT(master_pipe)) == 0)
> +		return 0;
> +
> +	/* ignore our master pipe and everything below it */
> +	master_pipes &= ~GENMASK(master_pipe, 0);
> +	/* make sure a high bit is set for the ffs() */
> +	master_pipes |= BIT(7);
> +	/* lowest remaining bit should be the next master pipe */
> +	next_master_pipe = ffs(master_pipes) - 1;
> +
> +	return slave_pipes & GENMASK(next_master_pipe - 1, master_pipe);
> +}
> +
>  static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
>  {
>  	u8 panel_transcoder_mask = BIT(TRANSCODER_EDP);
> @@ -4181,7 +4230,8 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
>  	/* bigjoiner slave -> consider the master pipe's transcoder as well */
>  	enabled_bigjoiner_pipes(dev_priv, &master_pipes, &slave_pipes);
>  	if (slave_pipes & BIT(crtc->pipe)) {
> -		cpu_transcoder = (enum transcoder) crtc->pipe - 1;
> +		cpu_transcoder = (enum transcoder)
> +			get_bigjoiner_master_pipe(crtc->pipe, master_pipes, slave_pipes);
>  		if (transcoder_ddi_func_is_enabled(dev_priv, cpu_transcoder))
>  			enabled_transcoders |= BIT(cpu_transcoder);
>  	}
> @@ -4306,6 +4356,24 @@ static bool bxt_get_dsi_transcoder_state(struct intel_crtc *crtc,
>  	return transcoder_is_dsi(pipe_config->cpu_transcoder);
>  }
>  
> +static void intel_bigjoiner_get_config(struct intel_crtc_state *crtc_state)
> +{
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +	struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> +	u8 master_pipes, slave_pipes;
> +	enum pipe pipe = crtc->pipe;
> +
> +	enabled_bigjoiner_pipes(i915, &master_pipes, &slave_pipes);
> +
> +	if (((master_pipes | slave_pipes) & BIT(pipe)) == 0)
> +		return;
> +
> +	crtc_state->bigjoiner = true;
> +	crtc_state->bigjoiner_pipes =
> +		BIT(get_bigjoiner_master_pipe(pipe, master_pipes, slave_pipes)) |
> +		get_bigjoiner_slave_pipes(pipe, master_pipes, slave_pipes);
> +}
> +
>  static bool hsw_get_pipe_config(struct intel_crtc *crtc,
>  				struct intel_crtc_state *pipe_config)
>  {
> @@ -4332,8 +4400,7 @@ static bool hsw_get_pipe_config(struct intel_crtc *crtc,
>  		goto out;
>  
>  	intel_dsc_get_config(pipe_config);
> -	if (DISPLAY_VER(dev_priv) >= 13 && !pipe_config->dsc.compression_enable)
> -		intel_uncompressed_joiner_get_config(pipe_config);
> +	intel_bigjoiner_get_config(pipe_config);
>  
>  	if (!transcoder_is_dsi(pipe_config->cpu_transcoder) ||
>  	    DISPLAY_VER(dev_priv) >= 11)
> @@ -5615,9 +5682,10 @@ static void intel_dump_pipe_config(const struct intel_crtc_state *pipe_config,
>  		    transcoder_name(pipe_config->master_transcoder),
>  		    pipe_config->sync_mode_slaves_mask);
>  
> -	drm_dbg_kms(&dev_priv->drm, "bigjoiner: %s\n",
> +	drm_dbg_kms(&dev_priv->drm, "bigjoiner: %s, pipes: 0x%x\n",
>  		    intel_crtc_is_bigjoiner_slave(pipe_config) ? "slave" :
> -		    intel_crtc_is_bigjoiner_master(pipe_config) ? "master" : "no");
> +		    intel_crtc_is_bigjoiner_master(pipe_config) ? "master" : "no",
> +		    pipe_config->bigjoiner_pipes);
>  
>  	drm_dbg_kms(&dev_priv->drm, "splitter: %s, link count %d, overlap %d\n",
>  		    enableddisabled(pipe_config->splitter.enable),
> @@ -6699,8 +6767,7 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
>  	PIPE_CONF_CHECK_X(sync_mode_slaves_mask);
>  	PIPE_CONF_CHECK_I(master_transcoder);
>  	PIPE_CONF_CHECK_BOOL(bigjoiner);
> -	PIPE_CONF_CHECK_BOOL(bigjoiner_slave);
> -	PIPE_CONF_CHECK_P(bigjoiner_linked_crtc);
> +	PIPE_CONF_CHECK_X(bigjoiner_pipes);
>  
>  	PIPE_CONF_CHECK_I(dsc.compression_enable);
>  	PIPE_CONF_CHECK_I(dsc.dsc_split);
> @@ -7486,20 +7553,25 @@ static int intel_crtc_add_bigjoiner_planes(struct intel_atomic_state *state,
>  
>  static int intel_bigjoiner_add_affected_planes(struct intel_atomic_state *state)
>  {
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	const struct intel_crtc_state *crtc_state;
>  	struct intel_crtc *crtc;
>  	int i;
>  
>  	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
> -		int ret;
> +		struct intel_crtc *other;
>  
> -		if (!crtc_state->bigjoiner)
> -			continue;
> +		for_each_intel_crtc_in_pipe_mask(&i915->drm, other,
> +						 crtc_state->bigjoiner_pipes) {
> +			int ret;
>  
> -		ret = intel_crtc_add_bigjoiner_planes(state, crtc,
> -						      crtc_state->bigjoiner_linked_crtc);
> -		if (ret)
> -			return ret;
> +			if (crtc == other)
> +				continue;
> +
> +			ret = intel_crtc_add_bigjoiner_planes(state, crtc, other);
> +			if (ret)
> +				return ret;
> +		}
>  	}
>  
>  	return 0;
> @@ -7601,84 +7673,123 @@ static bool intel_cpu_transcoders_need_modeset(struct intel_atomic_state *state,
>  	return false;
>  }
>  
> +static bool intel_pipes_need_modeset(struct intel_atomic_state *state,
> +				     u8 pipes)
> +{
> +	const struct intel_crtc_state *new_crtc_state;
> +	struct intel_crtc *crtc;
> +	int i;
> +
> +	for_each_new_intel_crtc_in_state(state, crtc, new_crtc_state, i) {
> +		if (new_crtc_state->hw.enable &&
> +		    pipes & BIT(crtc->pipe) &&
> +		    intel_crtc_needs_modeset(new_crtc_state))
> +			return true;
> +	}
> +
> +	return false;
> +}
> +
>  static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
>  					struct intel_crtc *master_crtc)
>  {
>  	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	struct intel_crtc_state *master_crtc_state =
>  		intel_atomic_get_new_crtc_state(state, master_crtc);
> -	struct intel_crtc_state *slave_crtc_state;
>  	struct intel_crtc *slave_crtc;
> +	u8 slave_pipes;
>  
> -	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
> -	WARN_ON(intel_crtc_is_bigjoiner_slave(master_crtc_state));
> +	/*
> +	 * TODO: encoder.compute_config() may be the best
> +	 * place to populate the bitmask for the master crtc.
> +	 * For now encoder.compute_config() just flags things
> +	 * as needing bigjoiner and we populate the bitmask
> +	 * here.
> +	 */
> +	WARN_ON(master_crtc_state->bigjoiner_pipes);
>  
>  	if (!master_crtc_state->bigjoiner)
>  		return 0;
>  
> -	slave_crtc = intel_dsc_get_bigjoiner_secondary(master_crtc);
> -	if (!slave_crtc) {
> +	slave_pipes = BIT(master_crtc->pipe + 1);
> +
> +	if (slave_pipes & ~bigjoiner_pipes(i915)) {
>  		drm_dbg_kms(&i915->drm,
> -			    "[CRTC:%d:%s] Big joiner configuration requires "
> -			    "CRTC + 1 to be used, doesn't exist\n",
> +			    "[CRTC:%d:%s] Cannot act as big joiner master "
> +			    "(need 0x%x as slave pipes, only 0x%x possible)\n",
> +			    master_crtc->base.base.id, master_crtc->base.name,
> +			    slave_pipes, bigjoiner_pipes(i915));
> +		return -EINVAL;

I dont get how we are checking for the invalid slave pipe here?
slave_pipes = BIT(1) = 0010
bigjoiner_pipes = 0000 (since we havents et anything in compute config)
so slave_pipes & ~bigjoiner_pipes = 0010 & 1111 = 0010 so the condition will be true
And then we are flagging it as error why?

Manasi

> +	}
> +
> +	for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc, slave_pipes) {
> +		struct intel_crtc_state *slave_crtc_state;
> +		int ret;
> +
> +		slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
> +		if (IS_ERR(slave_crtc_state))
> +			return PTR_ERR(slave_crtc_state);
> +
> +		/* master being enabled, slave was already configured? */
> +		if (slave_crtc_state->uapi.enable) {
> +			drm_dbg_kms(&i915->drm,
> +				    "[CRTC:%d:%s] Slave is enabled as normal CRTC, but "
> +				    "[CRTC:%d:%s] claiming this CRTC for bigjoiner.\n",
> +				    slave_crtc->base.base.id, slave_crtc->base.name,
> +				    master_crtc->base.base.id, master_crtc->base.name);
> +			return -EINVAL;
> +		}
> +
> +		/*
> +		 * The state copy logic assumes the master crtc gets processed
> +		 * before the slave crtc during the main compute_config loop.
> +		 * This works because the crtcs are created in pipe order,
> +		 * and the hardware requires master pipe < slave pipe as well.
> +		 * Should that change we need to rethink the logic.
> +		 */
> +		if (WARN_ON(drm_crtc_index(&master_crtc->base) >
> +			    drm_crtc_index(&slave_crtc->base)))
> +			return -EINVAL;
> +
> +		drm_dbg_kms(&i915->drm,
> +			    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
> +			    slave_crtc->base.base.id, slave_crtc->base.name,
>  			    master_crtc->base.base.id, master_crtc->base.name);
> -		return -EINVAL;
> +
> +		master_crtc_state->bigjoiner_pipes =
> +			BIT(master_crtc->pipe) | BIT(slave_crtc->pipe);
> +		slave_crtc_state->bigjoiner_pipes =
> +			BIT(master_crtc->pipe) | BIT(slave_crtc->pipe);
> +
> +		ret = copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
> +		if (ret)
> +			return ret;
>  	}
>  
> -	slave_crtc_state = intel_atomic_get_crtc_state(&state->base, slave_crtc);
> -	if (IS_ERR(slave_crtc_state))
> -		return PTR_ERR(slave_crtc_state);
> -
> -	/* master being enabled, slave was already configured? */
> -	if (slave_crtc_state->uapi.enable)
> -		goto claimed;
> -
> -	/*
> -	 * The state copy logic assumes the master crtc gets processed
> -	 * before the slave crtc during the main compute_config loop.
> -	 * This works because the crtcs are created in pipe order,
> -	 * and the hardware requires master pipe < slave pipe as well.
> -	 * Should that change we need to rethink the logic.
> -	 */
> -	if (WARN_ON(drm_crtc_index(&master_crtc->base) > drm_crtc_index(&slave_crtc->base)))
> -		return -EINVAL;
> -
> -	drm_dbg_kms(&i915->drm,
> -		    "[CRTC:%d:%s] Used as slave for big joiner master [CRTC:%d:%s]\n",
> -		    slave_crtc->base.base.id, slave_crtc->base.name,
> -		    master_crtc->base.base.id, master_crtc->base.name);
> -
> -	master_crtc_state->bigjoiner_linked_crtc = slave_crtc;
> -	master_crtc_state->bigjoiner_slave = false;
> -
> -	slave_crtc_state->bigjoiner_linked_crtc = master_crtc;
> -	slave_crtc_state->bigjoiner_slave = true;
> -
> -	return copy_bigjoiner_crtc_state_modeset(state, slave_crtc);
> -
> -claimed:
> -	drm_dbg_kms(&i915->drm,
> -		    "[CRTC:%d:%s] Slave is enabled as normal CRTC, but "
> -		    "[CRTC:%d:%s] claiming this CRTC for bigjoiner.\n",
> -		    slave_crtc->base.base.id, slave_crtc->base.name,
> -		    master_crtc->base.base.id, master_crtc->base.name);
> -	return -EINVAL;
> +	return 0;
>  }
>  
>  static void kill_bigjoiner_slave(struct intel_atomic_state *state,
>  				 struct intel_crtc *master_crtc)
>  {
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	struct intel_crtc_state *master_crtc_state =
>  		intel_atomic_get_new_crtc_state(state, master_crtc);
> -	struct intel_crtc *slave_crtc = master_crtc_state->bigjoiner_linked_crtc;
> -	struct intel_crtc_state *slave_crtc_state =
> -		intel_atomic_get_new_crtc_state(state, slave_crtc);
> +	struct intel_crtc *slave_crtc;
>  
> -	slave_crtc_state->bigjoiner = master_crtc_state->bigjoiner = false;
> -	slave_crtc_state->bigjoiner_slave = master_crtc_state->bigjoiner_slave = false;
> -	slave_crtc_state->bigjoiner_linked_crtc = master_crtc_state->bigjoiner_linked_crtc = NULL;
> +	for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
> +					 intel_crtc_bigjoiner_slave_pipes(master_crtc_state)) {
> +		struct intel_crtc_state *slave_crtc_state =
> +			intel_atomic_get_new_crtc_state(state, slave_crtc);
>  
> -	intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
> +		slave_crtc_state->bigjoiner = false;
> +		slave_crtc_state->bigjoiner_pipes = 0;
> +
> +		intel_crtc_copy_uapi_to_hw_state_modeset(state, slave_crtc);
> +	}
> +
> +	master_crtc_state->bigjoiner = false;
> +	master_crtc_state->bigjoiner_pipes = 0;
>  }
>  
>  /**
> @@ -7828,34 +7939,37 @@ static int intel_atomic_check_async(struct intel_atomic_state *state, struct int
>  
>  static int intel_bigjoiner_add_affected_crtcs(struct intel_atomic_state *state)
>  {
> +	struct drm_i915_private *i915 = to_i915(state->base.dev);
>  	struct intel_crtc_state *crtc_state;
>  	struct intel_crtc *crtc;
> +	u8 affected_pipes = 0;
> +	u8 modeset_pipes = 0;
>  	int i;
>  
>  	for_each_new_intel_crtc_in_state(state, crtc, crtc_state, i) {
> -		struct intel_crtc_state *linked_crtc_state;
> -		struct intel_crtc *linked_crtc;
> +		affected_pipes |= crtc_state->bigjoiner_pipes;
> +		if (intel_crtc_needs_modeset(crtc_state))
> +			modeset_pipes |= crtc_state->bigjoiner_pipes;
> +	}
> +
> +	for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, affected_pipes) {
> +		crtc_state = intel_atomic_get_crtc_state(&state->base, crtc);
> +		if (IS_ERR(crtc_state))
> +			return PTR_ERR(crtc_state);
> +	}
> +
> +	for_each_intel_crtc_in_pipe_mask(&i915->drm, crtc, modeset_pipes) {
>  		int ret;
>  
> -		if (!crtc_state->bigjoiner)
> -			continue;
> +		crtc_state = intel_atomic_get_new_crtc_state(state, crtc);
>  
> -		linked_crtc = crtc_state->bigjoiner_linked_crtc;
> -		linked_crtc_state = intel_atomic_get_crtc_state(&state->base, linked_crtc);
> -		if (IS_ERR(linked_crtc_state))
> -			return PTR_ERR(linked_crtc_state);
> +		crtc_state->uapi.mode_changed = true;
>  
> -		if (!intel_crtc_needs_modeset(crtc_state))
> -			continue;
> -
> -		linked_crtc_state->uapi.mode_changed = true;
> -
> -		ret = drm_atomic_add_affected_connectors(&state->base,
> -							 &linked_crtc->base);
> +		ret = drm_atomic_add_affected_connectors(&state->base, &crtc->base);
>  		if (ret)
>  			return ret;
>  
> -		ret = intel_atomic_add_affected_planes(state, linked_crtc);
> +		ret = intel_atomic_add_affected_planes(state, crtc);
>  		if (ret)
>  			return ret;
>  	}
> @@ -7985,10 +8099,7 @@ static int intel_atomic_check(struct drm_device *dev,
>  		}
>  
>  		if (new_crtc_state->bigjoiner) {
> -			struct intel_crtc_state *linked_crtc_state =
> -				intel_atomic_get_new_crtc_state(state, new_crtc_state->bigjoiner_linked_crtc);
> -
> -			if (intel_crtc_needs_modeset(linked_crtc_state)) {
> +			if (intel_pipes_need_modeset(state, new_crtc_state->bigjoiner_pipes)) {
>  				new_crtc_state->uapi.mode_changed = true;
>  				new_crtc_state->update_pipe = false;
>  			}
> @@ -10390,12 +10501,18 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
>  
>  			/* read out to slave crtc as well for bigjoiner */
>  			if (crtc_state->bigjoiner) {
> +				struct intel_crtc *slave_crtc;
> +
>  				/* encoder should read be linked to bigjoiner master */
>  				WARN_ON(intel_crtc_is_bigjoiner_slave(crtc_state));
>  
> -				crtc = crtc_state->bigjoiner_linked_crtc;
> -				crtc_state = to_intel_crtc_state(crtc->base.state);
> -				intel_encoder_get_config(encoder, crtc_state);
> +				for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
> +								 intel_crtc_bigjoiner_slave_pipes(crtc_state)) {
> +					struct intel_crtc_state *slave_crtc_state;
> +
> +					slave_crtc_state = to_intel_crtc_state(slave_crtc->base.state);
> +					intel_encoder_get_config(encoder, slave_crtc_state);
> +				}
>  			}
>  		} else {
>  			encoder->base.crtc = NULL;
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index fe9eb3acee65..d8c5c507f54b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -557,6 +557,8 @@ enum phy intel_port_to_phy(struct drm_i915_private *i915, enum port port);
>  bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
>  bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
>  bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
> +u8 intel_crtc_bigjoiner_slave_pipes(const struct intel_crtc_state *crtc_state);
> +struct intel_crtc *intel_master_crtc(const struct intel_crtc_state *crtc_state);
>  
>  void intel_plane_destroy(struct drm_plane *plane);
>  void intel_enable_transcoder(const struct intel_crtc_state *new_crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 053c74afe721..1738a4050773 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -936,9 +936,8 @@ static void intel_crtc_info(struct seq_file *m, struct intel_crtc *crtc)
>  	}
>  
>  	if (crtc_state->bigjoiner)
> -		seq_printf(m, "\tLinked to [CRTC:%d:%s] as a %s\n",
> -			   crtc_state->bigjoiner_linked_crtc->base.base.id,
> -			   crtc_state->bigjoiner_linked_crtc->base.name,
> +		seq_printf(m, "\tLinked to 0x%x pipes as a %s\n",
> +			   crtc_state->bigjoiner_pipes,
>  			   intel_crtc_is_bigjoiner_slave(crtc_state) ? "slave" : "master");
>  
>  	for_each_intel_encoder_mask(&dev_priv->drm, encoder,
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 60e15226a8cb..641ecae42198 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1202,11 +1202,8 @@ struct intel_crtc_state {
>  	/* enable pipe big joiner? */
>  	bool bigjoiner;
>  
> -	/* big joiner slave crtc? */
> -	bool bigjoiner_slave;
> -
> -	/* linked crtc for bigjoiner, either slave or master */
> -	struct intel_crtc *bigjoiner_linked_crtc;
> +	/* big joiner pipe bitmask */
> +	u8 bigjoiner_pipes;
>  
>  	/* Display Stream compression state */
>  	struct {
> diff --git a/drivers/gpu/drm/i915/display/intel_plane_initial.c b/drivers/gpu/drm/i915/display/intel_plane_initial.c
> index e4186a0b8edb..542227d6d2f9 100644
> --- a/drivers/gpu/drm/i915/display/intel_plane_initial.c
> +++ b/drivers/gpu/drm/i915/display/intel_plane_initial.c
> @@ -165,8 +165,6 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
>  {
>  	struct drm_device *dev = crtc->base.dev;
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	struct intel_crtc_state *crtc_state =
> -		to_intel_crtc_state(crtc->base.state);
>  	struct intel_plane *plane =
>  		to_intel_plane(crtc->base.primary);
>  	struct intel_plane_state *plane_state =
> @@ -203,11 +201,6 @@ intel_find_initial_plane_obj(struct intel_crtc *crtc,
>  	 * pretend the BIOS never had it enabled.
>  	 */
>  	intel_plane_disable_noatomic(crtc, plane);
> -	if (crtc_state->bigjoiner) {
> -		struct intel_crtc *slave =
> -			crtc_state->bigjoiner_linked_crtc;
> -		intel_plane_disable_noatomic(slave, to_intel_plane(slave->base.primary));
> -	}
>  
>  	return;
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i915/display/intel_vdsc.c
> index b83b59cf2b78..545eff5bf158 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> @@ -1107,18 +1107,6 @@ static i915_reg_t dss_ctl2_reg(struct intel_crtc *crtc, enum transcoder cpu_tran
>  		ICL_PIPE_DSS_CTL2(crtc->pipe) : DSS_CTL2;
>  }
>  
> -struct intel_crtc *
> -intel_dsc_get_bigjoiner_secondary(const struct intel_crtc *primary_crtc)
> -{
> -	return intel_crtc_for_pipe(to_i915(primary_crtc->base.dev), primary_crtc->pipe + 1);
> -}
> -
> -static struct intel_crtc *
> -intel_dsc_get_bigjoiner_primary(const struct intel_crtc *secondary_crtc)
> -{
> -	return intel_crtc_for_pipe(to_i915(secondary_crtc->base.dev), secondary_crtc->pipe - 1);
> -}
> -
>  void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
>  {
>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> @@ -1174,25 +1162,6 @@ void intel_dsc_disable(const struct intel_crtc_state *old_crtc_state)
>  	}
>  }
>  
> -void intel_uncompressed_joiner_get_config(struct intel_crtc_state *crtc_state)
> -{
> -	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> -	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> -	u32 dss_ctl1;
> -
> -	dss_ctl1 = intel_de_read(dev_priv, dss_ctl1_reg(crtc, crtc_state->cpu_transcoder));
> -	if (dss_ctl1 & UNCOMPRESSED_JOINER_MASTER) {
> -		crtc_state->bigjoiner = true;
> -		crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
> -		drm_WARN_ON(&dev_priv->drm, !crtc_state->bigjoiner_linked_crtc);
> -	} else if (dss_ctl1 & UNCOMPRESSED_JOINER_SLAVE) {
> -		crtc_state->bigjoiner = true;
> -		crtc_state->bigjoiner_slave = true;
> -		crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_primary(crtc);
> -		drm_WARN_ON(&dev_priv->drm, !crtc_state->bigjoiner_linked_crtc);
> -	}
> -}
> -
>  void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
>  {
>  	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> @@ -1223,18 +1192,6 @@ void intel_dsc_get_config(struct intel_crtc_state *crtc_state)
>  	crtc_state->dsc.dsc_split = (dss_ctl2 & RIGHT_BRANCH_VDSC_ENABLE) &&
>  		(dss_ctl1 & JOINER_ENABLE);
>  
> -	if (dss_ctl1 & BIG_JOINER_ENABLE) {
> -		crtc_state->bigjoiner = true;
> -
> -		if (!(dss_ctl1 & MASTER_BIG_JOINER_ENABLE)) {
> -			crtc_state->bigjoiner_slave = true;
> -			crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_primary(crtc);
> -		} else {
> -			crtc_state->bigjoiner_linked_crtc = intel_dsc_get_bigjoiner_secondary(crtc);
> -		}
> -		drm_WARN_ON(&dev_priv->drm, !crtc_state->bigjoiner_linked_crtc);
> -	}
> -
>  	/* FIXME: add more state readout as needed */
>  
>  	/* PPS1 */
> diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.h b/drivers/gpu/drm/i915/display/intel_vdsc.h
> index 4ec75f715986..8763f00fa7e2 100644
> --- a/drivers/gpu/drm/i915/display/intel_vdsc.h
> +++ b/drivers/gpu/drm/i915/display/intel_vdsc.h
> @@ -18,7 +18,6 @@ void intel_uncompressed_joiner_enable(const struct intel_crtc_state *crtc_state)
>  void intel_dsc_enable(const struct intel_crtc_state *crtc_state);
>  void intel_dsc_disable(const struct intel_crtc_state *crtc_state);
>  int intel_dsc_compute_params(struct intel_crtc_state *pipe_config);
> -void intel_uncompressed_joiner_get_config(struct intel_crtc_state *crtc_state);
>  void intel_dsc_get_config(struct intel_crtc_state *crtc_state);
>  enum intel_display_power_domain
>  intel_dsc_power_domain(struct intel_crtc *crtc, enum transcoder cpu_transcoder);
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask
  2022-02-04 23:58   ` Navare, Manasi
@ 2022-02-07  7:31     ` Ville Syrjälä
  2022-02-07 23:56       ` Navare, Manasi
  0 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjälä @ 2022-02-07  7:31 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: intel-gfx

On Fri, Feb 04, 2022 at 03:58:29PM -0800, Navare, Manasi wrote:
> On Thu, Feb 03, 2022 at 08:38:23PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Get rid of the inflexible bigjoiner_linked_crtc pointer thing
> > and just track things as a bitmask of pipes instead. We can
> > also nuke the bigjoiner_slave boolean as the role of the pipe
> > can be determined from its position in the bitmask.
> > 
> > It might be possible to nuke the bigjoiner boolean as well
> > if we make encoder.compute_config() do the bitmask assignment
> > directly for the master pipe. But for now I left that alone so
> > that encoer.compute_config() will just flag the state as needing
> > bigjoiner, and the intel_atomic_check_bigjoiner() is still
> > responsible for determining the bitmask. But that may have to change
> > as the encoder may be in the best position to determine how
> > exactly we should populate the bitmask.
> > 
> > Most places that just looked at the single bigjoiner_linked_crtc
> > now iterate over the whole bitmask, eliminating the singular
> > slave pipe assumption.
> 
> Okay so trying to understand the design here:
> For Pipe A + B Bigjoiner and C + D bigjoiner for example,
> bitmasks will be as below:
> 
> A : 0011
> B:  0011
> 
> C: 1100
> D: 1100
> 
> Is this correct understanding? Because we would mark both the master pipe and slave pipe in a bitmask right?

Yes.

> 
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  .../gpu/drm/i915/display/intel_atomic_plane.c |   5 +-
> >  drivers/gpu/drm/i915/display/intel_ddi.c      |  12 +-
> >  drivers/gpu/drm/i915/display/intel_display.c  | 305 ++++++++++++------
> >  drivers/gpu/drm/i915/display/intel_display.h  |   2 +
> >  .../drm/i915/display/intel_display_debugfs.c  |   5 +-
> >  .../drm/i915/display/intel_display_types.h    |   7 +-
> >  .../drm/i915/display/intel_plane_initial.c    |   7 -
> >  drivers/gpu/drm/i915/display/intel_vdsc.c     |  43 ---
> >  drivers/gpu/drm/i915/display/intel_vdsc.h     |   1 -
> >  9 files changed, 227 insertions(+), 160 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > index 41d52889dfce..0e15fe908855 100644
> > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > @@ -404,9 +404,10 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
> >  		intel_atomic_get_new_crtc_state(state, crtc);
> >  
> >  	if (new_crtc_state && intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
> > +		struct intel_crtc *master_crtc =
> > +			intel_master_crtc(new_crtc_state);
> >  		struct intel_plane *master_plane =
> > -			intel_crtc_get_plane(new_crtc_state->bigjoiner_linked_crtc,
> > -					     plane->id);
> > +			intel_crtc_get_plane(master_crtc, plane->id);
> >  
> >  		new_master_plane_state =
> >  			intel_atomic_get_new_plane_state(state, master_plane);
> > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > index 3f0e1e127595..9dee12986991 100644
> > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > @@ -2703,6 +2703,7 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
> >  	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> >  	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> >  	bool is_tc_port = intel_phy_is_tc(dev_priv, phy);
> > +	struct intel_crtc *slave_crtc;
> >  
> >  	if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST)) {
> >  		intel_crtc_vblank_off(old_crtc_state);
> > @@ -2721,9 +2722,8 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
> >  			ilk_pfit_disable(old_crtc_state);
> >  	}
> >  
> > -	if (old_crtc_state->bigjoiner_linked_crtc) {
> > -		struct intel_crtc *slave_crtc =
> > -			old_crtc_state->bigjoiner_linked_crtc;
> > +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
> > +					 intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
> >  		const struct intel_crtc_state *old_slave_crtc_state =
> >  			intel_atomic_get_old_crtc_state(state, slave_crtc);
> >  
> > @@ -3041,6 +3041,7 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
> >  			 struct intel_encoder *encoder,
> >  			 struct intel_crtc *crtc)
> >  {
> > +	struct drm_i915_private *i915 = to_i915(state->base.dev);
> >  	struct intel_crtc_state *crtc_state =
> >  		crtc ? intel_atomic_get_new_crtc_state(state, crtc) : NULL;
> >  	int required_lanes = crtc_state ? crtc_state->lane_count : 1;
> > @@ -3050,11 +3051,12 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
> >  	intel_tc_port_get_link(enc_to_dig_port(encoder),
> >  		               required_lanes);
> >  	if (crtc_state && crtc_state->hw.active) {
> > -		struct intel_crtc *slave_crtc = crtc_state->bigjoiner_linked_crtc;
> > +		struct intel_crtc *slave_crtc;
> >  
> >  		intel_update_active_dpll(state, crtc, encoder);
> >  
> > -		if (slave_crtc)
> > +		for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
> > +						 intel_crtc_bigjoiner_slave_pipes(crtc_state))
> >  			intel_update_active_dpll(state, slave_crtc, encoder);
> >  	}
> >  }
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 34b6b4ab3a1b..f5fc283f8f73 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -337,20 +337,38 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
> >  		is_trans_port_sync_slave(crtc_state);
> >  }
> >  
> > +static enum pipe bigjoiner_master_pipe(const struct intel_crtc_state *crtc_state)
> > +{
> > +	return ffs(crtc_state->bigjoiner_pipes) - 1;
> 
> Here we have both master and slave pipe bits set in a bitmask: This would result in ffs(0011) -1 = 2 which wouldnt be correct?

ffs(0b0011) == 1

<snip>
> >  static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
> >  					struct intel_crtc *master_crtc)
> >  {
> >  	struct drm_i915_private *i915 = to_i915(state->base.dev);
> >  	struct intel_crtc_state *master_crtc_state =
> >  		intel_atomic_get_new_crtc_state(state, master_crtc);
> > -	struct intel_crtc_state *slave_crtc_state;
> >  	struct intel_crtc *slave_crtc;
> > +	u8 slave_pipes;
> >  
> > -	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
> > -	WARN_ON(intel_crtc_is_bigjoiner_slave(master_crtc_state));
> > +	/*
> > +	 * TODO: encoder.compute_config() may be the best
> > +	 * place to populate the bitmask for the master crtc.
> > +	 * For now encoder.compute_config() just flags things
> > +	 * as needing bigjoiner and we populate the bitmask
> > +	 * here.
> > +	 */
> > +	WARN_ON(master_crtc_state->bigjoiner_pipes);
> >  
> >  	if (!master_crtc_state->bigjoiner)
> >  		return 0;
> >  
> > -	slave_crtc = intel_dsc_get_bigjoiner_secondary(master_crtc);
> > -	if (!slave_crtc) {
> > +	slave_pipes = BIT(master_crtc->pipe + 1);
> > +
> > +	if (slave_pipes & ~bigjoiner_pipes(i915)) {
> >  		drm_dbg_kms(&i915->drm,
> > -			    "[CRTC:%d:%s] Big joiner configuration requires "
> > -			    "CRTC + 1 to be used, doesn't exist\n",
> > +			    "[CRTC:%d:%s] Cannot act as big joiner master "
> > +			    "(need 0x%x as slave pipes, only 0x%x possible)\n",
> > +			    master_crtc->base.base.id, master_crtc->base.name,
> > +			    slave_pipes, bigjoiner_pipes(i915));
> > +		return -EINVAL;
> 
> I dont get how we are checking for the invalid slave pipe here?
> slave_pipes = BIT(1) = 0010
> bigjoiner_pipes = 0000 (since we havents et anything in compute config)

bigjoiner_pipes() is a bitmask of pipes that support bigjoiner.
It is constant for the platform.

> so slave_pipes & ~bigjoiner_pipes = 0010 & 1111 = 0010 so the condition will be true
> And then we are flagging it as error why?

If we come here with eg. master == pipe D on TGL then we'd
mark the non-existent pipe E as the slave. This check will
catch that.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
  2022-02-04 21:27   ` Navare, Manasi
@ 2022-02-07  7:31     ` Ville Syrjälä
  2022-02-15 10:53       ` Nautiyal, Ankit K
  0 siblings, 1 reply; 41+ messages in thread
From: Ville Syrjälä @ 2022-02-07  7:31 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: intel-gfx

On Fri, Feb 04, 2022 at 01:27:54PM -0800, Navare, Manasi wrote:
> On Thu, Feb 03, 2022 at 08:38:19PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Introduce helpers to query whether the crtc is the slave/master
> > for bigjoiner. This decouples most places from the exact
> > state layout we use to track this relationship, allowing us
> > to change and extend it more easily.
> 
> So even with the bitmask approach, we still plan to have bools for bigjoiner_slave?

Nope. No longer necessary.

> 
> > 
> > Performed with cocci:
> > @@
> > expression S, E;
> > @@
> > (
> >   S->bigjoiner_slave = E;
> > |
> > - S->bigjoiner_slave
> > + intel_crtc_is_bigjoiner_slave(S)
> > )
> > 
> > @@
> > expression S, E;
> > @@
> > (
> > - E && S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
> > + E && intel_crtc_is_bigjoiner_master(S)
> > |
> > - S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
> > + intel_crtc_is_bigjoiner_master(S)
> > )
> > 
> > @@
> > expression S;
> > @@
> > - (intel_crtc_is_bigjoiner_master(S))
> > + intel_crtc_is_bigjoiner_master(S)
> > 
> > @@
> > expression S, E1, E2, E3;
> > @@
> > - intel_crtc_is_bigjoiner_slave(S) ? E1 : S->bigjoiner ? E2 : E3
> > + intel_crtc_is_bigjoiner_slave(S) ? E1 : intel_crtc_is_bigjoiner_master(S) ? E2 : E3
> > 
> > @@
> > typedef bool;
> > @@
> > + bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
> > + {
> > + 	return crtc_state->bigjoiner_slave;
> > + }
> > +
> >   intel_master_crtc(...) {...}
> > 
> > @@
> > typedef bool;
> > @@
> > + bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
> > + {
> > + 	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
> > + }
> > +
> >   intel_master_crtc(...) {...}
> > 
> > @@
> > typedef bool;
> > identifier S;
> > @@
> > - bool is_trans_port_sync_mode(const struct intel_crtc_state *S);
> > + bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
> > + bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
> > + bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
> 
> Is all of the above part of the commit message? Dont understand why its changing is_trans_port_sync_mode() ?

I had to touch that line to get coccinelle to actually do the
transformation. For some reason it refused to do anything if
I just tried to add the two new lines.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH v2 04/10] drm/i915: Clean up the bigjoiner state copy logic
  2022-02-04 20:52     ` Navare, Manasi
@ 2022-02-07  7:32       ` Ville Syrjälä
  0 siblings, 0 replies; 41+ messages in thread
From: Ville Syrjälä @ 2022-02-07  7:32 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: intel-gfx

On Fri, Feb 04, 2022 at 12:52:01PM -0800, Navare, Manasi wrote:
> On Fri, Feb 04, 2022 at 09:20:49AM +0200, Ville Syrjala wrote:
<snip>
> >  static int
> > -copy_bigjoiner_crtc_state(struct intel_crtc_state *crtc_state,
> > -			  const struct intel_crtc_state *from_crtc_state)
> > +copy_bigjoiner_crtc_state_modeset(struct intel_atomic_state *state,
> > +				  struct intel_crtc *slave_crtc)
> >  {
> > +	struct intel_crtc_state *slave_crtc_state =
> > +		intel_atomic_get_new_crtc_state(state, slave_crtc);
> > +	struct intel_crtc *master_crtc = intel_master_crtc(slave_crtc_state);
> > +	const struct intel_crtc_state *master_crtc_state =
> > +		intel_atomic_get_new_crtc_state(state, master_crtc);
> >  	struct intel_crtc_state *saved_state;
> >  
> > -	saved_state = kmemdup(from_crtc_state, sizeof(*saved_state), GFP_KERNEL);
> > +	saved_state = kmemdup(master_crtc_state, sizeof(*saved_state), GFP_KERNEL);
> >  	if (!saved_state)
> >  		return -ENOMEM;
> >  
> > -	saved_state->uapi = crtc_state->uapi;
> > -	saved_state->scaler_state = crtc_state->scaler_state;
> > -	saved_state->shared_dpll = crtc_state->shared_dpll;
> > -	saved_state->dpll_hw_state = crtc_state->dpll_hw_state;
> > -	saved_state->crc_enabled = crtc_state->crc_enabled;
> > +	/* preserve some things from the slave's original crtc state */
> > +	saved_state->uapi = slave_crtc_state->uapi;
> > +	saved_state->scaler_state = slave_crtc_state->scaler_state;
> > +	saved_state->shared_dpll = slave_crtc_state->shared_dpll;
> > +	saved_state->dpll_hw_state = slave_crtc_state->dpll_hw_state;
> > +	saved_state->crc_enabled = slave_crtc_state->crc_enabled;
> 
> Slave crtc state here not set at all , so why do we preserve the things from slave's original crtc state and how we
> decide on what all to preserve?

It's the same junk as in intel_crtc_prepare_cleared_state(). There's
a comment there IIRC that explains some of the historical baggage here.
We should fix this mess, but it would require some actual thought.

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 10/10] drm/i915: Change bigjoiner state tracking to use the pipe bitmask
  2022-02-07  7:31     ` Ville Syrjälä
@ 2022-02-07 23:56       ` Navare, Manasi
  0 siblings, 0 replies; 41+ messages in thread
From: Navare, Manasi @ 2022-02-07 23:56 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

On Mon, Feb 07, 2022 at 09:31:19AM +0200, Ville Syrjälä wrote:
> On Fri, Feb 04, 2022 at 03:58:29PM -0800, Navare, Manasi wrote:
> > On Thu, Feb 03, 2022 at 08:38:23PM +0200, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > 
> > > Get rid of the inflexible bigjoiner_linked_crtc pointer thing
> > > and just track things as a bitmask of pipes instead. We can
> > > also nuke the bigjoiner_slave boolean as the role of the pipe
> > > can be determined from its position in the bitmask.
> > > 
> > > It might be possible to nuke the bigjoiner boolean as well
> > > if we make encoder.compute_config() do the bitmask assignment
> > > directly for the master pipe. But for now I left that alone so
> > > that encoer.compute_config() will just flag the state as needing
> > > bigjoiner, and the intel_atomic_check_bigjoiner() is still
> > > responsible for determining the bitmask. But that may have to change
> > > as the encoder may be in the best position to determine how
> > > exactly we should populate the bitmask.
> > > 
> > > Most places that just looked at the single bigjoiner_linked_crtc
> > > now iterate over the whole bitmask, eliminating the singular
> > > slave pipe assumption.
> > 
> > Okay so trying to understand the design here:
> > For Pipe A + B Bigjoiner and C + D bigjoiner for example,
> > bitmasks will be as below:
> > 
> > A : 0011
> > B:  0011
> > 
> > C: 1100
> > D: 1100
> > 
> > Is this correct understanding? Because we would mark both the master pipe and slave pipe in a bitmask right?
> 
> Yes.
> 
> > 
> > > 
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  .../gpu/drm/i915/display/intel_atomic_plane.c |   5 +-
> > >  drivers/gpu/drm/i915/display/intel_ddi.c      |  12 +-
> > >  drivers/gpu/drm/i915/display/intel_display.c  | 305 ++++++++++++------
> > >  drivers/gpu/drm/i915/display/intel_display.h  |   2 +
> > >  .../drm/i915/display/intel_display_debugfs.c  |   5 +-
> > >  .../drm/i915/display/intel_display_types.h    |   7 +-
> > >  .../drm/i915/display/intel_plane_initial.c    |   7 -
> > >  drivers/gpu/drm/i915/display/intel_vdsc.c     |  43 ---
> > >  drivers/gpu/drm/i915/display/intel_vdsc.h     |   1 -
> > >  9 files changed, 227 insertions(+), 160 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > index 41d52889dfce..0e15fe908855 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > > @@ -404,9 +404,10 @@ int intel_plane_atomic_check(struct intel_atomic_state *state,
> > >  		intel_atomic_get_new_crtc_state(state, crtc);
> > >  
> > >  	if (new_crtc_state && intel_crtc_is_bigjoiner_slave(new_crtc_state)) {
> > > +		struct intel_crtc *master_crtc =
> > > +			intel_master_crtc(new_crtc_state);
> > >  		struct intel_plane *master_plane =
> > > -			intel_crtc_get_plane(new_crtc_state->bigjoiner_linked_crtc,
> > > -					     plane->id);
> > > +			intel_crtc_get_plane(master_crtc, plane->id);
> > >  
> > >  		new_master_plane_state =
> > >  			intel_atomic_get_new_plane_state(state, master_plane);
> > > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> > > index 3f0e1e127595..9dee12986991 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > > @@ -2703,6 +2703,7 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
> > >  	struct intel_digital_port *dig_port = enc_to_dig_port(encoder);
> > >  	enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
> > >  	bool is_tc_port = intel_phy_is_tc(dev_priv, phy);
> > > +	struct intel_crtc *slave_crtc;
> > >  
> > >  	if (!intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST)) {
> > >  		intel_crtc_vblank_off(old_crtc_state);
> > > @@ -2721,9 +2722,8 @@ static void intel_ddi_post_disable(struct intel_atomic_state *state,
> > >  			ilk_pfit_disable(old_crtc_state);
> > >  	}
> > >  
> > > -	if (old_crtc_state->bigjoiner_linked_crtc) {
> > > -		struct intel_crtc *slave_crtc =
> > > -			old_crtc_state->bigjoiner_linked_crtc;
> > > +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, slave_crtc,
> > > +					 intel_crtc_bigjoiner_slave_pipes(old_crtc_state)) {
> > >  		const struct intel_crtc_state *old_slave_crtc_state =
> > >  			intel_atomic_get_old_crtc_state(state, slave_crtc);
> > >  
> > > @@ -3041,6 +3041,7 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
> > >  			 struct intel_encoder *encoder,
> > >  			 struct intel_crtc *crtc)
> > >  {
> > > +	struct drm_i915_private *i915 = to_i915(state->base.dev);
> > >  	struct intel_crtc_state *crtc_state =
> > >  		crtc ? intel_atomic_get_new_crtc_state(state, crtc) : NULL;
> > >  	int required_lanes = crtc_state ? crtc_state->lane_count : 1;
> > > @@ -3050,11 +3051,12 @@ intel_ddi_update_prepare(struct intel_atomic_state *state,
> > >  	intel_tc_port_get_link(enc_to_dig_port(encoder),
> > >  		               required_lanes);
> > >  	if (crtc_state && crtc_state->hw.active) {
> > > -		struct intel_crtc *slave_crtc = crtc_state->bigjoiner_linked_crtc;
> > > +		struct intel_crtc *slave_crtc;
> > >  
> > >  		intel_update_active_dpll(state, crtc, encoder);
> > >  
> > > -		if (slave_crtc)
> > > +		for_each_intel_crtc_in_pipe_mask(&i915->drm, slave_crtc,
> > > +						 intel_crtc_bigjoiner_slave_pipes(crtc_state))
> > >  			intel_update_active_dpll(state, slave_crtc, encoder);
> > >  	}
> > >  }
> > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > > index 34b6b4ab3a1b..f5fc283f8f73 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > > @@ -337,20 +337,38 @@ is_trans_port_sync_mode(const struct intel_crtc_state *crtc_state)
> > >  		is_trans_port_sync_slave(crtc_state);
> > >  }
> > >  
> > > +static enum pipe bigjoiner_master_pipe(const struct intel_crtc_state *crtc_state)
> > > +{
> > > +	return ffs(crtc_state->bigjoiner_pipes) - 1;
> > 
> > Here we have both master and slave pipe bits set in a bitmask: This would result in ffs(0011) -1 = 2 which wouldnt be correct?
> 
> ffs(0b0011) == 1

Okay yes sorry yes ffs finds the position of the first least significant bit so should be 1 , and then master pipe would be 0
For when its between C & D, then ffs(1100) will be 3 and master pipe would be 2 which is C so yes this makes sense now.

> 
> <snip>
> > >  static int intel_atomic_check_bigjoiner(struct intel_atomic_state *state,
> > >  					struct intel_crtc *master_crtc)
> > >  {
> > >  	struct drm_i915_private *i915 = to_i915(state->base.dev);
> > >  	struct intel_crtc_state *master_crtc_state =
> > >  		intel_atomic_get_new_crtc_state(state, master_crtc);
> > > -	struct intel_crtc_state *slave_crtc_state;
> > >  	struct intel_crtc *slave_crtc;
> > > +	u8 slave_pipes;
> > >  
> > > -	WARN_ON(master_crtc_state->bigjoiner_linked_crtc);
> > > -	WARN_ON(intel_crtc_is_bigjoiner_slave(master_crtc_state));
> > > +	/*
> > > +	 * TODO: encoder.compute_config() may be the best
> > > +	 * place to populate the bitmask for the master crtc.
> > > +	 * For now encoder.compute_config() just flags things
> > > +	 * as needing bigjoiner and we populate the bitmask
> > > +	 * here.
> > > +	 */
> > > +	WARN_ON(master_crtc_state->bigjoiner_pipes);
> > >  
> > >  	if (!master_crtc_state->bigjoiner)
> > >  		return 0;
> > >  
> > > -	slave_crtc = intel_dsc_get_bigjoiner_secondary(master_crtc);
> > > -	if (!slave_crtc) {
> > > +	slave_pipes = BIT(master_crtc->pipe + 1);
> > > +
> > > +	if (slave_pipes & ~bigjoiner_pipes(i915)) {
> > >  		drm_dbg_kms(&i915->drm,
> > > -			    "[CRTC:%d:%s] Big joiner configuration requires "
> > > -			    "CRTC + 1 to be used, doesn't exist\n",
> > > +			    "[CRTC:%d:%s] Cannot act as big joiner master "
> > > +			    "(need 0x%x as slave pipes, only 0x%x possible)\n",
> > > +			    master_crtc->base.base.id, master_crtc->base.name,
> > > +			    slave_pipes, bigjoiner_pipes(i915));
> > > +		return -EINVAL;
> > 
> > I dont get how we are checking for the invalid slave pipe here?
> > slave_pipes = BIT(1) = 0010
> > bigjoiner_pipes = 0000 (since we havents et anything in compute config)
> 
> bigjoiner_pipes() is a bitmask of pipes that support bigjoiner.
> It is constant for the platform.
> 
> > so slave_pipes & ~bigjoiner_pipes = 0010 & 1111 = 0010 so the condition will be true
> > And then we are flagging it as error why?
> 
> If we come here with eg. master == pipe D on TGL then we'd
> mark the non-existent pipe E as the slave. This check will
> catch that.

Okay yes makes sense, I was mistaking bigjoiner_pipes(i915) with crtc_state->bigjoiner_pipes

Okay with these calrifications,

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> 
> -- 
> Ville Syrjälä
> Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 07/10] drm/i915: Convert for_each_intel_crtc_mask() to take a pipe mask instead
  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
  0 siblings, 0 replies; 41+ messages in thread
From: Navare, Manasi @ 2022-02-09 19:57 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:20PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Often using pipes is more convenient than crtc indices.
> Convert the current for_each_intel_crtc_mask() to take a
> pipe mask instead of a crtc index mask, and rename it to
> for_each_intel_crtc_in_pipe_mask() to make it clear what
> it does.
> 
> The current users of for_each_intel_crtc_mask() don't really
> care which kind of mask we use, but for other uses a pipe
> mask if better.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.h |  4 +--
>  drivers/gpu/drm/i915/display/intel_dp.c      | 34 ++++++++++----------
>  2 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
> index 22e5f0d6e171..fe9eb3acee65 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.h
> +++ b/drivers/gpu/drm/i915/display/intel_display.h
> @@ -430,11 +430,11 @@ enum hpd_pin {
>  			    &(dev)->mode_config.crtc_list,		\
>  			    base.head)
>  
> -#define for_each_intel_crtc_mask(dev, intel_crtc, crtc_mask)		\
> +#define for_each_intel_crtc_in_pipe_mask(dev, intel_crtc, pipe_mask)	\
>  	list_for_each_entry(intel_crtc,					\
>  			    &(dev)->mode_config.crtc_list,		\
>  			    base.head)					\
> -		for_each_if((crtc_mask) & drm_crtc_mask(&intel_crtc->base))
> +		for_each_if((pipe_mask) & BIT(intel_crtc->pipe))
>  
>  #define for_each_intel_encoder(dev, intel_encoder)		\
>  	list_for_each_entry(intel_encoder,			\
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 146b83916005..3fb9f643ebb9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3810,14 +3810,14 @@ static bool intel_dp_has_connector(struct intel_dp *intel_dp,
>  
>  static int intel_dp_prep_link_retrain(struct intel_dp *intel_dp,
>  				      struct drm_modeset_acquire_ctx *ctx,
> -				      u32 *crtc_mask)
> +				      u8 *pipe_mask)
>  {
>  	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
>  	struct drm_connector_list_iter conn_iter;
>  	struct intel_connector *connector;
>  	int ret = 0;
>  
> -	*crtc_mask = 0;
> +	*pipe_mask = 0;
>  
>  	if (!intel_dp_needs_link_retrain(intel_dp))
>  		return 0;
> @@ -3851,12 +3851,12 @@ static int intel_dp_prep_link_retrain(struct intel_dp *intel_dp,
>  		    !try_wait_for_completion(&conn_state->commit->hw_done))
>  			continue;
>  
> -		*crtc_mask |= drm_crtc_mask(&crtc->base);
> +		*pipe_mask |= BIT(crtc->pipe);
>  	}
>  	drm_connector_list_iter_end(&conn_iter);
>  
>  	if (!intel_dp_needs_link_retrain(intel_dp))
> -		*crtc_mask = 0;
> +		*pipe_mask = 0;
>  
>  	return ret;
>  }
> @@ -3875,7 +3875,7 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>  	struct intel_crtc *crtc;
> -	u32 crtc_mask;
> +	u8 pipe_mask;
>  	int ret;
>  
>  	if (!intel_dp_is_connected(intel_dp))
> @@ -3886,17 +3886,17 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
>  	if (ret)
>  		return ret;
>  
> -	ret = intel_dp_prep_link_retrain(intel_dp, ctx, &crtc_mask);
> +	ret = intel_dp_prep_link_retrain(intel_dp, ctx, &pipe_mask);
>  	if (ret)
>  		return ret;
>  
> -	if (crtc_mask == 0)
> +	if (pipe_mask == 0)
>  		return 0;
>  
>  	drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] retraining link\n",
>  		    encoder->base.base.id, encoder->base.name);
>  
> -	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
> +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
>  		const struct intel_crtc_state *crtc_state =
>  			to_intel_crtc_state(crtc->base.state);
>  
> @@ -3907,7 +3907,7 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
>  							      intel_crtc_pch_transcoder(crtc), false);
>  	}
>  
> -	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
> +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
>  		const struct intel_crtc_state *crtc_state =
>  			to_intel_crtc_state(crtc->base.state);
>  
> @@ -3924,7 +3924,7 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
>  		break;
>  	}
>  
> -	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
> +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
>  		const struct intel_crtc_state *crtc_state =
>  			to_intel_crtc_state(crtc->base.state);
>  
> @@ -3942,14 +3942,14 @@ int intel_dp_retrain_link(struct intel_encoder *encoder,
>  
>  static int intel_dp_prep_phy_test(struct intel_dp *intel_dp,
>  				  struct drm_modeset_acquire_ctx *ctx,
> -				  u32 *crtc_mask)
> +				  u8 *pipe_mask)
>  {
>  	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
>  	struct drm_connector_list_iter conn_iter;
>  	struct intel_connector *connector;
>  	int ret = 0;
>  
> -	*crtc_mask = 0;
> +	*pipe_mask = 0;
>  
>  	drm_connector_list_iter_begin(&i915->drm, &conn_iter);
>  	for_each_intel_connector_iter(connector, &conn_iter) {
> @@ -3980,7 +3980,7 @@ static int intel_dp_prep_phy_test(struct intel_dp *intel_dp,
>  		    !try_wait_for_completion(&conn_state->commit->hw_done))
>  			continue;
>  
> -		*crtc_mask |= drm_crtc_mask(&crtc->base);
> +		*pipe_mask |= BIT(crtc->pipe);
>  	}
>  	drm_connector_list_iter_end(&conn_iter);
>  
> @@ -3993,7 +3993,7 @@ static int intel_dp_do_phy_test(struct intel_encoder *encoder,
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
>  	struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
>  	struct intel_crtc *crtc;
> -	u32 crtc_mask;
> +	u8 pipe_mask;
>  	int ret;
>  
>  	ret = drm_modeset_lock(&dev_priv->drm.mode_config.connection_mutex,
> @@ -4001,17 +4001,17 @@ static int intel_dp_do_phy_test(struct intel_encoder *encoder,
>  	if (ret)
>  		return ret;
>  
> -	ret = intel_dp_prep_phy_test(intel_dp, ctx, &crtc_mask);
> +	ret = intel_dp_prep_phy_test(intel_dp, ctx, &pipe_mask);
>  	if (ret)
>  		return ret;
>  
> -	if (crtc_mask == 0)
> +	if (pipe_mask == 0)
>  		return 0;
>  
>  	drm_dbg_kms(&dev_priv->drm, "[ENCODER:%d:%s] PHY test\n",
>  		    encoder->base.base.id, encoder->base.name);
>  
> -	for_each_intel_crtc_mask(&dev_priv->drm, crtc, crtc_mask) {
> +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc, pipe_mask) {
>  		const struct intel_crtc_state *crtc_state =
>  			to_intel_crtc_state(crtc->base.state);
>  
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 08/10] drm/i915: Use for_each_intel_crtc_in_pipe_mask() more
  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
  0 siblings, 0 replies; 41+ messages in thread
From: Navare, Manasi @ 2022-02-09 19:58 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:21PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Convert a few hand roller for_each_intel_crtc_in_pipe_mask()
> to the real thing.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 9a7f40d17b79..6df498fc720a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -4069,14 +4069,12 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
>  	u8 master_pipes = 0, slave_pipes = 0;
>  	struct intel_crtc *crtc;
>  
> -	for_each_intel_crtc(&dev_priv->drm, crtc) {
> +	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
> +					 bigjoiner_pipes(dev_priv)) {
>  		enum intel_display_power_domain power_domain;
>  		enum pipe pipe = crtc->pipe;
>  		intel_wakeref_t wakeref;
>  
> -		if ((bigjoiner_pipes(dev_priv) & BIT(pipe)) == 0)
> -			continue;
> -
>  		power_domain = intel_dsc_power_domain(crtc, (enum transcoder) pipe);
>  		with_intel_display_power_if_enabled(dev_priv, power_domain, wakeref) {
>  			u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
> @@ -8993,10 +8991,8 @@ static u32 intel_encoder_possible_crtcs(struct intel_encoder *encoder)
>  	struct intel_crtc *crtc;
>  	u32 possible_crtcs = 0;
>  
> -	for_each_intel_crtc(dev, crtc) {
> -		if (encoder->pipe_mask & BIT(crtc->pipe))
> -			possible_crtcs |= drm_crtc_mask(&crtc->base);
> -	}
> +	for_each_intel_crtc_in_pipe_mask(dev, crtc, encoder->pipe_mask)
> +		possible_crtcs |= drm_crtc_mask(&crtc->base);
>  
>  	return possible_crtcs;
>  }
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 09/10] drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
  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ä
  0 siblings, 1 reply; 41+ messages in thread
From: Navare, Manasi @ 2022-02-09 20:00 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: intel-gfx

On Thu, Feb 03, 2022 at 08:38:22PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Return both the master and slave pipe bitmasks from
> enabled_bigjoiner_pipes(). We'll have use for both during
> readout soon.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

This looks good, can this be just combined with the patch that would use the slave and mastr pipes
in the readout ?

Either way,

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 25 +++++++++++---------
>  1 file changed, 14 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 6df498fc720a..34b6b4ab3a1b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -4064,11 +4064,14 @@ static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,
>  	return tmp & TRANS_DDI_FUNC_ENABLE;
>  }
>  
> -static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
> +static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
> +				    u8 *master_pipes, u8 *slave_pipes)
>  {
> -	u8 master_pipes = 0, slave_pipes = 0;
>  	struct intel_crtc *crtc;
>  
> +	*master_pipes = 0;
> +	*slave_pipes = 0;
> +
>  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
>  					 bigjoiner_pipes(dev_priv)) {
>  		enum intel_display_power_domain power_domain;
> @@ -4083,9 +4086,9 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
>  				continue;
>  
>  			if (tmp & MASTER_BIG_JOINER_ENABLE)
> -				master_pipes |= BIT(pipe);
> +				*master_pipes |= BIT(pipe);
>  			else
> -				slave_pipes |= BIT(pipe);
> +				*slave_pipes |= BIT(pipe);
>  		}
>  
>  		if (DISPLAY_VER(dev_priv) < 13)
> @@ -4096,18 +4099,16 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
>  			u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
>  
>  			if (tmp & UNCOMPRESSED_JOINER_MASTER)
> -				master_pipes |= BIT(pipe);
> +				*master_pipes |= BIT(pipe);
>  			if (tmp & UNCOMPRESSED_JOINER_SLAVE)
> -				slave_pipes |= BIT(pipe);
> +				*slave_pipes |= BIT(pipe);
>  		}
>  	}
>  
>  	/* Bigjoiner pipes should always be consecutive master and slave */
> -	drm_WARN(&dev_priv->drm, slave_pipes != master_pipes << 1,
> +	drm_WARN(&dev_priv->drm, *slave_pipes != *master_pipes << 1,
>  		 "Bigjoiner misconfigured (master pipes 0x%x, slave pipes 0x%x)\n",
> -		 master_pipes, slave_pipes);
> -
> -	return slave_pipes;
> +		 *master_pipes, *slave_pipes);
>  }
>  
>  static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
> @@ -4126,6 +4127,7 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
>  	struct drm_i915_private *dev_priv = to_i915(dev);
>  	u8 panel_transcoder_mask = hsw_panel_transcoders(dev_priv);
>  	enum transcoder cpu_transcoder;
> +	u8 master_pipes, slave_pipes;
>  	u8 enabled_transcoders = 0;
>  
>  	/*
> @@ -4177,7 +4179,8 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
>  		enabled_transcoders |= BIT(cpu_transcoder);
>  
>  	/* bigjoiner slave -> consider the master pipe's transcoder as well */
> -	if (enabled_bigjoiner_pipes(dev_priv) & BIT(crtc->pipe)) {
> +	enabled_bigjoiner_pipes(dev_priv, &master_pipes, &slave_pipes);
> +	if (slave_pipes & BIT(crtc->pipe)) {
>  		cpu_transcoder = (enum transcoder) crtc->pipe - 1;
>  		if (transcoder_ddi_func_is_enabled(dev_priv, cpu_transcoder))
>  			enabled_transcoders |= BIT(cpu_transcoder);
> -- 
> 2.34.1
> 

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 09/10] drm/i915: Return both master and slave pipes from enabled_bigjoiner_pipes()
  2022-02-09 20:00   ` Navare, Manasi
@ 2022-02-09 20:10     ` Ville Syrjälä
  0 siblings, 0 replies; 41+ messages in thread
From: Ville Syrjälä @ 2022-02-09 20:10 UTC (permalink / raw)
  To: Navare, Manasi; +Cc: intel-gfx

On Wed, Feb 09, 2022 at 12:00:26PM -0800, Navare, Manasi wrote:
> On Thu, Feb 03, 2022 at 08:38:22PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > Return both the master and slave pipe bitmasks from
> > enabled_bigjoiner_pipes(). We'll have use for both during
> > readout soon.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> This looks good, can this be just combined with the patch that would use the slave and mastr pipes
> in the readout ?

I think that patch is already far too big. But I couldn't immediately
think how to split it up even more.

> 
> Either way,
> 
> Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
> 
> Manasi
> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 25 +++++++++++---------
> >  1 file changed, 14 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index 6df498fc720a..34b6b4ab3a1b 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -4064,11 +4064,14 @@ static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,
> >  	return tmp & TRANS_DDI_FUNC_ENABLE;
> >  }
> >  
> > -static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
> > +static void enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv,
> > +				    u8 *master_pipes, u8 *slave_pipes)
> >  {
> > -	u8 master_pipes = 0, slave_pipes = 0;
> >  	struct intel_crtc *crtc;
> >  
> > +	*master_pipes = 0;
> > +	*slave_pipes = 0;
> > +
> >  	for_each_intel_crtc_in_pipe_mask(&dev_priv->drm, crtc,
> >  					 bigjoiner_pipes(dev_priv)) {
> >  		enum intel_display_power_domain power_domain;
> > @@ -4083,9 +4086,9 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
> >  				continue;
> >  
> >  			if (tmp & MASTER_BIG_JOINER_ENABLE)
> > -				master_pipes |= BIT(pipe);
> > +				*master_pipes |= BIT(pipe);
> >  			else
> > -				slave_pipes |= BIT(pipe);
> > +				*slave_pipes |= BIT(pipe);
> >  		}
> >  
> >  		if (DISPLAY_VER(dev_priv) < 13)
> > @@ -4096,18 +4099,16 @@ static u8 enabled_bigjoiner_pipes(struct drm_i915_private *dev_priv)
> >  			u32 tmp = intel_de_read(dev_priv, ICL_PIPE_DSS_CTL1(pipe));
> >  
> >  			if (tmp & UNCOMPRESSED_JOINER_MASTER)
> > -				master_pipes |= BIT(pipe);
> > +				*master_pipes |= BIT(pipe);
> >  			if (tmp & UNCOMPRESSED_JOINER_SLAVE)
> > -				slave_pipes |= BIT(pipe);
> > +				*slave_pipes |= BIT(pipe);
> >  		}
> >  	}
> >  
> >  	/* Bigjoiner pipes should always be consecutive master and slave */
> > -	drm_WARN(&dev_priv->drm, slave_pipes != master_pipes << 1,
> > +	drm_WARN(&dev_priv->drm, *slave_pipes != *master_pipes << 1,
> >  		 "Bigjoiner misconfigured (master pipes 0x%x, slave pipes 0x%x)\n",
> > -		 master_pipes, slave_pipes);
> > -
> > -	return slave_pipes;
> > +		 *master_pipes, *slave_pipes);
> >  }
> >  
> >  static u8 hsw_panel_transcoders(struct drm_i915_private *i915)
> > @@ -4126,6 +4127,7 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
> >  	struct drm_i915_private *dev_priv = to_i915(dev);
> >  	u8 panel_transcoder_mask = hsw_panel_transcoders(dev_priv);
> >  	enum transcoder cpu_transcoder;
> > +	u8 master_pipes, slave_pipes;
> >  	u8 enabled_transcoders = 0;
> >  
> >  	/*
> > @@ -4177,7 +4179,8 @@ static u8 hsw_enabled_transcoders(struct intel_crtc *crtc)
> >  		enabled_transcoders |= BIT(cpu_transcoder);
> >  
> >  	/* bigjoiner slave -> consider the master pipe's transcoder as well */
> > -	if (enabled_bigjoiner_pipes(dev_priv) & BIT(crtc->pipe)) {
> > +	enabled_bigjoiner_pipes(dev_priv, &master_pipes, &slave_pipes);
> > +	if (slave_pipes & BIT(crtc->pipe)) {
> >  		cpu_transcoder = (enum transcoder) crtc->pipe - 1;
> >  		if (transcoder_ddi_func_is_enabled(dev_priv, cpu_transcoder))
> >  			enabled_transcoders |= BIT(cpu_transcoder);
> > -- 
> > 2.34.1
> > 

-- 
Ville Syrjälä
Intel

^ permalink raw reply	[flat|nested] 41+ messages in thread

* Re: [Intel-gfx] [PATCH 06/10] drm/i915: Introduce intel_crtc_is_bigjoiner_{slave, master}()
  2022-02-07  7:31     ` Ville Syrjälä
@ 2022-02-15 10:53       ` Nautiyal, Ankit K
  0 siblings, 0 replies; 41+ messages in thread
From: Nautiyal, Ankit K @ 2022-02-15 10:53 UTC (permalink / raw)
  To: Ville Syrjälä, Navare,  Manasi; +Cc: intel-gfx

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 2/7/2022 1:01 PM, Ville Syrjälä wrote:
> On Fri, Feb 04, 2022 at 01:27:54PM -0800, Navare, Manasi wrote:
>> On Thu, Feb 03, 2022 at 08:38:19PM +0200, Ville Syrjala wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> Introduce helpers to query whether the crtc is the slave/master
>>> for bigjoiner. This decouples most places from the exact
>>> state layout we use to track this relationship, allowing us
>>> to change and extend it more easily.
>> So even with the bitmask approach, we still plan to have bools for bigjoiner_slave?
> Nope. No longer necessary.
>
>>> Performed with cocci:
>>> @@
>>> expression S, E;
>>> @@
>>> (
>>>    S->bigjoiner_slave = E;
>>> |
>>> - S->bigjoiner_slave
>>> + intel_crtc_is_bigjoiner_slave(S)
>>> )
>>>
>>> @@
>>> expression S, E;
>>> @@
>>> (
>>> - E && S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
>>> + E && intel_crtc_is_bigjoiner_master(S)
>>> |
>>> - S->bigjoiner && !intel_crtc_is_bigjoiner_slave(S)
>>> + intel_crtc_is_bigjoiner_master(S)
>>> )
>>>
>>> @@
>>> expression S;
>>> @@
>>> - (intel_crtc_is_bigjoiner_master(S))
>>> + intel_crtc_is_bigjoiner_master(S)
>>>
>>> @@
>>> expression S, E1, E2, E3;
>>> @@
>>> - intel_crtc_is_bigjoiner_slave(S) ? E1 : S->bigjoiner ? E2 : E3
>>> + intel_crtc_is_bigjoiner_slave(S) ? E1 : intel_crtc_is_bigjoiner_master(S) ? E2 : E3
>>>
>>> @@
>>> typedef bool;
>>> @@
>>> + bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state)
>>> + {
>>> + 	return crtc_state->bigjoiner_slave;
>>> + }
>>> +
>>>    intel_master_crtc(...) {...}
>>>
>>> @@
>>> typedef bool;
>>> @@
>>> + bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state)
>>> + {
>>> + 	return crtc_state->bigjoiner && !crtc_state->bigjoiner_slave;
>>> + }
>>> +
>>>    intel_master_crtc(...) {...}
>>>
>>> @@
>>> typedef bool;
>>> identifier S;
>>> @@
>>> - bool is_trans_port_sync_mode(const struct intel_crtc_state *S);
>>> + bool is_trans_port_sync_mode(const struct intel_crtc_state *state);
>>> + bool intel_crtc_is_bigjoiner_slave(const struct intel_crtc_state *crtc_state);
>>> + bool intel_crtc_is_bigjoiner_master(const struct intel_crtc_state *crtc_state);
>> Is all of the above part of the commit message? Dont understand why its changing is_trans_port_sync_mode() ?
> I had to touch that line to get coccinelle to actually do the
> transformation. For some reason it refused to do anything if
> I just tried to add the two new lines.
>

^ permalink raw reply	[flat|nested] 41+ messages in thread

* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: Use a bitmask for bigjoiner state tracking (rev4)
  2022-02-03 18:38 [Intel-gfx] [PATCH 00/10] drm/i915: Use a bitmask for bigjoiner state tracking Ville Syrjala
                   ` (17 preceding siblings ...)
  2022-02-04  9:22 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
@ 2022-02-15 22:34 ` Patchwork
  18 siblings, 0 replies; 41+ messages in thread
From: Patchwork @ 2022-02-15 22:34 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Use a bitmask for bigjoiner state tracking (rev4)
URL   : https://patchwork.freedesktop.org/series/99680/
State : failure

== Summary ==

Applying: drm/i915: Flag crtc scaling_filter changes as modeset
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/display/intel_display.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display.c
No changes -- Patch already applied.
Applying: drm/i915: Fix bigjoiner state copy fails
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/display/intel_display.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/display/intel_display.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/display/intel_display.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 drm/i915: Fix bigjoiner state copy fails
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2022-02-15 22:34 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [Intel-gfx] [PATCH 02/10] drm/i915: Fix bigjoiner state copy fails Ville Syrjala
2022-02-03 22:13   ` 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

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.