From patchwork Tue Apr 22 22:55:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4036921 Return-Path: X-Original-To: patchwork-intel-gfx@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 8B8A9C0DA2 for ; Tue, 22 Apr 2014 22:56:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B429D201EF for ; Tue, 22 Apr 2014 22:56:11 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B0E3F20221 for ; Tue, 22 Apr 2014 22:56:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FA6B6E979; Tue, 22 Apr 2014 15:56:10 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-yk0-f174.google.com (mail-yk0-f174.google.com [209.85.160.174]) by gabe.freedesktop.org (Postfix) with ESMTP id E48EA6E972 for ; Tue, 22 Apr 2014 15:56:07 -0700 (PDT) Received: by mail-yk0-f174.google.com with SMTP id 20so140030yks.33 for ; Tue, 22 Apr 2014 15:56:07 -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:in-reply-to:references; bh=XnWYfp7QBssOEZgJhYUIAhhEBN0srVafBwfVPXjDD7I=; b=Yh2AV3zVgjHybDPvQxVJq9eHqwPDWTKtDJ6M/o7UU3is0QqNJaUCvpMb9+VYq8wltg HeDlFnaOSRp9uJaka16EEPeqmCvENVJMJ4q9BKwsGEBg3mxmIybRcaLDncL+xz3HimIb m3bN7z5eN+tTGxLUrJ1wn4fUoz7vjzGJTU9AKAm8kFamTA6DI2MWEMjMZf5sTfWpyJmu 2m3vjZbiA8mMbK2tqG4FQdM5NmK0EOeZgi3e48z0tVRGOuiaoIWDzF1T7i1aaDtk4DkM 56JvP+GzeGu45CY//WkRpadP74Wga2vSpsIGuQU8yMb3pl79bocx3kpcGHzT0zM+a7dB jipA== X-Received: by 10.236.97.102 with SMTP id s66mr64994729yhf.45.1398207367485; Tue, 22 Apr 2014 15:56:07 -0700 (PDT) Received: from localhost.localdomain ([177.156.79.173]) by mx.google.com with ESMTPSA id 63sm81337973yhi.13.2014.04.22.15.56.06 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Apr 2014 15:56:07 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Tue, 22 Apr 2014 19:55:44 -0300 Message-Id: <1398207345-1865-3-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1398207345-1865-1-git-send-email-przanoni@gmail.com> References: <20140411132123.GH9262@phenom.ffwll.local> <1398207345-1865-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 3/4] drm/i915: remove redundant is_edp() check X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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=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 From: Paulo Zanoni If intel_edp_init_connector() returns false, then we know that is_edp() is true because of the early return at intel_edp_init_connector(). So remove the redundant check. Change proposed by Chris on his review to "drm/i915: get power domain in case the BIOS enabled eDP VDD". Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_dp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index b385b03..a25f708 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3958,12 +3958,10 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port, if (!intel_edp_init_connector(intel_dp, intel_connector, &power_seq)) { drm_dp_aux_unregister_i2c_bus(&intel_dp->aux); - if (is_edp(intel_dp)) { - cancel_delayed_work_sync(&intel_dp->panel_vdd_work); - mutex_lock(&dev->mode_config.mutex); - edp_panel_vdd_off_sync(intel_dp); - mutex_unlock(&dev->mode_config.mutex); - } + cancel_delayed_work_sync(&intel_dp->panel_vdd_work); + mutex_lock(&dev->mode_config.mutex); + edp_panel_vdd_off_sync(intel_dp); + mutex_unlock(&dev->mode_config.mutex); drm_sysfs_connector_remove(connector); drm_connector_cleanup(connector); return false;