]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: fix sad_count check for dce3
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Dec 2014 15:04:01 +0000 (10:04 -0500)
committerLuis Henriques <luis.henriques@canonical.com>
Fri, 16 Jan 2015 14:34:24 +0000 (14:34 +0000)
commit 5665c3ebe5ee8a2c516925461f7214ba59c2e6d7 upstream.

Make it consistent with the sad code for other asics to deal
with monitors that don't report sads.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=89461

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/gpu/drm/radeon/dce3_1_afmt.c

index 13a27d971d355cabba262864500dd63f7d696c5f..9e2b5bfe4fa2373ebb69961382665c422887f388 100644 (file)
@@ -103,7 +103,7 @@ static void dce3_2_afmt_write_sad_regs(struct drm_encoder *encoder)
        }
 
        sad_count = drm_edid_to_sad(radeon_connector->edid, &sads);
-       if (sad_count < 0) {
+       if (sad_count <= 0) {
                DRM_ERROR("Couldn't read SADs: %d\n", sad_count);
                return;
        }