diff options
author | Jean Delvare <jdelvare@suse.de> | 2019-09-04 11:13:37 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-09-16 10:42:56 -0500 |
commit | 72496eb11734ed7a8420af91f737025dab583af1 (patch) | |
tree | 308f5bf911b6f3dd717f4a1357b887cdeace1e0f /drivers/gpu/drm/radeon | |
parent | ae2a3495973ef061bf7ee3c43b5d4f2599d622b7 (diff) | |
download | linux-stable-72496eb11734ed7a8420af91f737025dab583af1.tar.gz linux-stable-72496eb11734ed7a8420af91f737025dab583af1.tar.bz2 linux-stable-72496eb11734ed7a8420af91f737025dab583af1.zip |
drm/radeon: be quiet when no SAD block is found
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@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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_audio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_audio.c b/drivers/gpu/drm/radeon/radeon_audio.c index b9aea5776d3d..72db2b41e96d 100644 --- a/drivers/gpu/drm/radeon/radeon_audio.c +++ b/drivers/gpu/drm/radeon/radeon_audio.c @@ -367,10 +367,10 @@ static void radeon_audio_write_sad_regs(struct drm_encoder *encoder) 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) |