Merge branch 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau...
authorDave Airlie <airlied@redhat.com>
Wed, 5 Jun 2013 04:35:08 +0000 (14:35 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 5 Jun 2013 04:35:08 +0000 (14:35 +1000)
Multiple nouveau regression fixes, hdmi audio, s/r and dac load detection
* 'drm-nouveau-fixes-3.10' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nv50/kms: use dac loadval from vbios, where it's available
  drm/nv50/disp: force dac power state during load detect
  drm/nv50-nv84/fifo: fix resume regression introduced by playlist race fix
  drm/nv84/disp: Fix HDMI audio regression

1  2 
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
drivers/gpu/drm/nouveau/nv50_display.c

index ed7415e5e220303ecda2befaefa670726d290198,a60a5accb540868c209a9431eec8aafa4487c483..f02fd9f443fff3e1178b40cedda50ee4e9ba5461
@@@ -50,12 -50,15 +50,16 @@@ nv50_dac_sense(struct nv50_disp_priv *p
  {
        const u32 doff = (or * 0x800);
        int load = -EINVAL;
+       nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80150000);
+       nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000);
        nv_wr32(priv, 0x61a00c + doff, 0x00100000 | loadval);
 -      udelay(9500);
 +      mdelay(9);
 +      udelay(500);
        nv_wr32(priv, 0x61a00c + doff, 0x80000000);
        load = (nv_rd32(priv, 0x61a00c + doff) & 0x38000000) >> 27;
        nv_wr32(priv, 0x61a00c + doff, 0x00000000);
+       nv_mask(priv, 0x61a004 + doff, 0x807f0000, 0x80550000);
+       nv_wait(priv, 0x61a004 + doff, 0x80000000, 0x00000000);
        return load;
  }
  
index ebf0a683305ec18aad76a31822b96334c997f53f,e843cf86bccec036c312e76ad912e51c8642f3f6..dd5e01f89f284cd8aaf9df8b830816092055dc8b
@@@ -479,7 -479,7 +479,7 @@@ nv50_display_flip_wait(void *data
  {
        struct nv50_display_flip *flip = data;
        if (nouveau_bo_rd32(flip->disp->sync, flip->chan->addr / 4) ==
 -                                            flip->chan->data);
 +                                            flip->chan->data)
                return true;
        usleep_range(1, 2);
        return false;
@@@ -1554,7 -1554,9 +1554,9 @@@ nv50_dac_detect(struct drm_encoder *enc
  {
        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)