summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-05-19 23:59:35 +1000
committerBen Skeggs <bskeggs@redhat.com>2017-06-16 14:04:52 +1000
commit7d0a01a6dec9737d24be5ac223e73a0725eac8a0 (patch)
tree1582b4f8170e50e510abd64cc6aa862f607374a1 /drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
parent22e008f90d546507d57bdac92030cece73ded09a (diff)
drm/nouveau/disp/dp: train link only when actively displaying an image
This essentially (unless the link becomes unstable and needs to be re-trained) gives us a single entry-point to link training, during supervisor handling, where we can ensure all routing is up to date. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
index a67192ad5cf3..f3b255027c11 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/dp.c
@@ -417,7 +417,9 @@ nvkm_output_dp_train(struct nvkm_outp *outp, u32 datakbps)
/* Check that link configuration meets current requirements. */
linkKBps = ior->dp.bw * 27000 * ior->dp.nr;
dataKBps = DIV_ROUND_UP(datakbps, 8);
- if (linkKBps < dataKBps) {
+ OUTP_DBG(&dp->outp, "data %d KB/s link %d KB/s mst %d->%d",
+ dataKBps, linkKBps, ior->dp.mst, dp->lt.mst);
+ if (linkKBps < dataKBps || ior->dp.mst != dp->lt.mst) {
OUTP_DBG(&dp->outp, "link requirements changed");
goto done;
}
@@ -466,10 +468,8 @@ nvkm_dp_enable(struct nvkm_dp *dp, bool enable)
}
if (!nvkm_rdaux(aux, DPCD_RC00_DPCD_REV, dp->dpcd,
- sizeof(dp->dpcd))) {
- nvkm_output_dp_train(&dp->outp, 0);
+ sizeof(dp->dpcd)))
return;
- }
}
if (dp->present) {