mirror of
https://github.com/torvalds/linux.git
synced 2024-12-17 16:43:08 +00:00
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>
This commit is contained in:
parent
9d59e8a1fc
commit
7314dec95c
@ -291,6 +291,8 @@ uint32_t nv17_dac_sample_load(struct drm_encoder *encoder)
|
||||
msleep(5);
|
||||
|
||||
sample = NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset);
|
||||
/* do it again just in case it's a residual current */
|
||||
sample &= NVReadRAMDAC(dev, 0, NV_PRAMDAC_TEST_CONTROL + regoffset);
|
||||
|
||||
temp = NVReadRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL);
|
||||
NVWriteRAMDAC(dev, head, NV_PRAMDAC_TEST_CONTROL,
|
||||
|
Loading…
Reference in New Issue
Block a user