From: Ben Skeggs Date: Tue, 3 Jun 2014 02:56:18 +0000 (+1000) Subject: drm/g94-/disp/dp: take max pullup value across all lanes X-Git-Tag: firefly_0821_release~176^2~3773^2^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3e1eb5cf7c25dee269b9873588a8beecc7a7265a;p=firefly-linux-kernel-4.4.55.git drm/g94-/disp/dp: take max pullup value across all lanes Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c b/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c index d4dfcde0a95d..05487cda84a8 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c @@ -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)); diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/sornvd0.c b/drivers/gpu/drm/nouveau/core/engine/disp/sornvd0.c index 0055f869c507..97f0e9cd3d40 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/sornvd0.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/sornvd0.c @@ -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));