]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/nouveau/disp: log if DP link training fails
authorBen Skeggs <bskeggs@redhat.com>
Thu, 31 Oct 2013 23:36:42 +0000 (09:36 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 8 Nov 2013 05:39:55 +0000 (15:39 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/disp/dport.c

index 054d9cff4f533596e0eb52ef4ad5497ce727ca82..15448b9abac89f49bc5814d74228f9eda95df900 100644 (file)
@@ -308,7 +308,7 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
        while (*link_bw > (dp->dpcd[1] * 27000))
                link_bw++;
 
-       while (link_bw[0]) {
+       while ((ret = -EIO) && link_bw[0]) {
                /* find minimum required lane count at this link rate */
                dp->link_nr = dp->dpcd[2] & DPCD_RC02_MAX_LANE_COUNT;
                while ((dp->link_nr >> 1) * link_bw[0] > datarate)
@@ -339,6 +339,8 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
 
        /* finish link training */
        dp_set_training_pattern(dp, 0);
+       if (ret < 0)
+               ERR("link training failed\n");
 
        /* execute post-train script from vbios */
        dp_link_train_fini(dp);