From patchwork Sat Jul 12 08:06:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 4539661 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D4F7CC0514 for ; Sat, 12 Jul 2014 16:33:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 075F5201EC for ; Sat, 12 Jul 2014 16:33:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D0AA0201C7 for ; Sat, 12 Jul 2014 16:33:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDD466E365; Sat, 12 Jul 2014 09:33:09 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f179.google.com (mail-pd0-f179.google.com [209.85.192.179]) by gabe.freedesktop.org (Postfix) with ESMTP id A0AFC6E8C8 for ; Sat, 12 Jul 2014 01:06:30 -0700 (PDT) Received: by mail-pd0-f179.google.com with SMTP id w10so2579740pde.38 for ; Sat, 12 Jul 2014 01:06:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=4XH0CO9DxLl3oCTxM18jZyTBfzV1IehYzBKtgNGu/Lw=; b=hRfRQEEOmn/OAeSFcCRfEkKOeIXEd/hiiYontfAAO0C85BmHlRR8U117kstrXLJ0J1 8sfFrRVLLYnMGexGVlgvFnr+ZGGj0xKAlixTiGZ4I8Yd56/8IS+t2rcwkvmXQzy8bFrY yasQKrS23loZzWjL74IAGbMOQ7sRSP7ugByrUt+rYU+Ls8iSJpj6ToMePl8wCv/Jbli4 UQe6ax8zJoPPbeGWgrkFGF+zeqbXbmP7VHpCVI+m0QO2/UW4HB6PL21jSeFFCKB7PCUo GFpvVloDcpEKsj6WYa/nE/+qG2jG6EK6F2gQRWtiRIjk+8jnCndGRaRbJo/Pa4Tyq5c2 mfMw== X-Received: by 10.68.251.201 with SMTP id zm9mr4213318pbc.22.1405152390257; Sat, 12 Jul 2014 01:06:30 -0700 (PDT) Received: from localhost.localdomain (cpe-98-154-223-43.socal.res.rr.com. [98.154.223.43]) by mx.google.com with ESMTPSA id bg12sm18728131pac.1.2014.07.12.01.06.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jul 2014 01:06:29 -0700 (PDT) From: Brian Norris To: David Airlie Subject: [PATCH] drm/nouveau/disp/dp: drop dead code Date: Sat, 12 Jul 2014 01:06:14 -0700 Message-Id: <1405152374-26821-1-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 1.7.9.5 X-Mailman-Approved-At: Sat, 12 Jul 2014 09:33:09 -0700 Cc: Brian Norris , Ben Skeggs , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since this commit: commit 55f083c33feb7231c7574a64cd01b0477715a370 Author: Ben Skeggs 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 Cc: Ben Skeggs --- 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) ||