diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2013-11-03 19:52:29 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-11-08 00:39:55 -0500 |
commit | d7b023d87a900fa80802e35aa0afbb3d60e808dc (patch) | |
tree | cff99c75815d4010b169a6d509abe52621081094 | |
parent | 687d8f66b1849a1da515bcbc791f84d7d6dcfa1c (diff) |
drm/nv94-nvc0/disp: reorder writes to lane current control regs
Fixes link training issues on some boards.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c b/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c index 7ec4ee83fb64..eea3ef59693d 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/sornv94.c | |||
@@ -97,8 +97,9 @@ nv94_sor_dp_drv_ctl(struct nouveau_disp *disp, struct dcb_output *outp, | |||
97 | { | 97 | { |
98 | struct nouveau_bios *bios = nouveau_bios(disp); | 98 | struct nouveau_bios *bios = nouveau_bios(disp); |
99 | struct nv50_disp_priv *priv = (void *)disp; | 99 | struct nv50_disp_priv *priv = (void *)disp; |
100 | const u32 shift = nv94_sor_dp_lane_map(priv, lane); | ||
100 | const u32 loff = nv94_sor_loff(outp); | 101 | const u32 loff = nv94_sor_loff(outp); |
101 | u32 addr, shift = nv94_sor_dp_lane_map(priv, lane); | 102 | u32 addr, data[3]; |
102 | u8 ver, hdr, cnt, len; | 103 | u8 ver, hdr, cnt, len; |
103 | struct nvbios_dpout info; | 104 | struct nvbios_dpout info; |
104 | struct nvbios_dpcfg ocfg; | 105 | struct nvbios_dpcfg ocfg; |
@@ -113,9 +114,12 @@ nv94_sor_dp_drv_ctl(struct nouveau_disp *disp, struct dcb_output *outp, | |||
113 | if (!addr) | 114 | if (!addr) |
114 | return -EINVAL; | 115 | return -EINVAL; |
115 | 116 | ||
116 | nv_mask(priv, 0x61c118 + loff, 0x000000ff << shift, ocfg.drv << shift); | 117 | data[0] = nv_rd32(priv, 0x61c118 + loff) & ~(0x000000ff << shift); |
117 | nv_mask(priv, 0x61c120 + loff, 0x000000ff << shift, ocfg.pre << shift); | 118 | data[1] = nv_rd32(priv, 0x61c120 + loff) & ~(0x000000ff << shift); |
118 | nv_mask(priv, 0x61c130 + loff, 0x0000ff00, ocfg.unk << 8); | 119 | data[2] = nv_rd32(priv, 0x61c130 + loff) & ~(0x0000ff00); |
120 | nv_wr32(priv, 0x61c118 + loff, data[0] | (ocfg.drv << shift)); | ||
121 | nv_wr32(priv, 0x61c120 + loff, data[1] | (ocfg.pre << shift)); | ||
122 | nv_wr32(priv, 0x61c130 + loff, data[2] | (ocfg.unk << 8)); | ||
119 | return 0; | 123 | return 0; |
120 | } | 124 | } |
121 | 125 | ||