Since this commit: commit 55f083c33feb7231c7574a64cd01b0477715a370 Author: Ben Skeggs <bskeggs@xxxxxxxxxx> Date: Tue May 20 10:18:03 2014 +1000 drm/nouveau/disp/dp: maintain link in response to hpd signal a few bits of code have been dead. This was noticed by Coverity Scan. Signed-off-by: Brian Norris <computersforpeace@xxxxxxxxx> Cc: Ben Skeggs <bskeggs@xxxxxxxxxx> --- Compile tested only drivers/gpu/drm/nouveau/core/engine/disp/dport.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/disp/dport.c b/drivers/gpu/drm/nouveau/core/engine/disp/dport.c index 5a5b59b21130..0f6fbe020c41 100644 --- a/drivers/gpu/drm/nouveau/core/engine/disp/dport.c +++ b/drivers/gpu/drm/nouveau/core/engine/disp/dport.c @@ -331,7 +331,6 @@ nouveau_dp_train(struct work_struct *w) struct dp_state _dp = { .outp = outp, }, *dp = &_dp; - u32 datarate = 0; int ret; /* bring capabilities within encoder limits */ @@ -345,20 +344,13 @@ nouveau_dp_train(struct work_struct *w) outp->dpcd[1] = outp->base.info.dpconf.link_bw; dp->pc2 = outp->dpcd[2] & DPCD_RC02_TPS3_SUPPORTED; - /* restrict link config to the lowest required rate, if requested */ - if (datarate) { - datarate = (datarate / 8) * 10; /* 8B/10B coding overhead */ - while (cfg[1].rate >= datarate) - cfg++; - } - cfg--; - /* disable link interrupt handling during link training */ nouveau_event_put(outp->irq); /* enable down-spreading and execute pre-train script from vbios */ dp_link_train_init(dp, outp->dpcd[3] & 0x01); + cfg--; while (ret = -EIO, (++cfg)->rate) { /* select next configuration supported by encoder and sink */ while (cfg->nr > (outp->dpcd[2] & DPCD_RC02_MAX_LANE_COUNT) || -- 1.7.9.5 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel