summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-02-10 00:17:31 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-02-10 00:17:31 +0000
commit5b78a4fb661321c76171560ac0dcfbbbb9754f7b (patch)
tree96b04f736ae7c7849d89ad313cc7b5c56f48be9f /sys/dev/pci/drm
parent73b6f3ac235a7dd1e795cee407e6b85e3b1fa4b7 (diff)
drm/radeon: improve dac adjust heuristics for legacy pdac
From Alex Deucher f9474faaff4435129181db3000ff57ef2be7ab3e in ubuntu 3.8 03ed8cf9b28d886c64c7e705c7bb1a365fd8fb95 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r--sys/dev/pci/drm/radeon/radeon_combios.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_combios.c b/sys/dev/pci/drm/radeon/radeon_combios.c
index cbf2e547ba3..ab30e0732f6 100644
--- a/sys/dev/pci/drm/radeon/radeon_combios.c
+++ b/sys/dev/pci/drm/radeon/radeon_combios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_combios.c,v 1.3 2014/02/10 00:10:12 jsg Exp $ */
+/* $OpenBSD: radeon_combios.c,v 1.4 2014/02/10 00:17:30 jsg Exp $ */
/*
* Copyright 2004 ATI Technologies Inc., Markham, Ontario
* Copyright 2007-8 Advanced Micro Devices, Inc.
@@ -898,8 +898,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;
}