aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-08-30 09:37:57 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-09-24 02:19:03 -0400
commit7314dec95c054258d5e5a3d1d55e1fd042f8eaad (patch)
tree3f4445cd0c96d186d15cff7182ad275e572cccdd /drivers/gpu/drm
parent9d59e8a1fc8fc35bf22dc92d7722a7502769ab7e (diff)
drm/nv17-nv4x: Fix analog load detection false positive on rare occasions.
On some boards the residual current DAC outputs can draw when they're disconnected can be high enough to give a false load detection positive (I've only seen it in the S-video luma output of some cards, but just to be sure). The output line capacitance is limited and sampling twice should fix it reliably. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/nv04_dac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_dac.c b/drivers/gpu/drm/nouveau/nv04_dac.c
index ea3627041ecf..509c05015d50 100644
--- a/drivers/gpu/drm/nouveau/nv04_dac.c
+++ b/drivers/gpu/drm/nouveau/nv04_dac.c
@@ -291,6 +291,8 @@ uint32_t nv17_dac_sample_load(struct drm_encoder *encoder)
291 msleep(5); 291 msleep(5);
292 292
293 sample = NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset); 293 sample = NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset);
294 /* do it again just in case it's a residual current */
295 sample &= NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset);
294 296
295 temp = NVReadRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL); 297 temp = NVReadRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL);
296 NVWriteRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL, 298 NVWriteRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL,