dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	David@freedesktop.org, ChunMing <Zhou@freedesktop.org>,
	"  <David1.Zhou@amd.com>, Harry Wentland <harry.wentland@amd.com>,
	Leo  Li  <sunpeng.li@amd.com>,
	Maarten Lankhorst   <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard   <maxime.ripard@bootlin.com>,
	Sean Paul <sean@poorly.run>,
	Ville  =?UTF-8?B?U3lyasOkbMOk?= <ville.syrjala@linux.intel.com>,
	 Christian =?UTF-8?B?S8O2?= =?UTF-8?B?bmln?=
	<christian.koenig@amd.com>"@freedesktop.org
Subject: [PATCH v2 3/3] drm/edid: no CEA v3 extension is not an error
Date: Wed, 4 Sep 2019 11:14:27 +0200	[thread overview]
Message-ID: <20190904111427.4474e9f8@endymion> (raw)
In-Reply-To: <20190904111152.266d5176@endymion>

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(-)

--- 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)) {

-- 
Jean Delvare
SUSE L3 Support
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2019-09-04  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-04  9:11 [PATCH v2 0/3] drm/edid: don't log errors on absent or old CEA SAD blocks Jean Delvare
2019-09-04  9:12 ` [PATCH v2 1/3] drm/amd: be quiet when no SAD block is found Jean Delvare
2019-09-04 13:18   ` Harry Wentland
2019-09-13 20:51     ` Alex Deucher
2019-09-04  9:13 ` [PATCH v2 2/3] drm/radeon: " Jean Delvare
2019-09-04  9:14 ` Jean Delvare [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190904111427.4474e9f8@endymion \
    --to=jdelvare@suse.de \
    --cc="  <David1.Zhou@amd.com>, Harry Wentland <harry.wentland@amd.com>, Leo  Li  <sunpeng.li@amd.com>, Maarten Lankhorst   <maarten.lankhorst@linux.intel.com>, Maxime Ripard   <maxime.ripard@bootlin.com>, Sean Paul <sean@poorly.run>, Ville  =?UTF-8?B?U3lyasOkbMOk?= <ville.syrjala@linux.intel.com>,  Christian =?UTF-8?B?S8O2?= =?UTF-8?B?bmln?= <christian.koenig@amd.com>"@freedesktop.org \
    --cc=David@freedesktop.org \
    --cc=Zhou@freedesktop.org \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox