From patchwork Thu Sep 27 05:20:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10617263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 01E04913 for ; Thu, 27 Sep 2018 05:20:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5FF22AAF2 for ; Thu, 27 Sep 2018 05:20:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA9012ABC6; Thu, 27 Sep 2018 05:20:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 992792AAF2 for ; Thu, 27 Sep 2018 05:20:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4C9F6E25D; Thu, 27 Sep 2018 05:20:40 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id A41FA6E25D for ; Thu, 27 Sep 2018 05:20:39 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id g2-v6so996072pgu.11 for ; Wed, 26 Sep 2018 22:20:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lGdsTzCsvumbUayRWmhagLNog/i3kUYHJf/Nc0MaeKo=; b=uVdALnaObGnTUndxZIf6PulfyCMwIrWZcQ8OALgep2k/08xl9z6vSMkl6jVAVMtpFf E0O1f5msunocaUqnJAZJYGQfY8sIIJ87xcxL+Ft6iRYNqpaeeWPGbcgrnhWANZPdqnqc 2UsTMI3KJhx3dkuLAhVXJt2zfED5cGPk5b6E9wfICjmmeaAU1rjqqMMwce5Au4zxUFBY /svQqEIJyM1JDBIfDFkRmdPrrX5w5gJF9dnjeqAAxyIb75WuDGxbPaGNrrQagNfiDyEg CLtL53nUNZOpxB/73fR1/m7OgjEsH30xdBlMDREPHKEkG7OEIGo60pcWLNokjUWmviqS H6eg== X-Gm-Message-State: ABuFfoiPXvbXup50mM7aeCeEeTekH8qjJ+vNScO4kbbZmAK/b1coX2ar EEetrnL7S5fX/4WSwMYHlHHYlHcM+10= X-Google-Smtp-Source: ACcGV60QsrXZoN62DO03TjU+V/zOr+CDrkRqdj70Ji6y/7uPI6mZoi59b9/XCcRyDyrVnfUMsE2Zgw== X-Received: by 2002:a17:902:d201:: with SMTP id t1-v6mr9056273ply.63.1538025638873; Wed, 26 Sep 2018 22:20:38 -0700 (PDT) Received: from dk-ThinkPad-X260.fios-router.home (50-39-164-98.bvtn.or.frontiernet.net. [50.39.164.98]) by smtp.gmail.com with ESMTPSA id y128-v6sm1190424pfb.56.2018.09.26.22.20.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 22:20:37 -0700 (PDT) From: Dhinakaran Pandiyan X-Google-Original-From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Wed, 26 Sep 2018 22:20:19 -0700 Message-Id: <20180927052019.28845-3-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> References: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [CI 3/3] drm/i915/dp: Use a local variable for intel_encoder * X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP We have two cases of intel_dp to intel_encoder conversions, use a local variable to store the conversion. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: José Roberto de Souza Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_dp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6130d05d8b88..09229fc66dec 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -5017,6 +5017,7 @@ intel_dp_long_pulse(struct intel_connector *connector, { struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct intel_dp *intel_dp = intel_attached_dp(&connector->base); + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; enum drm_connector_status status; u8 sink_irq_vector = 0; @@ -5027,7 +5028,7 @@ intel_dp_long_pulse(struct intel_connector *connector, /* Can't disconnect eDP */ if (intel_dp_is_edp(intel_dp)) status = edp_detect(intel_dp); - else if (intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base)) + else if (intel_digital_port_connected(encoder)) status = intel_dp_detect_dpcd(intel_dp); else status = connector_status_disconnected; @@ -5078,11 +5079,8 @@ intel_dp_long_pulse(struct intel_connector *connector, * Some external monitors do not signal loss of link synchronization * with an IRQ_HPD, so force a link status check. */ - if (!intel_dp_is_edp(intel_dp)) { - struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; - + if (!intel_dp_is_edp(intel_dp)) intel_dp_retrain_link(encoder, ctx); - } /* * Clearing NACK and defer counts to get their exact values