From 42908007a61151166058249813e960087b062a89 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Fri, 15 Nov 2019 17:07:36 +0100 Subject: [PATCH] drm/edid: no CEA v3 extension is not an error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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=107825 Signed-off-by: Jean Delvare Reviewed-by: Ville Syrjälä Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191115170736.7d88593d@endymion --- drivers/gpu/drm/drm_edid.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 474ac04d5600..a98f43e64582 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -4279,12 +4279,12 @@ int drm_edid_to_sad(struct edid *edid, struct cea_sad **sads) 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 -EOPNOTSUPP; + return 0; } if (cea_db_offsets(cea, &start, &end)) { @@ -4340,12 +4340,12 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb) 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 -EOPNOTSUPP; + return 0; } if (cea_db_offsets(cea, &start, &end)) { -- 2.30.2