From patchwork Fri Oct 31 22:53:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207861 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 8A0C9C11AC for ; Fri, 31 Oct 2014 23:57:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C12620173 for ; Fri, 31 Oct 2014 23:57:40 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9EA5720120 for ; Fri, 31 Oct 2014 23:57:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C2FE86E89F; Fri, 31 Oct 2014 16:56:59 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by gabe.freedesktop.org (Postfix) with ESMTP id C768E6E847 for ; Fri, 31 Oct 2014 15:56:58 -0700 (PDT) Received: by mail-pa0-f53.google.com with SMTP id kx10so8482994pab.26 for ; Fri, 31 Oct 2014 15:56:58 -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=r5OhT4RNHOU8161yF5SfFrLQRTKHpiChJ/Z7FOTrjuk=; b=LurA3260BAqlje5++M8RKcKiVgppjfxPjdosPUOlYQ++MCRNbaiKtVJE5uctejytLs hadvuczKfTZwZjMVaJlLClVYeypD1fkVyf6FJXEh2iHu7VhEOrGrkQ+Ey31q0M36macX buluQm/zNGFaxm8WH6Irz4gq6ZlyoQJmbdrDYCrTq0I312TRZKgJUGWEFo3fsBehuzZo KyFakgrZwAFm/1sDZzK/lZswEkYolSjp10talqe+TThCPsfj+HwYEV4uID1dM++qsRYJ z6DENxerkffmFO0z8zW4OKGO4oL88tRpRdDMK2BKaRiVTBQTKBMHk0hSLyvM/8BZYj9a bKRQ== X-Received: by 10.66.216.198 with SMTP id os6mr27559814pac.112.1414796218672; Fri, 31 Oct 2014 15:56:58 -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.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:56:58 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 13/72] gpu: ipu-v3: Pass struct ipu_dp to enable/disable Date: Fri, 31 Oct 2014 15:53:56 -0700 Message-Id: <1414796095-10107-14-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 DP channel to ipu_dp_enable() and ipu_dp_disable(), to be more consistent with the other ipu-dp APIs. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-dp.c | 10 ++++++---- drivers/staging/imx-drm/ipuv3-plane.c | 4 ++-- include/video/imx-ipu-v3.h | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-dp.c b/drivers/gpu/ipu-v3/ipu-dp.c index 626f738..89173e5 100644 --- a/drivers/gpu/ipu-v3/ipu-dp.c +++ b/drivers/gpu/ipu-v3/ipu-dp.c @@ -362,9 +362,10 @@ void ipu_dp_uninit_channel(struct ipu_dp *dp) } EXPORT_SYMBOL_GPL(ipu_dp_uninit_channel); -int ipu_dp_enable(struct ipu_soc *ipu) +int ipu_dp_enable(struct ipu_dp *dp) { - struct ipu_dp_priv *priv = ipu->dp_priv; + struct ipu_flow *flow = to_flow(dp); + struct ipu_dp_priv *priv = flow->priv; mutex_lock(&priv->mutex); @@ -431,9 +432,10 @@ void ipu_dp_disable_channel(struct ipu_dp *dp) } EXPORT_SYMBOL_GPL(ipu_dp_disable_channel); -void ipu_dp_disable(struct ipu_soc *ipu) +void ipu_dp_disable(struct ipu_dp *dp) { - struct ipu_dp_priv *priv = ipu->dp_priv; + struct ipu_flow *flow = to_flow(dp); + struct ipu_dp_priv *priv = flow->priv; mutex_lock(&priv->mutex); diff --git a/drivers/staging/imx-drm/ipuv3-plane.c b/drivers/staging/imx-drm/ipuv3-plane.c index 944962b..798125e 100644 --- a/drivers/staging/imx-drm/ipuv3-plane.c +++ b/drivers/staging/imx-drm/ipuv3-plane.c @@ -236,7 +236,7 @@ err_out: void ipu_plane_enable(struct ipu_plane *ipu_plane) { if (ipu_plane->dp) - ipu_dp_enable(ipu_plane->ipu); + ipu_dp_enable(ipu_plane->dp); ipu_dmfc_enable_channel(ipu_plane->dmfc); ipu_idmac_enable_channel(ipu_plane->ipu_ch); if (ipu_plane->dp) @@ -256,7 +256,7 @@ void ipu_plane_disable(struct ipu_plane *ipu_plane) ipu_idmac_disable_channel(ipu_plane->ipu_ch); ipu_dmfc_disable_channel(ipu_plane->dmfc); if (ipu_plane->dp) - ipu_dp_disable(ipu_plane->ipu); + ipu_dp_disable(ipu_plane->dp); } /* diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 567ac41..1665a17 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -286,10 +286,10 @@ void ipu_dmfc_put(struct dmfc_channel *dmfc); struct ipu_dp *ipu_dp_get(struct ipu_soc *ipu, unsigned int flow); void ipu_dp_put(struct ipu_dp *); -int ipu_dp_enable(struct ipu_soc *ipu); +int ipu_dp_enable(struct ipu_dp *dp); int ipu_dp_enable_channel(struct ipu_dp *dp); void ipu_dp_disable_channel(struct ipu_dp *dp); -void ipu_dp_disable(struct ipu_soc *ipu); +void ipu_dp_disable(struct ipu_dp *dp); int ipu_dp_setup_channel(struct ipu_dp *dp, enum ipu_color_space in, enum ipu_color_space out); void ipu_dp_uninit_channel(struct ipu_dp *dp);