[PATCH v2 2/3] drm/radeon: be quiet when no SAD block is found

Jean Delvare jdelvare at suse.de
Wed Sep 4 09:13:37 UTC 2019


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
fdo#107825:
https://bugs.freedesktop.org/show_bug.cgi?id=107825

Signed-off-by: Jean Delvare <jdelvare at suse.de>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: "Christian König" <christian.koenig at amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou at amd.com>
Cc: David Airlie <airlied at linux.ie>
Cc: Daniel Vetter <daniel at ffwll.ch>
---
Changes since v1:
 * Fixed subject

 drivers/gpu/drm/radeon/radeon_audio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 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(
 		return;
 
 	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)
 		return;
-	}
 	BUG_ON(!sads);
 
 	if (radeon_encoder->audio && radeon_encoder->audio->write_sad_regs)

-- 
Jean Delvare
SUSE L3 Support


More information about the amd-gfx mailing list