Skip to contentSkip to conversation

drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

PATCH In review Stanislav Lisovskiy 4 participants 15 messages Apr 6, 2023 – Apr 12, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +52 -24
index a88b852c437c..9479c7e0b269 100644
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+					  struct intel_crtc_state *pipe_config,
+					  int bpc)
+{
+	u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+			 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+			  DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
+
+	if (max_bppx16)
+		return max_bppx16;
+	/*
+	 * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+	 * values as given in spec Table 2-157 DP v2.0
+	 */
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return bpc << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return (3 * (bpc / 2)) << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return 8 << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return 6 << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	u8 dsc_bpc[3] = {0};
 	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
 	u8 dsc_max_bpc;
-	bool need_timeslot_recalc = false;
-	u32 last_compressed_bpp;
 
 	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
 	if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (max_bpp > sink_max_bpp)
 		max_bpp = sink_max_bpp;
 
+	/* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+	max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+	min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+	/* Align compressed bpps according to our own constraints */
+	max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+	min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
 	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (slots < 0)
 		return slots;
 
-	last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-	crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-									last_compressed_bpp,
-									crtc_state->pipe_bpp);
-
-	if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-		need_timeslot_recalc = true;
-
-	/*
-	 * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-	 * the actual compressed bpp we use.
-	 */
-	if (need_timeslot_recalc) {
-		slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
-							     crtc_state->dsc.compressed_bpp,
-							     crtc_state->dsc.compressed_bpp,
-							     limits, conn_state, 2 * 3, true);
-		if (slots < 0)
-			return slots;
-	}
-
 	intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
 			       crtc_state->lane_count,
 			       adjusted_mode->crtc_clock,
Signature · 1 line
2.37.3
#1 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

== Series Details ==

== Series Details ==

Series: drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info
URL : https://patchwork.freedesktop.org/series/116179/
State : warning

== Summary ==

Error: dim checkpatch failed
3cce658f5bbb drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info -:7: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
Currently we seem to be using wrong DPCD register for reading compressed bpps,

-:87: WARNING:LONG_LINE: line length of 113 exceeds 100 columns #87: FILE: drivers/gpu/drm/i915/display/intel_dp_mst.c:274:
+ max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);

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

#2 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info
URL : https://patchwork.freedesktop.org/series/116179/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12979 -> Patchwork_116179v1
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (36 -> 35)
------------------------------

Missing (1): fi-snb-2520m

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rps@basic-api:
- bat-dg2-11: [PASS][1] -> [FAIL][2] ([i915#8308])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/bat-dg2-11/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/bat-dg2-11/igt@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-cfl-8109u: [PASS][3] -> [DMESG-FAIL][4] ([i915#5334])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/fi-cfl-8109u/igt@i915_selftest@live@gt_heartbeat.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/fi-cfl-8109u/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@migrate:
- bat-adlp-9: [PASS][5] -> [DMESG-FAIL][6] ([i915#7699])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/bat-adlp-9/igt@i915_selftest@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/bat-adlp-9/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@reset:
- bat-rpls-1: [PASS][7] -> [ABORT][8] ([i915#4983])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/bat-rpls-1/igt@i915_selftest@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/bat-rpls-1/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@migrate:
- bat-dg2-11: [DMESG-WARN][9] ([i915#7699]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/bat-dg2-11/igt@i915_selftest@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
- bat-dg2-8: [FAIL][11] ([i915#7932]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

#### Warnings ####

* igt@i915_selftest@live@reset:
- bat-rpls-2: [ABORT][13] ([i915#4983] / [i915#7913] / [i915#7981]) -> [ABORT][14] ([i915#4983] / [i915#7913])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/bat-rpls-2/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/bat-rpls-2/igt@i915_selftest@[email protected]

[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#7981]: https://gitlab.freedesktop.org/drm/intel/issues/7981
[i915#8308]: https://gitlab.freedesktop.org/drm/intel/issues/8308

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

* Linux: CI_DRM_12979 -> Patchwork_116179v1

CI-20190529: 20190529
CI_DRM_12979: e0f93494298ec55cb7cd551251e6653df57f6b07 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7242: 32df2fea760a8b72516761657971a7edb08bd0bb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116179v1: e0f93494298ec55cb7cd551251e6653df57f6b07 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

b46b4059fba0 drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

== Logs ==

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

maintainer
#3 lore raw
In reply to Stanislav Lisovskiy
Quoted 19 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+					  struct intel_crtc_state *pipe_config,
+					  int bpc)
+{
+	u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+			 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+			  DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 93 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -24
+
+	if (max_bppx16)
+		return max_bppx16;
+	/*
+	 * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+	 * values as given in spec Table 2-157 DP v2.0
+	 */
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return bpc << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return (3 * (bpc / 2)) << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return 8 << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return 6 << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	u8 dsc_bpc[3] = {0};
 	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
 	u8 dsc_max_bpc;
-	bool need_timeslot_recalc = false;
-	u32 last_compressed_bpp;
 
 	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
 	if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (max_bpp > sink_max_bpp)
 		max_bpp = sink_max_bpp;
 
+	/* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+	max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+	min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+	/* Align compressed bpps according to our own constraints */
+	max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+	min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
 	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (slots < 0)
 		return slots;
 
-	last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-	crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-									last_compressed_bpp,
-									crtc_state->pipe_bpp);
-
-	if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-		need_timeslot_recalc = true;
-
-	/*
-	 * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-	 * the actual compressed bpp we use.
-	 */
-	if (need_timeslot_recalc) {
-		slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
-							     crtc_state->dsc.compressed_bpp,
-							     crtc_state->dsc.compressed_bpp,
-							     limits, conn_state, 2 * 3, true);
-		if (slots < 0)
-			return slots;
-	}
-
 	intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
 			       crtc_state->lane_count,
 			       adjusted_mode->crtc_clock,
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#4 lore raw

Not planning to upstream that actually, just for some bug on gitlab.
Want to see if that helps the reporter, then at least there is an idea whats the problem.

________________________________________
From: Jani Nikula <[email protected]>
Sent: Thursday, April 6, 2023 12:59 PM
To: Lisovskiy, Stanislav; [email protected]
Cc: Manasi Navare
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

Quoted 19 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
      return 0;
 }
 
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+                                       struct intel_crtc_state *pipe_config,
+                                       int bpc)
+{
+     u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+                      (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+                       DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 83 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -17
+
+     if (max_bppx16)
+             return max_bppx16;
+     /*
+      * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+      * values as given in spec Table 2-157 DP v2.0
+      */
+     switch (pipe_config->output_format) {
+     case INTEL_OUTPUT_FORMAT_RGB:
+     case INTEL_OUTPUT_FORMAT_YCBCR444:
+             return bpc << 4;
+     case INTEL_OUTPUT_FORMAT_YCBCR420:
+             return (3 * (bpc / 2)) << 4;
+     default:
+             MISSING_CASE(pipe_config->output_format);
+             break;
+     }
+
+     return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+     switch (pipe_config->output_format) {
+     case INTEL_OUTPUT_FORMAT_RGB:
+     case INTEL_OUTPUT_FORMAT_YCBCR444:
+             return 8 << 4;
+     case INTEL_OUTPUT_FORMAT_YCBCR420:
+             return 6 << 4;
+     default:
+             MISSING_CASE(pipe_config->output_format);
+             break;
+     }
+
+     return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
                                              struct intel_crtc_state *crtc_state,
                                              struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      u8 dsc_bpc[3] = {0};
      int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
      u8 dsc_max_bpc;
-     bool need_timeslot_recalc = false;
-     u32 last_compressed_bpp;
 
      /* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
      if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      if (max_bpp > sink_max_bpp)
              max_bpp = sink_max_bpp;
 
+     /* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+     max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+     min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+     /* Align compressed bpps according to our own constraints */
+     max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+     min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
      slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
                                                   min_bpp, limits,
                                                   conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      if (slots < 0)
              return slots;
 
-     last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-     crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-                                                                     last_compressed_bpp,
-                                                                     crtc_state->pipe_bpp);
-
-     if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-             need_timeslot_recalc = true;
-
-     /*
-      * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-      * the actual compressed bpp we use.
-      */
-     if (need_timeslot_recalc) {
-             slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, · line 290

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -7
-                                                          crtc_state->dsc.compressed_bpp,
-                                                          crtc_state->dsc.compressed_bpp,
-                                                          limits, conn_state, 2 * 3, true);
-             if (slots < 0)
-                     return slots;
-     }
-
      intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
                             crtc_state->lane_count,
                             adjusted_mode->crtc_clock,

--
Jani Nikula, Intel Open Source Graphics Center

maintainer
#5 lore raw
Quoted 2 lines · Stanislav

Not planning to upstream that actually, just for some bug on gitlab.
Want to see if that helps the reporter, then at least there is an idea whats the problem.

The issue in drm_edp_dsc_sink_output_bpp() needs to be fixed regardless.

BR,
Jani.

Quoted 156 lines

________________________________________
From: Jani Nikula <[email protected]>
Sent: Thursday, April 6, 2023 12:59 PM
To: Lisovskiy, Stanislav; [email protected]
Cc: Manasi Navare
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

Quoted 19 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
      return 0;
 }
 
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+                                       struct intel_crtc_state *pipe_config,
+                                       int bpc)
+{
+     u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+                      (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+                       DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 83 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -17
+
+     if (max_bppx16)
+             return max_bppx16;
+     /*
+      * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+      * values as given in spec Table 2-157 DP v2.0
+      */
+     switch (pipe_config->output_format) {
+     case INTEL_OUTPUT_FORMAT_RGB:
+     case INTEL_OUTPUT_FORMAT_YCBCR444:
+             return bpc << 4;
+     case INTEL_OUTPUT_FORMAT_YCBCR420:
+             return (3 * (bpc / 2)) << 4;
+     default:
+             MISSING_CASE(pipe_config->output_format);
+             break;
+     }
+
+     return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+     switch (pipe_config->output_format) {
+     case INTEL_OUTPUT_FORMAT_RGB:
+     case INTEL_OUTPUT_FORMAT_YCBCR444:
+             return 8 << 4;
+     case INTEL_OUTPUT_FORMAT_YCBCR420:
+             return 6 << 4;
+     default:
+             MISSING_CASE(pipe_config->output_format);
+             break;
+     }
+
+     return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
                                              struct intel_crtc_state *crtc_state,
                                              struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      u8 dsc_bpc[3] = {0};
      int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
      u8 dsc_max_bpc;
-     bool need_timeslot_recalc = false;
-     u32 last_compressed_bpp;
 
      /* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
      if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      if (max_bpp > sink_max_bpp)
              max_bpp = sink_max_bpp;
 
+     /* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+     max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+     min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+     /* Align compressed bpps according to our own constraints */
+     max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+     min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
      slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
                                                   min_bpp, limits,
                                                   conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      if (slots < 0)
              return slots;
 
-     last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-     crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-                                                                     last_compressed_bpp,
-                                                                     crtc_state->pipe_bpp);
-
-     if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-             need_timeslot_recalc = true;
-
-     /*
-      * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-      * the actual compressed bpp we use.
-      */
-     if (need_timeslot_recalc) {
-             slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, · line 290

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -7
-                                                          crtc_state->dsc.compressed_bpp,
-                                                          crtc_state->dsc.compressed_bpp,
-                                                          limits, conn_state, 2 * 3, true);
-             if (slots < 0)
-                     return slots;
-     }
-
      intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
                             crtc_state->lane_count,
                             adjusted_mode->crtc_clock,

--
Jani Nikula, Intel Open Source Graphics Center

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
maintainer
#6 lore raw
Quoted 5 lines · Jani Nikula
Quoted 2 lines · Stanislav

Not planning to upstream that actually, just for some bug on gitlab.
Want to see if that helps the reporter, then at least there is an idea whats the problem.

The issue in drm_edp_dsc_sink_output_bpp() needs to be fixed regardless.

https://patchwork.freedesktop.org/patch/msgid/[email protected]

Quoted 161 lines

BR,
Jani.

Quoted 156 lines

________________________________________
From: Jani Nikula <[email protected]>
Sent: Thursday, April 6, 2023 12:59 PM
To: Lisovskiy, Stanislav; [email protected]
Cc: Manasi Navare
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

Quoted 19 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
      return 0;
 }
 
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+                                       struct intel_crtc_state *pipe_config,
+                                       int bpc)
+{
+     u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+                      (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+                       DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 83 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -17
+
+     if (max_bppx16)
+             return max_bppx16;
+     /*
+      * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+      * values as given in spec Table 2-157 DP v2.0
+      */
+     switch (pipe_config->output_format) {
+     case INTEL_OUTPUT_FORMAT_RGB:
+     case INTEL_OUTPUT_FORMAT_YCBCR444:
+             return bpc << 4;
+     case INTEL_OUTPUT_FORMAT_YCBCR420:
+             return (3 * (bpc / 2)) << 4;
+     default:
+             MISSING_CASE(pipe_config->output_format);
+             break;
+     }
+
+     return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+     switch (pipe_config->output_format) {
+     case INTEL_OUTPUT_FORMAT_RGB:
+     case INTEL_OUTPUT_FORMAT_YCBCR444:
+             return 8 << 4;
+     case INTEL_OUTPUT_FORMAT_YCBCR420:
+             return 6 << 4;
+     default:
+             MISSING_CASE(pipe_config->output_format);
+             break;
+     }
+
+     return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
                                              struct intel_crtc_state *crtc_state,
                                              struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      u8 dsc_bpc[3] = {0};
      int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
      u8 dsc_max_bpc;
-     bool need_timeslot_recalc = false;
-     u32 last_compressed_bpp;
 
      /* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
      if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      if (max_bpp > sink_max_bpp)
              max_bpp = sink_max_bpp;
 
+     /* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+     max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+     min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+     /* Align compressed bpps according to our own constraints */
+     max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+     min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
      slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
                                                   min_bpp, limits,
                                                   conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
      if (slots < 0)
              return slots;
 
-     last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-     crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-                                                                     last_compressed_bpp,
-                                                                     crtc_state->pipe_bpp);
-
-     if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-             need_timeslot_recalc = true;
-
-     /*
-      * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-      * the actual compressed bpp we use.
-      */
-     if (need_timeslot_recalc) {
-             slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder, · line 290

Quoted 10 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -7
-                                                          crtc_state->dsc.compressed_bpp,
-                                                          crtc_state->dsc.compressed_bpp,
-                                                          limits, conn_state, 2 * 3, true);
-             if (slots < 0)
-                     return slots;
-     }
-
      intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
                             crtc_state->lane_count,
                             adjusted_mode->crtc_clock,

--
Jani Nikula, Intel Open Source Graphics Center

Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
#7 lore raw
In reply to Jani Nikula
Quoted 23 lines · Jani Nikula
Quoted 22 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
Quoted 9 lines

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+					  struct intel_crtc_state *pipe_config,
+					  int bpc)
+{
+	u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+			 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+			  DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

These registers are not even valid for non-eDP.

Quoted 116 lines

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 93 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -24
+
+	if (max_bppx16)
+		return max_bppx16;
+	/*
+	 * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+	 * values as given in spec Table 2-157 DP v2.0
+	 */
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return bpc << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return (3 * (bpc / 2)) << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return 8 << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return 6 << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	u8 dsc_bpc[3] = {0};
 	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
 	u8 dsc_max_bpc;
-	bool need_timeslot_recalc = false;
-	u32 last_compressed_bpp;
 
 	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
 	if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (max_bpp > sink_max_bpp)
 		max_bpp = sink_max_bpp;
 
+	/* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+	max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+	min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+	/* Align compressed bpps according to our own constraints */
+	max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+	min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
 	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (slots < 0)
 		return slots;
 
-	last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-	crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-									last_compressed_bpp,
-									crtc_state->pipe_bpp);
-
-	if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-		need_timeslot_recalc = true;
-
-	/*
-	 * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-	 * the actual compressed bpp we use.
-	 */
-	if (need_timeslot_recalc) {
-		slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
-							     crtc_state->dsc.compressed_bpp,
-							     crtc_state->dsc.compressed_bpp,
-							     limits, conn_state, 2 * 3, true);
-		if (slots < 0)
-			return slots;
-	}
-
 	intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
 			       crtc_state->lane_count,
 			       adjusted_mode->crtc_clock,
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Signature · 2 lines
Ville Syrjälä
Intel
#8 lore raw
Quoted 34 lines · Ville Syrjälä
Quoted 23 lines · Jani Nikula
Quoted 22 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
Quoted 9 lines

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+					  struct intel_crtc_state *pipe_config,
+					  int bpc)
+{
+	u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+			 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+			  DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

Quoted 1 line

These registers are not even valid for non-eDP.

You need to mention this then in review for Ankit's patches, as I took it from
there, he still is working on this series I guess and at some point we should use that DSC api also for MST.

Stan

Quoted 121 lines
Quoted 117 lines

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 93 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -24
+
+	if (max_bppx16)
+		return max_bppx16;
+	/*
+	 * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+	 * values as given in spec Table 2-157 DP v2.0
+	 */
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return bpc << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return (3 * (bpc / 2)) << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return 8 << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return 6 << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	u8 dsc_bpc[3] = {0};
 	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
 	u8 dsc_max_bpc;
-	bool need_timeslot_recalc = false;
-	u32 last_compressed_bpp;
 
 	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
 	if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (max_bpp > sink_max_bpp)
 		max_bpp = sink_max_bpp;
 
+	/* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+	max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+	min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+	/* Align compressed bpps according to our own constraints */
+	max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+	min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
 	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (slots < 0)
 		return slots;
 
-	last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-	crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-									last_compressed_bpp,
-									crtc_state->pipe_bpp);
-
-	if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-		need_timeslot_recalc = true;
-
-	/*
-	 * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-	 * the actual compressed bpp we use.
-	 */
-	if (need_timeslot_recalc) {
-		slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
-							     crtc_state->dsc.compressed_bpp,
-							     crtc_state->dsc.compressed_bpp,
-							     limits, conn_state, 2 * 3, true);
-		if (slots < 0)
-			return slots;
-	}
-
 	intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
 			       crtc_state->lane_count,
 			       adjusted_mode->crtc_clock,
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Signature · 2 lines
Ville Syrjälä
Intel
#9 lore raw
In reply to Ville Syrjälä
Quoted 34 lines · Ville Syrjälä
Quoted 23 lines · Jani Nikula
Quoted 22 lines · Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +0 -0
index a88b852c437c..9479c7e0b269 100644
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
Quoted 9 lines

drivers/gpu/drm/i915/display/intel_dp_mst.c static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder, · line 183

Quoted 7 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +7 -0
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+					  struct intel_crtc_state *pipe_config,
+					  int bpc)
+{
+	u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+			 (dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+			  DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);

This duplicates drm_edp_dsc_sink_output_bpp().

Quoted 1 line

These registers are not even valid for non-eDP.

BTW just checked DP 2.0 spec, says "For DP v2.0 (and higher) and eDP v1.4a (and higher)" for registers 0x67, 0x68.

Otherwise if those are cleared and for older DP/eDP standards it instruct to use Table 2-154.

So I guess this function can be used still.

Stan

Quoted 121 lines
Quoted 117 lines

Both have operator precedence wrong, leading to the high byte always being ignored. For example, sink reported max bpp of 32 turns to 0, and 24 turns to 8.

Broken since 2018. 0575650077ea ("drm/dp: DRM DP helper/macros to get DP sink DSC parameters").

The definition of DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT is misleading wrt all of our regular usage. We should never have a FOO_MASK << FOO_SHIFT in code, the MASK should always be already shifted in place. Here we do, because the shift is not for shifting the mask in place, it's for combining the high and low bytes. But I don't really think DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT should exist, at all.

BR,
Jani.

Quoted 93 lines
drivers/gpu/drm/i915/display/intel_dp_mst.c +45 -24
+
+	if (max_bppx16)
+		return max_bppx16;
+	/*
+	 * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+	 * values as given in spec Table 2-157 DP v2.0
+	 */
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return bpc << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return (3 * (bpc / 2)) << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return 8 << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return 6 << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	u8 dsc_bpc[3] = {0};
 	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
 	u8 dsc_max_bpc;
-	bool need_timeslot_recalc = false;
-	u32 last_compressed_bpp;
 
 	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
 	if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (max_bpp > sink_max_bpp)
 		max_bpp = sink_max_bpp;
 
+	/* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+	max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+	min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+	/* Align compressed bpps according to our own constraints */
+	max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+	min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
 	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (slots < 0)
 		return slots;
 
-	last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-	crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-									last_compressed_bpp,
-									crtc_state->pipe_bpp);
-
-	if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-		need_timeslot_recalc = true;
-
-	/*
-	 * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-	 * the actual compressed bpp we use.
-	 */
-	if (need_timeslot_recalc) {
-		slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
-							     crtc_state->dsc.compressed_bpp,
-							     crtc_state->dsc.compressed_bpp,
-							     limits, conn_state, 2 * 3, true);
-		if (slots < 0)
-			return slots;
-	}
-
 	intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
 			       crtc_state->lane_count,
 			       adjusted_mode->crtc_clock,
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Signature · 2 lines
Ville Syrjälä
Intel
#10 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info
URL : https://patchwork.freedesktop.org/series/116179/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12979_full -> Patchwork_116179v1_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (7 -> 7)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_fair@basic-pace@rcs0:
- shard-glk: [PASS][1] -> [FAIL][2] ([i915#2842])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-glk9/igt@gem_exec_fair@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-glk8/igt@gem_exec_fair@[email protected]

* igt@gem_render_copy@y-tiled-to-vebox-x-tiled:
- shard-apl: NOTRUN -> [SKIP][3] ([fdo#109271]) +5 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl1/igt@[email protected]

* igt@gen9_exec_parse@allowed-all:
- shard-apl: [PASS][4] -> [ABORT][5] ([i915#5566])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-apl6/igt@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl7/igt@[email protected]

* igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs:
- shard-apl: NOTRUN -> [SKIP][6] ([fdo#109271] / [i915#3886])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl1/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_mc_ccs.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-apl: [PASS][7] -> [FAIL][8] ([i915#2346])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-apl6/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl1/igt@[email protected]

* igt@kms_flip@2x-flip-vs-expired-vblank-interruptible@ac-hdmi-a1-hdmi-a2:
- shard-glk: [PASS][9] -> [FAIL][10] ([i915#79]) +1 similar issue
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-glk4/igt@kms_flip@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-glk5/igt@kms_flip@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible@b-dp1:
- shard-apl: [PASS][11] -> [ABORT][12] ([i915#180])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-apl7/igt@kms_flip@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl6/igt@kms_flip@[email protected]

* igt@kms_hdr@invalid-hdr@pipe-a-dp-1:
- shard-apl: NOTRUN -> [FAIL][13] ([i915#8253])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl1/igt@kms_hdr@[email protected]

#### Possible fixes ####

* igt@drm_fdinfo@most-busy-idle-check-all@rcs0:
- {shard-rkl}: [FAIL][14] ([i915#7742]) -> [PASS][15] +1 similar issue
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-rkl-1/igt@drm_fdinfo@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-rkl-3/igt@drm_fdinfo@[email protected]

* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-tglu}: [FAIL][16] ([i915#6268]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-tglu-7/igt@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-tglu-9/igt@[email protected]

* igt@gem_exec_endless@dispatch@vcs0:
- {shard-dg1}: [TIMEOUT][18] ([i915#3778]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-dg1-17/igt@gem_exec_endless@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-dg1-15/igt@gem_exec_endless@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][20] ([i915#2842]) -> [PASS][21] +1 similar issue
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-glk4/igt@gem_exec_fair@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-glk5/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- shard-apl: [FAIL][22] ([i915#2842]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-apl1/igt@gem_exec_fair@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl2/igt@gem_exec_fair@[email protected]

* igt@gem_lmem_swapping@smem-oom@lmem0:
- {shard-dg1}: [TIMEOUT][24] -> [PASS][25]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-dg1-16/igt@gem_lmem_swapping@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-dg1-18/igt@gem_lmem_swapping@[email protected]

* igt@i915_pm_rpm@modeset-non-lpsp:
- {shard-rkl}: [SKIP][26] ([i915#1397]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-rkl-7/igt@[email protected]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-rkl-2/igt@[email protected]

* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic:
- shard-glk: [FAIL][28] ([i915#72]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-glk3/igt@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-glk2/igt@[email protected]

* igt@kms_fbcon_fbt@fbc-suspend:
- shard-apl: [ABORT][30] ([i915#180]) -> [PASS][31] +1 similar issue
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-apl6/igt@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-apl1/igt@[email protected]

* igt@kms_plane_scaling@i915-max-src-size@pipe-a-hdmi-a-2:
- {shard-rkl}: [FAIL][32] ([i915#8292]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-rkl-4/igt@kms_plane_scaling@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-rkl-6/igt@kms_plane_scaling@[email protected]

* igt@perf_pmu@idle@rcs0:
- {shard-rkl}: [FAIL][34] ([i915#4349]) -> [PASS][35]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12979/shard-rkl-2/igt@perf_pmu@[email protected]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v1/shard-rkl-6/igt@perf_pmu@[email protected]

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

[IGT#2]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/2
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109307]: https://bugs.freedesktop.org/show_bug.cgi?id=109307
[fdo#109506]: https://bugs.freedesktop.org/show_bug.cgi?id=109506
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2705]: https://gitlab.freedesktop.org/drm/intel/issues/2705
[i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3299]: https://gitlab.freedesktop.org/drm/intel/issues/3299
[i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
[i915#3361]: https://gitlab.freedesktop.org/drm/intel/issues/3361
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3952]: https://gitlab.freedesktop.org/drm/intel/issues/3952
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#4281]: https://gitlab.freedesktop.org/drm/intel/issues/4281
[i915#4349]: https://gitlab.freedesktop.org/drm/intel/issues/4349
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4818]: https://gitlab.freedesktop.org/drm/intel/issues/4818
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4859]: https://gitlab.freedesktop.org/drm/intel/issues/4859
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5566]: https://gitlab.freedesktop.org/drm/intel/issues/5566
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6227]: https://gitlab.freedesktop.org/drm/intel/issues/6227
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#6433]: https://gitlab.freedesktop.org/drm/intel/issues/6433
[i915#6493]: https://gitlab.freedesktop.org/drm/intel/issues/6493
[i915#6524]: https://gitlab.freedesktop.org/drm/intel/issues/6524
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#6590]: https://gitlab.freedesktop.org/drm/intel/issues/6590
[i915#6946]: https://gitlab.freedesktop.org/drm/intel/issues/6946
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#72]: https://gitlab.freedesktop.org/drm/intel/issues/72
[i915#7561]: https://gitlab.freedesktop.org/drm/intel/issues/7561
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#8155]: https://gitlab.freedesktop.org/drm/intel/issues/8155
[i915#8253]: https://gitlab.freedesktop.org/drm/intel/issues/8253
[i915#8292]: https://gitlab.freedesktop.org/drm/intel/issues/8292
[i915#8304]: https://gitlab.freedesktop.org/drm/intel/issues/8304

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

* Linux: CI_DRM_12979 -> Patchwork_116179v1

CI-20190529: 20190529
CI_DRM_12979: e0f93494298ec55cb7cd551251e6653df57f6b07 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7242: 32df2fea760a8b72516761657971a7edb08bd0bb @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116179v1: e0f93494298ec55cb7cd551251e6653df57f6b07 @ 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_116179v1/index.html

#11 lore raw

PATCH 1/1 drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

In reply to Stanislav Lisovskiy

Currently we seem to be using wrong DPCD register for reading compressed bpps, reading min/max input bpc instead of compressed bpp.
Fix that, so that we now apply min/max compressed bpp limitations we get from DP Spec Table 2-157 DP v2.0 and/or correspondent DPCD register DP_DSC_MAX_BITS_PER_PIXEL_LOW/HIGH.

This might also allow us to get rid of an ugly compressed bpp recalculation, which we had to add to make some MST hubs usable.

v2: - Fix operator precedence

---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 76 ++++++++++++++-------
 1 file changed, 52 insertions(+), 24 deletions(-)
drivers/gpu/drm/i915/display/intel_dp_mst.c +52 -24
index a88b852c437c..d987eee90064 100644
@@ -174,6 +174,50 @@ static int intel_dp_mst_compute_link_config(struct intel_encoder *encoder,
 	return 0;
 }
 
+static u16 dsc_max_sink_compressed_bppx16(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE],
+					  struct intel_crtc_state *pipe_config,
+					  int bpc)
+{
+	u16 max_bppx16 = dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_LOW - DP_DSC_SUPPORT] |
+			 ((dsc_dpcd[DP_DSC_MAX_BITS_PER_PIXEL_HI - DP_DSC_SUPPORT] &
+			  DP_DSC_MAX_BITS_PER_PIXEL_HI_MASK) << DP_DSC_MAX_BITS_PER_PIXEL_HI_SHIFT);
+
+	if (max_bppx16)
+		return max_bppx16;
+	/*
+	 * If support not given in DPCD 67h, 68h use the Maximum Allowed bit rate
+	 * values as given in spec Table 2-157 DP v2.0
+	 */
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return bpc << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return (3 * (bpc / 2)) << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
+static u16 dsc_min_compressed_bppx16(struct intel_crtc_state *pipe_config)
+{
+	switch (pipe_config->output_format) {
+	case INTEL_OUTPUT_FORMAT_RGB:
+	case INTEL_OUTPUT_FORMAT_YCBCR444:
+		return 8 << 4;
+	case INTEL_OUTPUT_FORMAT_YCBCR420:
+		return 6 << 4;
+	default:
+		MISSING_CASE(pipe_config->output_format);
+		break;
+	}
+
+	return 0;
+}
+
 static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 						struct intel_crtc_state *crtc_state,
 						struct drm_connector_state *conn_state,
@@ -191,8 +235,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	u8 dsc_bpc[3] = {0};
 	int min_bpp, max_bpp, sink_min_bpp, sink_max_bpp;
 	u8 dsc_max_bpc;
-	bool need_timeslot_recalc = false;
-	u32 last_compressed_bpp;
 
 	/* Max DSC Input BPC for ICL is 10 and for TGL+ is 12 */
 	if (DISPLAY_VER(i915) >= 12)
@@ -228,6 +270,14 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (max_bpp > sink_max_bpp)
 		max_bpp = sink_max_bpp;
 
+	/* Get Min/Max compressed bpp's for those Input Bpps we got for source/sink */
+	max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);
+	min_bpp = max(min_bpp, dsc_min_compressed_bppx16(crtc_state) >> 4);
+
+	/* Align compressed bpps according to our own constraints */
+	max_bpp = intel_dp_dsc_nearest_valid_bpp(i915, max_bpp, crtc_state->pipe_bpp);
+	min_bpp = intel_dp_dsc_nearest_valid_bpp(i915, min_bpp, crtc_state->pipe_bpp);
+
 	slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state, max_bpp,
 						     min_bpp, limits,
 						     conn_state, 2 * 3, true);
@@ -235,28 +285,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
 	if (slots < 0)
 		return slots;
 
-	last_compressed_bpp = crtc_state->dsc.compressed_bpp;
-
-	crtc_state->dsc.compressed_bpp = intel_dp_dsc_nearest_valid_bpp(i915,
-									last_compressed_bpp,
-									crtc_state->pipe_bpp);
-
-	if (crtc_state->dsc.compressed_bpp != last_compressed_bpp)
-		need_timeslot_recalc = true;
-
-	/*
-	 * Apparently some MST hubs dislike if vcpi slots are not matching precisely
-	 * the actual compressed bpp we use.
-	 */
-	if (need_timeslot_recalc) {
-		slots = intel_dp_mst_find_vcpi_slots_for_bpp(encoder, crtc_state,
-							     crtc_state->dsc.compressed_bpp,
-							     crtc_state->dsc.compressed_bpp,
-							     limits, conn_state, 2 * 3, true);
-		if (slots < 0)
-			return slots;
-	}
-
 	intel_link_compute_m_n(crtc_state->dsc.compressed_bpp,
 			       crtc_state->lane_count,
 			       adjusted_mode->crtc_clock,
Signature · 1 line
2.37.3
#12 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info (rev2)

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info (rev2)
URL : https://patchwork.freedesktop.org/series/116179/
State : warning

== Summary ==

Error: dim checkpatch failed
dc818fbee1db drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info -:7: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #7:
Currently we seem to be using wrong DPCD register for reading compressed bpps,

-:89: WARNING:LONG_LINE: line length of 113 exceeds 100 columns #89: FILE: drivers/gpu/drm/i915/display/intel_dp_mst.c:274:
+ max_bpp = min(max_bpp, dsc_max_sink_compressed_bppx16(intel_dp->dsc_dpcd, crtc_state, max_bpp / 3) >> 4);

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

#13 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info (rev2)

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info (rev2)
URL : https://patchwork.freedesktop.org/series/116179/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12993 -> Patchwork_116179v2
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

Participating hosts (37 -> 35)
------------------------------

Missing (2): fi-kbl-soraka fi-snb-2520m

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_pm_rps@basic-api:
- bat-dg2-11: [PASS][1] -> [FAIL][2] ([i915#8308])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/bat-dg2-11/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-11/igt@[email protected]

* igt@i915_selftest@live@migrate:
- bat-dg2-11: [PASS][3] -> [DMESG-FAIL][4] ([i915#7699])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/bat-dg2-11/igt@i915_selftest@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-11/igt@i915_selftest@[email protected]

* igt@i915_suspend@basic-s3-without-i915:
- bat-dg2-8: NOTRUN -> [SKIP][5] ([i915#6645])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-8/igt@[email protected]

* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-dg2-8: NOTRUN -> [SKIP][6] ([i915#7828])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-8/igt@[email protected]
- bat-rpls-1: NOTRUN -> [SKIP][7] ([i915#7828])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-rpls-1/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][8] ([i915#5354])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-11/igt@[email protected]

* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-c-dp-1:
- bat-dg2-8: [PASS][9] -> [FAIL][10] ([i915#7932])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-8/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-rpls-1: NOTRUN -> [SKIP][11] ([i915#1845])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-rpls-1/igt@[email protected]

#### Possible fixes ####

* igt@gem_exec_suspend@basic-s3@smem:
- bat-rpls-1: [ABORT][12] ([i915#6687] / [i915#7978]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/bat-rpls-1/igt@gem_exec_suspend@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-rpls-1/igt@gem_exec_suspend@[email protected]

* igt@i915_selftest@live@gt_heartbeat:
- fi-apl-guc: [DMESG-FAIL][14] ([i915#5334]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/fi-apl-guc/igt@i915_selftest@live@gt_heartbeat.html

* igt@i915_selftest@live@hangcheck:
- bat-dg2-8: [ABORT][16] ([i915#7913] / [i915#7979]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/bat-dg2-8/igt@i915_selftest@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-dg2-8/igt@i915_selftest@[email protected]

* igt@i915_selftest@live@slpc:
- bat-rplp-1: [DMESG-FAIL][18] ([i915#6367] / [i915#7913]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/bat-rplp-1/igt@i915_selftest@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/bat-rplp-1/igt@i915_selftest@[email protected]

[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6367]: https://gitlab.freedesktop.org/drm/intel/issues/6367
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#6687]: https://gitlab.freedesktop.org/drm/intel/issues/6687
[i915#7699]: https://gitlab.freedesktop.org/drm/intel/issues/7699
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913
[i915#7932]: https://gitlab.freedesktop.org/drm/intel/issues/7932
[i915#7978]: https://gitlab.freedesktop.org/drm/intel/issues/7978
[i915#7979]: https://gitlab.freedesktop.org/drm/intel/issues/7979
[i915#8308]: https://gitlab.freedesktop.org/drm/intel/issues/8308

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

* Linux: CI_DRM_12993 -> Patchwork_116179v2

CI-20190529: 20190529
CI_DRM_12993: 3f6d1a580787c3aa8c9c7f174bdce5b055d6d724 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7250: 2da179d399d83a6859a89176d83b7ec1d71fe27a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116179v2: 3f6d1a580787c3aa8c9c7f174bdce5b055d6d724 @ git://anongit.freedesktop.org/gfx-ci/linux

### Linux commits

a5a886fe0fac drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info

== Logs ==

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

#14 lore raw

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info (rev2)

In reply to Stanislav Lisovskiy
== Series Details ==

== Series Details ==

Series: drm/i915: Query compressed bpp properly using correct DPCD and DP Spec info (rev2)
URL : https://patchwork.freedesktop.org/series/116179/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12993_full -> Patchwork_116179v2_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (7 -> 7)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_userptr_blits@access-control:
- shard-glk: NOTRUN -> [SKIP][1] ([fdo#109271]) +5 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk7/igt@[email protected]

* igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
- shard-glk: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#3886])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk7/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

* igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
- shard-glk: [PASS][3] -> [FAIL][4] ([i915#2346])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-glk6/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk5/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank@b-hdmi-a1:
- shard-glk: [PASS][5] -> [FAIL][6] ([i915#79])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-glk9/igt@kms_flip@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk6/igt@kms_flip@[email protected]

* igt@v3d/v3d_wait_bo@unused-bo-1ns:
- shard-apl: NOTRUN -> [SKIP][7] ([fdo#109271]) +10 similar issues
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-apl7/igt@v3d/[email protected]

#### Possible fixes ####

* igt@drm_fdinfo@most-busy-idle-check-all@rcs0:
- {shard-rkl}: [FAIL][8] ([i915#7742]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-rkl-3/igt@drm_fdinfo@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-rkl-4/igt@drm_fdinfo@[email protected]

* igt@gem_ctx_exec@basic-nohangcheck:
- {shard-rkl}: [FAIL][10] ([i915#6268]) -> [PASS][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-rkl-4/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-rkl-2/igt@[email protected]

* igt@gem_exec_endless@dispatch@bcs0:
- {shard-tglu}: [TIMEOUT][12] ([i915#3778]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-tglu-9/igt@gem_exec_endless@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-tglu-3/igt@gem_exec_endless@[email protected]

* igt@gem_exec_fair@basic-deadline:
- shard-glk: [FAIL][14] ([i915#2846]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-glk7/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk7/igt@[email protected]

* igt@gem_exec_fair@basic-pace-share@rcs0:
- shard-glk: [FAIL][16] ([i915#2842]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-glk9/igt@gem_exec_fair@[email protected]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk6/igt@gem_exec_fair@[email protected]
- shard-apl: [FAIL][18] ([i915#2842]) -> [PASS][19]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-apl4/igt@gem_exec_fair@[email protected]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-apl4/igt@gem_exec_fair@[email protected]

* igt@gem_exec_fair@basic-pace-solo@rcs0:
- {shard-rkl}: [FAIL][20] ([i915#2842]) -> [PASS][21]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-rkl-2/igt@gem_exec_fair@[email protected]
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-rkl-6/igt@gem_exec_fair@[email protected]

* igt@i915_pm_dc@dc6-dpms:
- {shard-tglu}: [FAIL][22] ([i915#3989] / [i915#454]) -> [PASS][23]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-tglu-8/igt@[email protected]
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-tglu-9/igt@[email protected]

* igt@i915_pm_rpm@dpms-non-lpsp:
- {shard-rkl}: [SKIP][24] ([i915#1397]) -> [PASS][25] +1 similar issue
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-rkl-7/igt@[email protected]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-rkl-3/igt@[email protected]

* igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
- {shard-dg1}: [FAIL][26] ([i915#7959]) -> [PASS][27]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-dg1-14/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-dg1-16/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

* igt@kms_flip@flip-vs-suspend-interruptible@c-dp1:
- shard-apl: [ABORT][28] ([i915#180]) -> [PASS][29]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-apl6/igt@kms_flip@[email protected]
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-apl7/igt@kms_flip@[email protected]

* igt@perf@stress-open-close@0-rcs0:
- shard-glk: [ABORT][30] ([i915#5213]) -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12993/shard-glk7/igt@perf@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_116179v2/shard-glk7/igt@perf@[email protected]

{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#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[fdo#112283]: https://bugs.freedesktop.org/show_bug.cgi?id=112283
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1397]: https://gitlab.freedesktop.org/drm/intel/issues/1397
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1839]: https://gitlab.freedesktop.org/drm/intel/issues/1839
[i915#1902]: https://gitlab.freedesktop.org/drm/intel/issues/1902
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
[i915#2433]: https://gitlab.freedesktop.org/drm/intel/issues/2433
[i915#2437]: https://gitlab.freedesktop.org/drm/intel/issues/2437
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
[i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
[i915#2681]: https://gitlab.freedesktop.org/drm/intel/issues/2681
[i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
[i915#2846]: https://gitlab.freedesktop.org/drm/intel/issues/2846
[i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
[i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
[i915#3469]: https://gitlab.freedesktop.org/drm/intel/issues/3469
[i915#3539]: https://gitlab.freedesktop.org/drm/intel/issues/3539
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3591]: https://gitlab.freedesktop.org/drm/intel/issues/3591
[i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
[i915#3778]: https://gitlab.freedesktop.org/drm/intel/issues/3778
[i915#3804]: https://gitlab.freedesktop.org/drm/intel/issues/3804
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#3936]: https://gitlab.freedesktop.org/drm/intel/issues/3936
[i915#3938]: https://gitlab.freedesktop.org/drm/intel/issues/3938
[i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
[i915#3989]: https://gitlab.freedesktop.org/drm/intel/issues/3989
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4078]: https://gitlab.freedesktop.org/drm/intel/issues/4078
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
[i915#433]: https://gitlab.freedesktop.org/drm/intel/issues/433
[i915#4538]: https://gitlab.freedesktop.org/drm/intel/issues/4538
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#4565]: https://gitlab.freedesktop.org/drm/intel/issues/4565
[i915#4579]: https://gitlab.freedesktop.org/drm/intel/issues/4579
[i915#4771]: https://gitlab.freedesktop.org/drm/intel/issues/4771
[i915#4812]: https://gitlab.freedesktop.org/drm/intel/issues/4812
[i915#4833]: https://gitlab.freedesktop.org/drm/intel/issues/4833
[i915#4852]: https://gitlab.freedesktop.org/drm/intel/issues/4852
[i915#4854]: https://gitlab.freedesktop.org/drm/intel/issues/4854
[i915#4860]: https://gitlab.freedesktop.org/drm/intel/issues/4860
[i915#4880]: https://gitlab.freedesktop.org/drm/intel/issues/4880
[i915#4881]: https://gitlab.freedesktop.org/drm/intel/issues/4881
[i915#4885]: https://gitlab.freedesktop.org/drm/intel/issues/4885
[i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#5213]: https://gitlab.freedesktop.org/drm/intel/issues/5213
[i915#5235]: https://gitlab.freedesktop.org/drm/intel/issues/5235
[i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
[i915#5289]: https://gitlab.freedesktop.org/drm/intel/issues/5289
[i915#5431]: https://gitlab.freedesktop.org/drm/intel/issues/5431
[i915#5461]: https://gitlab.freedesktop.org/drm/intel/issues/5461
[i915#5563]: https://gitlab.freedesktop.org/drm/intel/issues/5563
[i915#5723]: https://gitlab.freedesktop.org/drm/intel/issues/5723
[i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
[i915#7116]: https://gitlab.freedesktop.org/drm/intel/issues/7116
[i915#7178]: https://gitlab.freedesktop.org/drm/intel/issues/7178
[i915#7697]: https://gitlab.freedesktop.org/drm/intel/issues/7697
[i915#7711]: https://gitlab.freedesktop.org/drm/intel/issues/7711
[i915#7742]: https://gitlab.freedesktop.org/drm/intel/issues/7742
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#7959]: https://gitlab.freedesktop.org/drm/intel/issues/7959
[i915#7975]: https://gitlab.freedesktop.org/drm/intel/issues/7975
[i915#8150]: https://gitlab.freedesktop.org/drm/intel/issues/8150
[i915#8178]: https://gitlab.freedesktop.org/drm/intel/issues/8178
[i915#8292]: https://gitlab.freedesktop.org/drm/intel/issues/8292
[i915#8308]: https://gitlab.freedesktop.org/drm/intel/issues/8308

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

* Linux: CI_DRM_12993 -> Patchwork_116179v2

CI-20190529: 20190529
CI_DRM_12993: 3f6d1a580787c3aa8c9c7f174bdce5b055d6d724 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7250: 2da179d399d83a6859a89176d83b7ec1d71fe27a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_116179v2: 3f6d1a580787c3aa8c9c7f174bdce5b055d6d724 @ 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_116179v2/index.html