From patchwork Fri Oct 31 22:53:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207451 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 0F2F7C11AC for ; Fri, 31 Oct 2014 23:57:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 319B320160 for ; Fri, 31 Oct 2014 23:57:01 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 36CF520120 for ; Fri, 31 Oct 2014 23:57:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 48DE76E8A0; Fri, 31 Oct 2014 16:56:43 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f176.google.com (mail-pd0-f176.google.com [209.85.192.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 372F76E84F for ; Fri, 31 Oct 2014 15:56:57 -0700 (PDT) Received: by mail-pd0-f176.google.com with SMTP id ft15so8089287pdb.21 for ; Fri, 31 Oct 2014 15:56:57 -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=BOluQnyFbeMDQMub6b5hDh1aYuueqFqkb2MWT5HaN4A=; b=hPZE2uosVhWOUH34PwNvX7DjIo0BSLso/YG3SjK2sVRlN1lUu0hnMat5QMOlpvD72z ZvWfZ3YM8Xae9KUVWaWWIZBJgOpYNAkx5V/OfqJkQTgtMMA2SfzuGxqcJ8k22Rn/2GvB yyiCMFl/ugVTTiyM/diCMJjH+C4DnhMD6y8henwBotmYtbUPhHBCu6129zvfIyRFPAga WZ334TKAX3Bpmc/JEOBWWfOa3i4o/IG6hn1LCpfFvAPoMLlQgtvl6NGB0Cu5TVXt+6uj vO4xw6AdvpOFBsr7okiL8QVlnFx8D6WyAraSXmBxJKkBln/R3KO6WpvzwfRYxKwBjN1Z Gl/A== X-Received: by 10.66.118.136 with SMTP id km8mr28274854pab.100.1414796217075; Fri, 31 Oct 2014 15:56:57 -0700 (PDT) Received: from mothership.mgc.mentorg.com (c-50-152-159-227.hsd1.ca.comcast.net. [50.152.159.227]) by mx.google.com with ESMTPSA id ev8sm10870656pdb.28.2014.10.31.15.56.56 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:56:56 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 11/72] gpu: ipu-v3: Pass struct ipu_dc to enable/disable Date: Fri, 31 Oct 2014 15:53:54 -0700 Message-Id: <1414796095-10107-12-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> References: <1414796095-10107-1-git-send-email-steve_longerbeam@mentor.com> X-Mailman-Approved-At: Fri, 31 Oct 2014 16:56:31 -0700 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.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 Pass the pointer to DC channel to ipu_dc_enable() and ipu_dc_disable(), to be more consistent with the other ipu-dc APIs. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-dc.c | 12 ++++++++---- drivers/staging/imx-drm/ipuv3-crtc.c | 8 ++------ include/video/imx-ipu-v3.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 6992f84..f53fce5 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -341,9 +341,11 @@ void ipu_dc_uninit_sync(struct ipu_dc *dc) } EXPORT_SYMBOL_GPL(ipu_dc_uninit_sync); -void ipu_dc_enable(struct ipu_soc *ipu) +void ipu_dc_enable(struct ipu_dc *dc) { - ipu_module_enable(ipu, IPU_CONF_DC_EN); + struct ipu_dc_priv *priv = dc->priv; + + ipu_module_enable(priv->ipu, IPU_CONF_DC_EN); } EXPORT_SYMBOL_GPL(ipu_dc_enable); @@ -403,9 +405,11 @@ void ipu_dc_disable_channel(struct ipu_dc *dc) } EXPORT_SYMBOL_GPL(ipu_dc_disable_channel); -void ipu_dc_disable(struct ipu_soc *ipu) +void ipu_dc_disable(struct ipu_dc *dc) { - ipu_module_disable(ipu, IPU_CONF_DC_EN); + struct ipu_dc_priv *priv = dc->priv; + + ipu_module_disable(priv->ipu, IPU_CONF_DC_EN); } EXPORT_SYMBOL_GPL(ipu_dc_disable); diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index 25c0231..7053619 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -60,12 +60,10 @@ struct ipu_crtc { static void ipu_fb_enable(struct ipu_crtc *ipu_crtc) { - struct ipu_soc *ipu = dev_get_drvdata(ipu_crtc->dev->parent); - if (ipu_crtc->enabled) return; - ipu_dc_enable(ipu); + ipu_dc_enable(ipu_crtc->dc); ipu_plane_enable(ipu_crtc->plane[0]); /* Start DC channel and DI after IDMAC */ ipu_dc_enable_channel(ipu_crtc->dc); @@ -76,8 +74,6 @@ static void ipu_fb_enable(struct ipu_crtc *ipu_crtc) static void ipu_fb_disable(struct ipu_crtc *ipu_crtc) { - struct ipu_soc *ipu = dev_get_drvdata(ipu_crtc->dev->parent); - if (!ipu_crtc->enabled) return; @@ -85,7 +81,7 @@ static void ipu_fb_disable(struct ipu_crtc *ipu_crtc) ipu_dc_disable_channel(ipu_crtc->dc); ipu_di_disable(ipu_crtc->di); ipu_plane_disable(ipu_crtc->plane[0]); - ipu_dc_disable(ipu); + ipu_dc_disable(ipu_crtc->dc); ipu_crtc->enabled = 0; } diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 758c773..36309b9 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -246,10 +246,10 @@ void ipu_dc_put(struct ipu_dc *dc); int ipu_dc_init_sync(struct ipu_dc *dc, struct ipu_di *di, bool interlaced, u32 pixel_fmt, struct ipu_dc_if_map *new_map, u32 width); void ipu_dc_uninit_sync(struct ipu_dc *dc); -void ipu_dc_enable(struct ipu_soc *ipu); +void ipu_dc_enable(struct ipu_dc *dc); void ipu_dc_enable_channel(struct ipu_dc *dc); void ipu_dc_disable_channel(struct ipu_dc *dc); -void ipu_dc_disable(struct ipu_soc *ipu); +void ipu_dc_disable(struct ipu_dc *dc); /* * IPU Display Interface (di) functions