From patchwork Fri Oct 31 22:53:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207371 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 64624C11AE for ; Fri, 31 Oct 2014 23:56:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9DC352014A for ; Fri, 31 Oct 2014 23:56:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C262F20172 for ; Fri, 31 Oct 2014 23:56:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3988D6E856; Fri, 31 Oct 2014 16:56:39 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 13C666E847 for ; Fri, 31 Oct 2014 15:56:58 -0700 (PDT) Received: by mail-pa0-f44.google.com with SMTP id bj1so8659748pad.3 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=Qi139y/30ZYEEjiAihBZG6kTfZNg0YO7OB73ig3fMwM=; b=sLqytntuH4RU0fZ47yKIJzOcXa0vjxyyCV24xAB+1lk+FIgmYdcfCyjxQJEbQUrhoL 6gAJqIwtGMIyAs0B8QbGadKPedTizK+394u3vo0UW8g9fJUd9TaNGZ9pt1FoDp5HrGac qCea6P8DvDaAXxuGe9bJKgh2wqTQZcn1kzGAdPZc/VJ3LUzu5F8N+VL/xV1wmVvm6hi2 DW4DEbqpF0sXxUvyrsii6Vfhpc3jErHCvbiCY/l2sPq1r5FYFx12AFiWyEqhmO5OKMBO HR4ldXGE+yUF59sdLH4+8QoWvDiM6pgHu1rIeDGuxjMyqhozmIB8lKpMuoG1uiy+tyo3 OpQg== X-Received: by 10.67.14.36 with SMTP id fd4mr27429435pad.79.1414796217900; 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.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:56:57 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 12/72] gpu: ipu-v3: Add ipu_dp_uninit_channel() Date: Fri, 31 Oct 2014 15:53:55 -0700 Message-Id: <1414796095-10107-13-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 Cc: Muzaffar Mahmood 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 Adds the function ipu_dp_uninit_channel() which tears down ipu_dp_setup_channel(). Signed-off-by: Steve Longerbeam Signed-off-by: Muzaffar Mahmood --- drivers/gpu/ipu-v3/ipu-dp.c | 18 ++++++++++++++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-dp.c b/drivers/gpu/ipu-v3/ipu-dp.c index 472acd6..626f738 100644 --- a/drivers/gpu/ipu-v3/ipu-dp.c +++ b/drivers/gpu/ipu-v3/ipu-dp.c @@ -302,6 +302,16 @@ static void ipu_dp_csc_init(struct ipu_flow *flow, writel(reg, flow->base + DP_COM_CONF); } +static void ipu_dp_csc_disable(struct ipu_flow *flow) +{ + writel(0, flow->base + DP_CSC_A_0); + writel(0, flow->base + DP_CSC_A_1); + writel(0, flow->base + DP_CSC_A_2); + writel(0, flow->base + DP_CSC_A_3); + writel(0, flow->base + DP_CSC_0); + writel(0, flow->base + DP_CSC_1); +} + int ipu_dp_setup_channel(struct ipu_dp *dp, enum ipu_color_space in, enum ipu_color_space out) @@ -344,6 +354,14 @@ int ipu_dp_setup_channel(struct ipu_dp *dp, } EXPORT_SYMBOL_GPL(ipu_dp_setup_channel); +void ipu_dp_uninit_channel(struct ipu_dp *dp) +{ + struct ipu_flow *flow = to_flow(dp); + + ipu_dp_csc_disable(flow); +} +EXPORT_SYMBOL_GPL(ipu_dp_uninit_channel); + int ipu_dp_enable(struct ipu_soc *ipu) { struct ipu_dp_priv *priv = ipu->dp_priv; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 36309b9..567ac41 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -292,6 +292,7 @@ void ipu_dp_disable_channel(struct ipu_dp *dp); void ipu_dp_disable(struct ipu_soc *ipu); 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); int ipu_dp_set_window_pos(struct ipu_dp *, u16 x_pos, u16 y_pos); int ipu_dp_set_global_alpha(struct ipu_dp *dp, bool enable, u8 alpha, bool bg_chan);