From patchwork Wed Sep 16 20:41:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 7199271 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 082F2BEEC1 for ; Wed, 16 Sep 2015 20:43:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C8AE20817 for ; Wed, 16 Sep 2015 20:43:02 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5146720809 for ; Wed, 16 Sep 2015 20:43:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 08E8E6E1A2; Wed, 16 Sep 2015 13:43:00 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9FBE96E186 for ; Wed, 16 Sep 2015 13:42:58 -0700 (PDT) Received: by padhy16 with SMTP id hy16so218840256pad.1 for ; Wed, 16 Sep 2015 13:42:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=gc7iIU5R3i4tbf0dMbX0/QIfGibGDgeobdEd3A92CB8=; b=K8N9ePN3+RWjo3DK1iBB4R0XohB2jSDlp342CvHsxE2Ay9kXav6yVD17PQYY8KuMwG Isfws/jYTNTtzhnhfnrCSM1XQ1Soc/HRjLwAPyoLRO6l3V6pAfqAKt1UB7gUKbr/Dqk5 SUQsg9cElgJiU3jx9r0YGetV7PmOkPNCSnhsU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=gc7iIU5R3i4tbf0dMbX0/QIfGibGDgeobdEd3A92CB8=; b=Ws1PvXcUIMOSVgiJaYPZnyrOkYhU582oMOmho870hqN+e8g2kpxp3mdy1qFSJHWESn EdGA8F6TkeMyySAHaTiRpQgHlz3MRNvFKwpzLan/ifQS7Al2x9m42xIYnf0DerT4/qmW eqQswGiFlEQxu7tNhP6AgbPq1jdrWMRNn37GzZdaJRAPUkDvhbpyVTyxXKymLVKIPPmI vneIgzqeO3LC0jfZFI4NTyCuDXgy0Ck9h0Jr3UQWFFd1qFUyL4guOeqaMfR9Ev3RbPhd nG7sh+potQzKl9QK51ALELD/OwHRIWpdsFy0WuH4In7lOY64AYRY6e/bkWaRMeqE30wn mBZA== X-Gm-Message-State: ALoCoQm5YbcshGGV9BBU735qQZ7Xx+cBrP/5ylPwvJG5mzhZYAan4k4K7EvhCMX+cU+xlBF2mRII X-Received: by 10.66.122.73 with SMTP id lq9mr63124011pab.61.1442436178215; Wed, 16 Sep 2015 13:42:58 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id w9sm29479332pbt.29.2015.09.16.13.42.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Sep 2015 13:42:56 -0700 (PDT) From: Douglas Anderson To: airlied@linux.ie Subject: [PATCH] CHROMIUM: drm: bridge/dw_hdmi: Eliminate unused cable_plugin Date: Wed, 16 Sep 2015 13:41:38 -0700 Message-Id: <1442436098-26608-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.6.0.rc0.131.gf624c3d Cc: fabio.estevam@freescale.com, ykk@rock-chips.com, Douglas Anderson , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, andy.yan@rock-chips.com, rmk+kernel@arm.linux.org.uk, treding@nvidia.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 There's a member in 'struct dw_hdmi' called cable_plugin. It's never set to anything anywhere so thus is always false. There's a bit of code checking it, but since it's always false this must be dead code. Eliminate it. Note: if someone wants to figure out the intention of the original code and implement whatever feature / fix was needed then we can drop this patch. The 'cable_plugin' member has been unused since the code was first added in (9aaf880 imx-drm: Add mx6 hdmi transmitter support). Signed-off-by: Douglas Anderson Reviewed-by: Thierry Reding --- drivers/gpu/drm/bridge/dw_hdmi.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c index 0083d4e..ba90885 100644 --- a/drivers/gpu/drm/bridge/dw_hdmi.c +++ b/drivers/gpu/drm/bridge/dw_hdmi.c @@ -115,7 +115,6 @@ struct dw_hdmi { int vic; u8 edid[HDMI_EDID_LEN]; - bool cable_plugin; bool phy_enabled; struct drm_display_mode previous_mode; @@ -1203,12 +1202,6 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi) hdmi_writeb(hdmi, val, HDMI_FC_INVIDCONF); } -static void hdmi_enable_overflow_interrupts(struct dw_hdmi *hdmi) -{ - hdmi_writeb(hdmi, 0, HDMI_FC_MASK2); - hdmi_writeb(hdmi, 0, HDMI_IH_MUTE_FC_STAT2); -} - static void hdmi_disable_overflow_interrupts(struct dw_hdmi *hdmi) { hdmi_writeb(hdmi, HDMI_IH_MUTE_FC_STAT2_OVERFLOW_MASK, @@ -1285,8 +1278,6 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode) hdmi_tx_hdcp_config(hdmi); dw_hdmi_clear_overflow(hdmi); - if (hdmi->cable_plugin && hdmi->sink_is_hdmi) - hdmi_enable_overflow_interrupts(hdmi); return 0; }