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)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2015 17:08:56 +0000 (12:08 -0500)
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>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/dce3_1_afmt.c

index 2fe8cfc966d9304b6845f6f6d29c9e236d80b0cb..bafdf92a5732dfa679f74e47ee582a699f9d635e 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;
        }