From patchwork Fri Jan 17 15:51:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3505941 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 8AF28C02DC for ; Fri, 17 Jan 2014 15:52:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB8402015E for ; Fri, 17 Jan 2014 15:52:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1500F200D7 for ; Fri, 17 Jan 2014 15:52:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DBCE510689E; Fri, 17 Jan 2014 07:52:06 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qa0-f45.google.com (mail-qa0-f45.google.com [209.85.216.45]) by gabe.freedesktop.org (Postfix) with ESMTP id BDEF7106836 for ; Fri, 17 Jan 2014 07:51:34 -0800 (PST) Received: by mail-qa0-f45.google.com with SMTP id ii20so3466408qab.32 for ; Fri, 17 Jan 2014 07:51:34 -0800 (PST) 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=+ZLu2FGsZ8v232cJLUXhKUnUc7OFc9eCknuvYiVCSTE=; b=05zCy6AjYJSC7Bh48XZeFCTPH7fop9+mR2hyoDQwcgudyH+uiml9f2H5RCGnLTaPc+ fNOk1XY8fPzyovxsK70nM52sJ79gpifCRfUpw7dxfwfDA+0qAs+uni8x3R16gz2h4dvc kTyeDrOEVbSxd1qZ4jK5rZYliy2SSYZF12KtEwtKNIFxz9lSM/VqdKp1cQQaTTfOPai4 wzbf76Rrfpj6gjSTjU3viJoI87fKFJjl323bZsrKpYl/V0hnva3sXEmMA7yeKM2KuUpI soZ+n5iEiXINIvZwFDAc1TszBjnVw5onnqT95NOM1X9w7XpUm+oWEz7Twxj7SU6R+hQv 8DRQ== X-Received: by 10.224.74.74 with SMTP id t10mr4408731qaj.82.1389973894111; Fri, 17 Jan 2014 07:51:34 -0800 (PST) Received: from localhost.localdomain ([177.96.29.155]) by mx.google.com with ESMTPSA id w104sm2901857qge.5.2014.01.17.07.51.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2014 07:51:33 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Fri, 17 Jan 2014 13:51:11 -0200 Message-Id: <1389973873-2005-3-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1389973873-2005-1-git-send-email-przanoni@gmail.com> References: <1389973873-2005-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 6/3] drm/i915: remove "dsi" argument form intel_enable_pipe X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.4 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 Now that we pass struct intel_crtc as an argument, we can check for DSI inside the function, removing one more of those confusing boolean arguments. Signed-off-by: Paulo Zanoni Reviewed-by: Damien Lespiau --- drivers/gpu/drm/i915/intel_display.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1e5ad04..b110da8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1745,14 +1745,12 @@ static void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv) /** * intel_enable_pipe - enable a pipe, asserting requirements * @crtc: crtc responsible for the pipe - * @dsi: output type is DSI * @wait_for_vblank: whether we should for a vblank or not after enabling it * * Enable @crtc's pipe, making sure that various hardware specific requirements * are met, if applicable, e.g. PLL enabled, LVDS pairs enabled, etc. */ -static void intel_enable_pipe(struct intel_crtc *crtc, - bool dsi, bool wait_for_vblank) +static void intel_enable_pipe(struct intel_crtc *crtc, bool wait_for_vblank) { struct drm_device *dev = crtc->base.dev; struct drm_i915_private *dev_priv = dev->dev_private; @@ -1778,7 +1776,7 @@ static void intel_enable_pipe(struct intel_crtc *crtc, * need the check. */ if (!HAS_PCH_SPLIT(dev_priv->dev)) - if (dsi) + if (intel_pipe_has_type(&crtc->base, INTEL_OUTPUT_DSI)) assert_dsi_pll_enabled(dev_priv); else assert_pll_enabled(dev_priv, pipe); @@ -3563,7 +3561,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) intel_crtc_load_lut(crtc); intel_update_watermarks(crtc); - intel_enable_pipe(intel_crtc, false, true); + intel_enable_pipe(intel_crtc, true); intel_enable_primary_plane(dev_priv, plane, pipe); intel_enable_planes(crtc); intel_crtc_update_cursor(crtc, true); @@ -3708,7 +3706,7 @@ static void haswell_crtc_enable(struct drm_crtc *crtc) intel_ddi_enable_transcoder_func(crtc); intel_update_watermarks(crtc); - intel_enable_pipe(intel_crtc, false, false); + intel_enable_pipe(intel_crtc, false); if (intel_crtc->config.has_pch_encoder) lpt_pch_enable(crtc); @@ -4133,7 +4131,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc) intel_crtc_load_lut(crtc); intel_update_watermarks(crtc); - intel_enable_pipe(intel_crtc, is_dsi, true); + intel_enable_pipe(intel_crtc, true); intel_enable_primary_plane(dev_priv, plane, pipe); intel_enable_planes(crtc); intel_crtc_update_cursor(crtc, true); @@ -4171,7 +4169,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc) intel_crtc_load_lut(crtc); intel_update_watermarks(crtc); - intel_enable_pipe(intel_crtc, false, true); + intel_enable_pipe(intel_crtc, true); intel_enable_primary_plane(dev_priv, plane, pipe); intel_enable_planes(crtc); /* The fixup needs to happen before cursor is enabled */