drm/g94-/disp/dp: take max pullup value across all lanes
authorBen Skeggs <bskeggs@redhat.com>
Tue, 3 Jun 2014 02:56:18 +0000 (12:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 11 Jun 2014 06:11:19 +0000 (16:11 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c
drivers/gpu/drm/nouveau/core/engine/disp/sornvd0.c

index d4dfcde0a95d90d64334c29887ad87417b7a6700..05487cda84a89afd7e7e79813aaa9330a9b7cdb8 100644 (file)
@@ -127,7 +127,9 @@ nv94_sor_dp_drv_ctl(struct nvkm_output_dp *outp, int ln, int vs, int pe, int pc)
 
        data[0] = nv_rd32(priv, 0x61c118 + loff) & ~(0x000000ff << shift);
        data[1] = nv_rd32(priv, 0x61c120 + loff) & ~(0x000000ff << shift);
-       data[2] = nv_rd32(priv, 0x61c130 + loff) & ~(0x0000ff00);
+       data[2] = nv_rd32(priv, 0x61c130 + loff);
+       if ((data[2] & 0x0000ff00) < (ocfg.tx_pu << 8) || ln == 0)
+               data[2] = (data[2] & ~0x0000ff00) | (ocfg.tx_pu << 8);
        nv_wr32(priv, 0x61c118 + loff, data[0] | (ocfg.dc << shift));
        nv_wr32(priv, 0x61c120 + loff, data[1] | (ocfg.pe << shift));
        nv_wr32(priv, 0x61c130 + loff, data[2] | (ocfg.tx_pu << 8));
index 0055f869c507a1ff2e446a18e0266685b876f803..97f0e9cd3d40b71b2a793c086eb18a617da14d39 100644 (file)
@@ -105,7 +105,9 @@ nvd0_sor_dp_drv_ctl(struct nvkm_output_dp *outp, int ln, int vs, int pe, int pc)
 
        data[0] = nv_rd32(priv, 0x61c118 + loff) & ~(0x000000ff << shift);
        data[1] = nv_rd32(priv, 0x61c120 + loff) & ~(0x000000ff << shift);
-       data[2] = nv_rd32(priv, 0x61c130 + loff) & ~(0x0000ff00);
+       data[2] = nv_rd32(priv, 0x61c130 + loff);
+       if ((data[2] & 0x0000ff00) < (ocfg.tx_pu << 8) || ln == 0)
+               data[2] = (data[2] & ~0x0000ff00) | (ocfg.tx_pu << 8);
        nv_wr32(priv, 0x61c118 + loff, data[0] | (ocfg.dc << shift));
        nv_wr32(priv, 0x61c120 + loff, data[1] | (ocfg.pe << shift));
        nv_wr32(priv, 0x61c130 + loff, data[2] | (ocfg.tx_pu << 8));