drm/nv50/kms: use dac loadval from vbios, where it's available
authorBen Skeggs <bskeggs@redhat.com>
Mon, 3 Jun 2013 06:40:14 +0000 (16:40 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 5 Jun 2013 04:03:08 +0000 (14:03 +1000)
Regression from merging the old nv50/nvd9 code together, and may be
needed to fully fix fdo#64904.

The value is ignored completely by the hardware starting from nva3.

Reported-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nv50_display.c

index 325887390677582a09dab39d8eaf1bfb81a69313..e843cf86bccec036c312e76ad912e51c8642f3f6 100644 (file)
@@ -1554,7 +1554,9 @@ nv50_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)
 {
        struct nv50_disp *disp = nv50_disp(encoder->dev);
        int ret, or = nouveau_encoder(encoder)->or;
-       u32 load = 0;
+       u32 load = nouveau_drm(encoder->dev)->vbios.dactestval;
+       if (load == 0)
+               load = 340;
 
        ret = nv_exec(disp->core, NV50_DISP_DAC_LOAD + or, &load, sizeof(load));
        if (ret || load != 7)