]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: fix speaker allocation setup
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Oct 2014 15:51:50 +0000 (11:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Nov 2014 18:10:31 +0000 (10:10 -0800)
commit 4910403836ded89803fab201d4b5caaa85de3a89 upstream.

If the sad_count is 0, set the hw to stereo and change
the error message to a warn.  A lot of monitors don't
set the speaker allocation block.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/dce3_1_afmt.c
drivers/gpu/drm/radeon/dce6_afmt.c
drivers/gpu/drm/radeon/evergreen_hdmi.c

index 51800e340a57d5c6e5294aaeaa35f1422b606d4e..71f4d26669cd9338526c67932e2d9e1571d60b4d 100644 (file)
@@ -49,8 +49,8 @@ static void dce3_2_afmt_write_speaker_allocation(struct drm_encoder *encoder)
 
        sad_count = drm_edid_to_speaker_allocation(radeon_connector->edid, &sadb);
        if (sad_count < 0) {
-               DRM_ERROR("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
-               return;
+               DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
+               sad_count = 0;
        }
 
        /* program the speaker allocation */
index ab29f953a767318c5e06de2115a9cfde017a9c82..790d8cafdb8720ddd83d2befda8804381f97c4b1 100644 (file)
@@ -176,9 +176,9 @@ void dce6_afmt_write_speaker_allocation(struct drm_encoder *encoder)
        }
 
        sad_count = drm_edid_to_speaker_allocation(radeon_connector_edid(connector), &sadb);
-       if (sad_count <= 0) {
-               DRM_ERROR("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
-               return;
+       if (sad_count < 0) {
+               DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
+               sad_count = 0;
        }
 
        /* program the speaker allocation */
index 278c7a139d748f770467a53d4cf19a920c9bb2ef..71ebdf89fd761c8e6c5f2100669112dda0b055fb 100644 (file)
@@ -118,9 +118,9 @@ static void dce4_afmt_write_speaker_allocation(struct drm_encoder *encoder)
        }
 
        sad_count = drm_edid_to_speaker_allocation(radeon_connector_edid(connector), &sadb);
-       if (sad_count <= 0) {
-               DRM_ERROR("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
-               return;
+       if (sad_count < 0) {
+               DRM_DEBUG("Couldn't read Speaker Allocation Data Block: %d\n", sad_count);
+               sad_count = 0;
        }
 
        /* program the speaker allocation */