diff mbox series

[v2,3/3] drm/edid: no CEA v3 extension is not an error

Message ID 20190904111427.4474e9f8@endymion (mailing list archive)
State New, archived
Headers show
Series drm/edid: don't log errors on absent or old CEA SAD blocks | expand

Commit Message

Jean Delvare Sept. 4, 2019, 9:14 a.m. UTC
It is fine for displays without audio functionality to not implement
CEA v3 extension in their EDID. Do not return an error in that case,
instead return 0 as if there was a CEA v3 extension with no audio or
speaker block.

This fixes half of bug fdo#107825:
https://bugs.freedesktop.org/show_bug.cgi?id=107825

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
---
Changes since v1:
 * Treat CEA extension version < 3 as non-error too (suggested by Ville
   Syrjälä)

 drivers/gpu/drm/drm_edid.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

--- linux-5.2.orig/drivers/gpu/drm/drm_edid.c	2019-09-02 10:21:01.495525663 +0200
+++ linux-5.2/drivers/gpu/drm/drm_edid.c	2019-09-04 10:33:51.080273331 +0200
@@ -4130,12 +4130,12 @@  int drm_edid_to_sad(struct edid *edid, s
 	cea = drm_find_cea_extension(edid);
 	if (!cea) {
 		DRM_DEBUG_KMS("SAD: no CEA Extension found\n");
-		return -ENOENT;
+		return 0;
 	}
 
 	if (cea_revision(cea) < 3) {
 		DRM_DEBUG_KMS("SAD: wrong CEA revision\n");
-		return -ENOTSUPP;
+		return 0;
 	}
 
 	if (cea_db_offsets(cea, &start, &end)) {
@@ -4191,12 +4191,12 @@  int drm_edid_to_speaker_allocation(struc
 	cea = drm_find_cea_extension(edid);
 	if (!cea) {
 		DRM_DEBUG_KMS("SAD: no CEA Extension found\n");
-		return -ENOENT;
+		return 0;
 	}
 
 	if (cea_revision(cea) < 3) {
 		DRM_DEBUG_KMS("SAD: wrong CEA revision\n");
-		return -ENOTSUPP;
+		return 0;
 	}
 
 	if (cea_db_offsets(cea, &start, &end)) {