]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: improve dac adjust heuristics for legacy pdac
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 19 Jul 2013 21:44:43 +0000 (17:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2013 07:43:38 +0000 (15:43 +0800)
commit 03ed8cf9b28d886c64c7e705c7bb1a365fd8fb95 upstream.

Hopefully avoid more quirks in the future due to bogus
vbios dac data.

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

index 51096adccb66bc928b525c4b6a00fe892fe31795..f616e400ba69aa89c2332b08db66c1d28625e0bf 100644 (file)
@@ -890,8 +890,10 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
                        dac = RBIOS8(dac_info + 0x3) & 0xf;
                        p_dac->ps2_pdac_adj = (bg << 8) | (dac);
                }
-               /* if the values are all zeros, use the table */
-               if (p_dac->ps2_pdac_adj)
+               /* if the values are zeros, use the table */
+               if ((dac == 0) || (bg == 0))
+                       found = 0;
+               else
                        found = 1;
        }