Commit 42908007 authored by Jean Delvare's avatar Jean Delvare Committed by Ville Syrjälä

drm/edid: no CEA v3 extension is not an error

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 the second half of bug fdo#107825:
https://bugs.freedesktop.org/show_bug.cgi?id=107825Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Reviewed-by: default avatarVille 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>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191115170736.7d88593d@endymion
parent 834c43a9
...@@ -4279,12 +4279,12 @@ int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads) ...@@ -4279,12 +4279,12 @@ int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads)
cea = drm_find_cea_extension(edid); cea = drm_find_cea_extension(edid);
if (!cea) { if (!cea) {
DRM_DEBUG_KMS("SAD: no CEA Extension found\n"); DRM_DEBUG_KMS("SAD: no CEA Extension found\n");
return -ENOENT; return 0;
} }
if (cea_revision(cea) < 3) { if (cea_revision(cea) < 3) {
DRM_DEBUG_KMS("SAD: wrong CEA revision\n"); DRM_DEBUG_KMS("SAD: wrong CEA revision\n");
return -EOPNOTSUPP; return 0;
} }
if (cea_db_offsets(cea, &start, &end)) { if (cea_db_offsets(cea, &start, &end)) {
...@@ -4340,12 +4340,12 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb) ...@@ -4340,12 +4340,12 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb)
cea = drm_find_cea_extension(edid); cea = drm_find_cea_extension(edid);
if (!cea) { if (!cea) {
DRM_DEBUG_KMS("SAD: no CEA Extension found\n"); DRM_DEBUG_KMS("SAD: no CEA Extension found\n");
return -ENOENT; return 0;
} }
if (cea_revision(cea) < 3) { if (cea_revision(cea) < 3) {
DRM_DEBUG_KMS("SAD: wrong CEA revision\n"); DRM_DEBUG_KMS("SAD: wrong CEA revision\n");
return -EOPNOTSUPP; return 0;
} }
if (cea_db_offsets(cea, &start, &end)) { if (cea_db_offsets(cea, &start, &end)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment