Skip to contentSkip to conversation

drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3

PATCH In review Ville Syrjala 3 participants 8 messages Sep 2, 2019 – Sep 10, 2019

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

PATCH 1/2 drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3

From: Ville Syrjälä <[email protected]>

CEA ext block revisions 1 and 2 do not contain the data block collection. Instead that section of the extension block is marked as reserved for 8 byte timing descriptors. Revision 3 changed it to contain the CEA data block collection instead.

Most places that iterate the data blocks already check for revision >= 3, but drm_detect_hdmi_monitor() and drm_detect_monitor_audio() do not. So in theory when encountering rev 1 or 2 CEA extension block they could end up misinterpreting whatever data is in the reserved section as CEA data blocks.

Let's have cea_db_offsets() do the revision check so that the callers don't even have worry about it.

---
 drivers/gpu/drm/drm_edid.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_edid.c +3 -0
index 82a4ceed3fcf..7b3072fc550b 100644
@@ -3690,6 +3690,9 @@ cea_revision(const u8 *cea)
 static int
 cea_db_offsets(const u8 *cea, int *start, int *end)
 {
+	if (cea_revision(cea) < 3)
+		return -ENOTSUPP;
+
 	/* DisplayID CTA extension blocks and top-level CEA EDID
 	 * block header definitions differ in the following bytes:
 	 *   1) Byte 2 of the header specifies length differently,
Signature · 6 lines
2.21.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 drm/edid: Have cea_db_offsets() zero start/end when the data block collection isn't found

From: Ville Syrjälä <[email protected]>

Let's make cea_db_offsets() a bit more convenient to use by setting the start/end offsets to zero whenever the data block collection isn't present. This makes it safe for the caller to blindly iterate the data blocks even if there are none.

---
 drivers/gpu/drm/drm_edid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +4 -4
index 7b3072fc550b..e5905dc764c1 100644
@@ -3690,6 +3690,9 @@ cea_revision(const u8 *cea)
 static int
 cea_db_offsets(const u8 *cea, int *start, int *end)
 {
+	*start = 0;
+	*end = 0;
+
 	if (cea_revision(cea) < 3)
 		return -ENOTSUPP;
 
@@ -4116,10 +4119,7 @@ static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
 	if (cea_revision(cea) >= 3) {
 		int i, start, end;
 
-		if (cea_db_offsets(cea, &start, &end)) {
-			start = 0;
-			end = 0;
-		}
+		cea_db_offsets(cea, &start, &end);
 
 		for_each_cea_db(cea, i, start, end) {
 			db = &cea[i];
Signature · 6 lines
2.21.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Re: [PATCH 2/2] drm/edid: Have cea_db_offsets() zero start/end when the data block collection isn't found

Hi Ville,

Quoted 29 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Let's make cea_db_offsets() a bit more convenient to use by setting the start/end offsets to zero whenever the data block collection isn't present. This makes it safe for the caller to blindly iterate the data blocks even if there are none.

---
 drivers/gpu/drm/drm_edid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +3 -0
index 7b3072fc550b..e5905dc764c1 100644
@@ -3690,6 +3690,9 @@ cea_revision(const u8 *cea)
 static int
 cea_db_offsets(const u8 *cea, int *start, int *end)
 {
+	*start = 0;
+	*end = 0;
+
 	if (cea_revision(cea) < 3)
 		return -ENOTSUPP;
 
@@ -4116,10 +4119,7 @@ static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
 	if (cea_revision(cea) >= 3) {

drivers/gpu/drm/drm_edid.c static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) · line 4125

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +1 -4
 		int i, start, end;
 
-		if (cea_db_offsets(cea, &start, &end)) {
-			start = 0;
-			end = 0;
-		}
+		cea_db_offsets(cea, &start, &end);
 
 		for_each_cea_db(cea, i, start, end) {
 			db = &cea[i];

Not sure if that's really needed. As it stands there's only one function which wants to continue after cea_db_offsets() fails, all others just bail out at that point. Now that cea_db_offsets() checks for revision >= 3, the construct above could simply become:

	int i, start, end;

	if (cea_db_offsets(cea, &start, &end) == 0) {
		for_each_cea_db(cea, i, start, end) {
			db = &cea[i];

which is IMHO more elegant and does not require zeroing start and end in cea_db_offsets().

Signature · 6 lines
Jean Delvare
SUSE L3 Support
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 2/2] drm/edid: Have cea_db_offsets() zero start/end when the data block collection isn't found

Quoted 48 lines · Jean Delvare

Hi Ville,

Quoted 29 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Let's make cea_db_offsets() a bit more convenient to use by setting the start/end offsets to zero whenever the data block collection isn't present. This makes it safe for the caller to blindly iterate the data blocks even if there are none.

---
 drivers/gpu/drm/drm_edid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +3 -0
index 7b3072fc550b..e5905dc764c1 100644
@@ -3690,6 +3690,9 @@ cea_revision(const u8 *cea)
 static int
 cea_db_offsets(const u8 *cea, int *start, int *end)
 {
+	*start = 0;
+	*end = 0;
+
 	if (cea_revision(cea) < 3)
 		return -ENOTSUPP;
 
@@ -4116,10 +4119,7 @@ static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
 	if (cea_revision(cea) >= 3) {

drivers/gpu/drm/drm_edid.c static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) · line 4125

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +1 -4
 		int i, start, end;
 
-		if (cea_db_offsets(cea, &start, &end)) {
-			start = 0;
-			end = 0;
-		}
+		cea_db_offsets(cea, &start, &end);
 
 		for_each_cea_db(cea, i, start, end) {
 			db = &cea[i];

Not sure if that's really needed. As it stands there's only one function which wants to continue after cea_db_offsets() fails, all others just bail out at that point. Now that cea_db_offsets() checks for revision >= 3, the construct above could simply become:

Quoted 8 lines
	int i, start, end;

	if (cea_db_offsets(cea, &start, &end) == 0) {
		for_each_cea_db(cea, i, start, end) {
			db = &cea[i];

which is IMHO more elegant and does not require zeroing start and end in cea_db_offsets().

I dislike indentation. Also could perhaps even move the cea_db_offsets() into the for_each_cea_db() macro so that the caller doesn't have to care about these mundane details at all.

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

Re: [PATCH 2/2] drm/edid: Have cea_db_offsets() zero start/end when the data block collection isn't found

Quoted 51 lines · Ville Syrjälä
Quoted 50 lines · Jean Delvare

Hi Ville,

Quoted 29 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

Let's make cea_db_offsets() a bit more convenient to use by setting the start/end offsets to zero whenever the data block collection isn't present. This makes it safe for the caller to blindly iterate the data blocks even if there are none.

---
 drivers/gpu/drm/drm_edid.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +3 -0
index 7b3072fc550b..e5905dc764c1 100644
@@ -3690,6 +3690,9 @@ cea_revision(const u8 *cea)
 static int
 cea_db_offsets(const u8 *cea, int *start, int *end)
 {
+	*start = 0;
+	*end = 0;
+
 	if (cea_revision(cea) < 3)
 		return -ENOTSUPP;
 
@@ -4116,10 +4119,7 @@ static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
 	if (cea_revision(cea) >= 3) {

drivers/gpu/drm/drm_edid.c static void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) · line 4125

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +1 -4
 		int i, start, end;
 
-		if (cea_db_offsets(cea, &start, &end)) {
-			start = 0;
-			end = 0;
-		}
+		cea_db_offsets(cea, &start, &end);
 
 		for_each_cea_db(cea, i, start, end) {
 			db = &cea[i];  

Not sure if that's really needed. As it stands there's only one function which wants to continue after cea_db_offsets() fails, all others just bail out at that point. Now that cea_db_offsets() checks for revision >= 3, the construct above could simply become:

	int i, start, end;
Quoted 8 lines
Quoted 6 lines
	if (cea_db_offsets(cea, &start, &end) == 0) {
		for_each_cea_db(cea, i, start, end) {
			db = &cea[i];

which is IMHO more elegant and does not require zeroing start and end in cea_db_offsets().

I dislike indentation.

It would be the same as currently, so it's not that bad. But well I'm not maintaining that piece of code so it's not my call anyway.

Quoted 3 lines

Also could perhaps even move the cea_db_offsets()
into the for_each_cea_db() macro so that the caller doesn't have to care about these mundane details at all.

If the macro stays readable, why not.

Signature · 6 lines
Jean Delvare
SUSE L3 Support
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

✓ Fi.CI.BAT: success for series starting with [1/2] drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3
URL : https://patchwork.freedesktop.org/series/66131/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6820 -> Patchwork_14257
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/

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

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_hangcheck:
- fi-icl-u2: [PASS][1] -> [INCOMPLETE][2] ([fdo#107713] / [fdo#108569])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-icl-u2/igt@i915_selftest@live_hangcheck.html

* igt@kms_chamelium@dp-crc-fast:
- fi-cml-u2: [PASS][3] -> [FAIL][4] ([fdo#109483])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-cml-u2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-cml-u2/igt@[email protected]

#### Possible fixes ####

* igt@gem_basic@create-close:
- fi-icl-u3: [DMESG-WARN][5] ([fdo#107724]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-icl-u3/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-icl-u3/igt@[email protected]

* igt@gem_close_race@basic-threads:
- fi-bxt-dsi: [INCOMPLETE][7] ([fdo#103927]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-bxt-dsi/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-bxt-dsi/igt@[email protected]

* igt@i915_module_load@reload:
- fi-icl-u3: [DMESG-WARN][9] ([fdo#107724] / [fdo#111214]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-icl-u3/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-icl-u3/igt@[email protected]

* igt@i915_selftest@live_execlists:
- fi-skl-gvtdvm: [DMESG-FAIL][11] ([fdo#111108]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-skl-gvtdvm/igt@i915_selftest@live_execlists.html

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: [FAIL][13] ([fdo#103167]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-icl-u3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-icl-u3/igt@[email protected]

#### Warnings ####

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-icl-u2: [FAIL][15] ([fdo#111407]) -> [FAIL][16] ([fdo#109483])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/fi-icl-u2/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/fi-icl-u2/igt@[email protected]

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#111108]: https://bugs.freedesktop.org/show_bug.cgi?id=111108
[fdo#111214]: https://bugs.freedesktop.org/show_bug.cgi?id=111214
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407

Participating hosts (54 -> 45)
------------------------------

Missing (9): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-icl-y fi-byt-clapper fi-bdw-samus

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_6820 -> Patchwork_14257

CI-20190529: 20190529
CI_DRM_6820: 2c16f62dc38ed97ab0056219f09d878c9e1c0355 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5162: e62ea305fdba2a9cd0dadfa527b54529cb0d1438 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14257: 1905dca746611ec865b8f99cd6407d815c3cb341 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

1905dca74661 drm/edid: Have cea_db_offsets() zero start/end when the data block collection isn't found ae9f56115d1d drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

✓ Fi.CI.IGT: success for series starting with [1/2] drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3

In reply to Ville Syrjala
== Series Details ==

== Series Details ==

Series: series starting with [1/2] drm/edid: Don't look for CEA data blocks in CEA ext block rev < 3
URL : https://patchwork.freedesktop.org/series/66131/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6820_full -> Patchwork_14257_full
====================================================

Summary
-------

**SUCCESS**

No regressions found.

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

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

### IGT changes ###

#### Issues hit ####

* igt@gem_exec_schedule@wide-bsd:
- shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#111325]) +3 similar issues
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb8/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb2/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-snb: [PASS][3] -> [DMESG-WARN][4] ([fdo#108686])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-snb5/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-snb1/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +7 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-apl7/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-apl4/igt@[email protected]

* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-kbl: [PASS][7] -> [SKIP][8] ([fdo#109271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-kbl1/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-kbl2/igt@[email protected]

* igt@i915_pm_rps@reset:
- shard-apl: [PASS][9] -> [FAIL][10] ([fdo#102250])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-apl4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-apl2/igt@[email protected]

* igt@kms_atomic_transition@1x-modeset-transitions:
- shard-iclb: [PASS][11] -> [INCOMPLETE][12] ([fdo#107713])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb7/igt@[email protected]

* igt@kms_cursor_legacy@cursora-vs-flipa-atomic:
- shard-skl: [PASS][13] -> [DMESG-WARN][14] ([fdo#106107])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-skl4/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-skl7/igt@[email protected]

* igt@kms_flip@dpms-vs-vblank-race-interruptible:
- shard-glk: [PASS][15] -> [FAIL][16] ([fdo#103060])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-glk8/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-glk8/igt@[email protected]

* igt@kms_flip@flip-vs-suspend:
- shard-skl: [PASS][17] -> [INCOMPLETE][18] ([fdo#109507])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-skl7/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-skl4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite:
- shard-iclb: [PASS][19] -> [FAIL][20] ([fdo#103167]) +2 similar issues
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-pwrite.html

* igt@kms_psr@psr2_cursor_mmap_cpu:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +2 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb2/igt@kms_psr@psr2_cursor_mmap_cpu.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb4/igt@kms_psr@psr2_cursor_mmap_cpu.html

* igt@prime_vgem@fence-wait-bsd2:
- shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#109276]) +14 similar issues
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb2/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb7/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@rcs0-s3:
- shard-apl: [DMESG-WARN][25] ([fdo#108566]) -> [PASS][26] +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-apl5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-apl3/igt@[email protected]

* igt@gem_exec_balancer@smoke:
- shard-iclb: [SKIP][27] ([fdo#110854]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb7/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-contexts-bsd1:
- shard-iclb: [SKIP][29] ([fdo#109276]) -> [PASS][30] +6 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb8/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@preemptive-hang-bsd:
- shard-iclb: [SKIP][31] ([fdo#111325]) -> [PASS][32] +3 similar issues
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb1/igt@[email protected]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb8/igt@[email protected]

* igt@gem_tiled_swapping@non-threaded:
- shard-apl: [INCOMPLETE][33] ([fdo#103927]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-apl7/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-apl5/igt@[email protected]

* igt@kms_cursor_legacy@flip-vs-cursor-toggle:
- shard-glk: [INCOMPLETE][35] ([fdo#103359] / [k.org#198133]) -> [PASS][36]
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-glk4/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-glk4/igt@[email protected]

* igt@kms_cursor_legacy@pipe-a-torture-bo:
- shard-iclb: [INCOMPLETE][37] ([fdo#107713]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb1/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb6/igt@[email protected]

* igt@kms_flip@2x-modeset-vs-vblank-race-interruptible:
- shard-glk: [FAIL][39] ([fdo#103060]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-glk8/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-glk3/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [INCOMPLETE][41] ([fdo#103540]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-hsw2/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-hsw2/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite:
- shard-iclb: [FAIL][43] ([fdo#103167]) -> [PASS][44] +5 similar issues
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb4/igt@[email protected]

* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][45] ([fdo#108145]) -> [PASS][46] +1 similar issue
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-skl5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-skl2/igt@[email protected]

* igt@kms_plane_lowres@pipe-a-tiling-x:
- shard-iclb: [FAIL][47] ([fdo#103166]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb8/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb5/igt@[email protected]

* igt@kms_psr@psr2_no_drrs:
- shard-iclb: [SKIP][49] ([fdo#109441]) -> [PASS][50] +2 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb8/igt@kms_psr@psr2_no_drrs.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb2/igt@kms_psr@psr2_no_drrs.html

* igt@perf@blocking:
- shard-skl: [FAIL][51] ([fdo#110728]) -> [PASS][52] +1 similar issue
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-skl4/igt@[email protected]
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-skl4/igt@[email protected]

#### Warnings ####

* igt@gem_mocs_settings@mocs-rc6-bsd2:
- shard-iclb: [SKIP][53] ([fdo#109276]) -> [FAIL][54] ([fdo#111330])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb8/igt@[email protected]
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb2/igt@[email protected]

* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [SKIP][55] ([fdo#109349]) -> [DMESG-WARN][56] ([fdo#107724])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6820/shard-iclb8/igt@[email protected]
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14257/shard-iclb2/igt@[email protected]

[fdo#102250]: https://bugs.freedesktop.org/show_bug.cgi?id=102250
[fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
[fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
[fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728
[fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
[fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
[fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
[k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133

Participating hosts (10 -> 10)
------------------------------

No changes in participating hosts

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

* CI: CI-20190529 -> None
* Linux: CI_DRM_6820 -> Patchwork_14257

CI-20190529: 20190529
CI_DRM_6820: 2c16f62dc38ed97ab0056219f09d878c9e1c0355 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5162: e62ea305fdba2a9cd0dadfa527b54529cb0d1438 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_14257: 1905dca746611ec865b8f99cd6407d815c3cb341 @ 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_14257/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/2
#7 lore raw
In reply to Ville Syrjala

Hi Ville,

Quoted 27 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

CEA ext block revisions 1 and 2 do not contain the data block collection. Instead that section of the extension block is marked as reserved for 8 byte timing descriptors. Revision 3 changed it to contain the CEA data block collection instead.

Most places that iterate the data blocks already check for revision >= 3, but drm_detect_hdmi_monitor() and drm_detect_monitor_audio() do not. So in theory when encountering rev 1 or 2 CEA extension block they could end up misinterpreting whatever data is in the reserved section as CEA data blocks.

Let's have cea_db_offsets() do the revision check so that the callers don't even have worry about it.

---
 drivers/gpu/drm/drm_edid.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0
index 82a4ceed3fcf..7b3072fc550b 100644

drivers/gpu/drm/drm_edid.c cea_revision(const u8 *cea) · line 3698

Quoted 9 lines
drivers/gpu/drm/drm_edid.c +3 -0
@@ -3690,6 +3690,9 @@ cea_revision(const u8 *cea)
 static int
 cea_db_offsets(const u8 *cea, int *start, int *end)
 {
+	if (cea_revision(cea) < 3)
+		return -ENOTSUPP;
+
 	/* DisplayID CTA extension blocks and top-level CEA EDID
 	 * block header definitions differ in the following bytes:
 	 *   1) Byte 2 of the header specifies length differently,

I like it, but then we need a subsequent patch to remove the now redundant checks in add_cea_modes(), drm_edid_to_eld(), drm_edid_to_sad() and drm_edid_to_speaker_allocation().

These last 2 functions are the ones my own patch modifies, so some care is needed. If cea_db_offsets() now returns an error when CEA revisions < 3, then these functions want to return 0 in that case (otherwise you effectively undo the change I proposed).

By the way, both functions issue a debug message "SAD: invalid data block offsets" when cea_db_offsets() returns an error, which becomes misleading after your change. I think we want to move this message inside cea_db_offsets() and only print it in the -ERANGE case.

Signature · 6 lines
Jean Delvare
SUSE L3 Support
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx