[2/3] drm/edid: don't log errors on absent CEA SAD blocks

Submitted by Jean Delvare on Aug. 30, 2019, 4:15 p.m.


Message ID 20190830181541.7d2be23d@endymion
State New
Headers show
Series "drm/edid: don't log errors on absent CEA SAD blocks" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Jean Delvare Aug. 30, 2019, 4:15 p.m.
It is fine for displays without audio functionality to not provide
any SAD block in their EDID. Do not log an error in that case,
just return quietly.

Inspired by a similar fix to the amdgpu driver in the context of bug

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian K├Ânig" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
 drivers/gpu/drm/radeon/radeon_audio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

--- linux-5.2.orig/drivers/gpu/drm/radeon/radeon_audio.c	2019-08-30 18:04:15.125056697 +0200
+++ linux-5.2/drivers/gpu/drm/radeon/radeon_audio.c	2019-08-30 18:04:35.078311347 +0200
@@ -367,10 +367,10 @@  static void radeon_audio_write_sad_regs(
 	sad_count = drm_edid_to_sad(radeon_connector_edid(connector), &sads);
-	if (sad_count <= 0) {
+	if (sad_count < 0)
 		DRM_ERROR("Couldn't read SADs: %d\n", sad_count);
+	if (sad_count <= 0)
-	}
 	if (radeon_encoder->audio && radeon_encoder->audio->write_sad_regs)


Oops, sorry, I messed up the subject line of that one, which should
really read "drm/radeon: be quiet when no SAD block is found".