summaryrefslogtreecommitdiff
path: root/linux-core/nv50_dac.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/nv50_dac.c')
-rw-r--r--linux-core/nv50_dac.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/linux-core/nv50_dac.c b/linux-core/nv50_dac.c
index 3f007166..5dddb469 100644
--- a/linux-core/nv50_dac.c
+++ b/linux-core/nv50_dac.c
@@ -146,7 +146,14 @@ static int nv50_dac_detect(struct nv50_output *output)
NV_WRITE(NV50_PDISPLAY_DAC_REGS_DPMS_CTRL(or), 0x00150000 | NV50_PDISPLAY_DAC_REGS_DPMS_CTRL_PENDING);
while (NV_READ(NV50_PDISPLAY_DAC_REGS_DPMS_CTRL(or)) & NV50_PDISPLAY_DAC_REGS_DPMS_CTRL_PENDING);
- load_pattern = 340; /* TODO: use a bios table for this */
+ /* Use bios provided value if possible. */
+ if (dev_priv->bios.dactestval) {
+ load_pattern = dev_priv->bios.dactestval;
+ NV50_DEBUG("Using bios provided load_pattern of %d\n", load_pattern);
+ } else {
+ load_pattern = 340;
+ NV50_DEBUG("Using default load_pattern of %d\n", load_pattern);
+ }
NV_WRITE(NV50_PDISPLAY_DAC_REGS_LOAD_CTRL(or), NV50_PDISPLAY_DAC_REGS_LOAD_CTRL_ACTIVE | load_pattern);
udelay(10000); /* give it some time to process */