From patchwork Fri Oct 31 22:54:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207681 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 432179F318 for ; Fri, 31 Oct 2014 23:57:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 82EB120176 for ; Fri, 31 Oct 2014 23:57:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AD24720172 for ; Fri, 31 Oct 2014 23:57:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 52F5D6E86A; Fri, 31 Oct 2014 16:56:40 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by gabe.freedesktop.org (Postfix) with ESMTP id 50A896E851 for ; Fri, 31 Oct 2014 15:57:02 -0700 (PDT) Received: by mail-pd0-f174.google.com with SMTP id p10so8029738pdj.5 for ; Fri, 31 Oct 2014 15:57:02 -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=Jd9PKFZLjZyvM1wlJK5ZhIj3fnkBW5MD1j9QZNKgF/E=; b=pmzHK0gVb2GRCOIJg+d011n0K17D9wUOpfIe2gcH1BQsMYVjTaMR0KmvGw6mGj8FeP xB5Qom/Hrd4eCQ8nJ3W0z1Ei99lvgTOddI/71/aVM8EIz5tfYVI5wIPxTE+tDIT3XpQl wMmxMZkleb3e2IpP7ConSQZhaxP3i7FgfBdfyBf4rSwGZ7Wokg1Q2kylTYwHium5BDB5 cdeMQsDvh6nvPXnL/STJH5tUPowzf6nXjk7JWl++jfVwy/KkmX+BReVTqZEs8w3QQ9Xe 1G+vAO3v6mV6KfcTLRmyabx8ImYfnZoWKGmu3rY8VhvVoTEQIfNEo2PSALIlm7R71XPS APTQ== X-Received: by 10.66.176.39 with SMTP id cf7mr27476713pac.93.1414796222227; Fri, 31 Oct 2014 15:57:02 -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.57.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:57:01 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 17/72] gpu: ipu-v3: Add ipu_di_uninit_sync_panel() Date: Fri, 31 Oct 2014 15:54:00 -0700 Message-Id: <1414796095-10107-18-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 Adds ipu_di_uninit_sync_panel() which tears down ipu_di_init_sync_panel(). Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-di.c | 18 ++++++++++++++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-di.c b/drivers/gpu/ipu-v3/ipu-di.c index 35ee345..9841419 100644 --- a/drivers/gpu/ipu-v3/ipu-di.c +++ b/drivers/gpu/ipu-v3/ipu-di.c @@ -639,6 +639,24 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } EXPORT_SYMBOL_GPL(ipu_di_init_sync_panel); +void ipu_di_uninit_sync_panel(struct ipu_di *di) +{ + u32 reg, di_gen; + + mutex_lock(&di_mutex); + + di_gen = ipu_di_read(di, DI_GENERAL); + di_gen |= 0x3ff | DI_GEN_POLARITY_DISP_CLK; + ipu_di_write(di, di_gen, DI_GENERAL); + + reg = ipu_di_read(di, DI_POL); + reg |= 0x3ffffff; + ipu_di_write(di, reg, DI_POL); + + mutex_unlock(&di_mutex); +} +EXPORT_SYMBOL(ipu_di_uninit_sync_panel); + int ipu_di_enable(struct ipu_di *di) { int ret; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 1665a17..01ab5e0 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -260,6 +260,7 @@ int ipu_di_disable(struct ipu_di *); int ipu_di_enable(struct ipu_di *); int ipu_di_get_num(struct ipu_di *); int ipu_di_init_sync_panel(struct ipu_di *, struct ipu_di_signal_cfg *sig); +void ipu_di_uninit_sync_panel(struct ipu_di *di); /* * IPU Display Multi FIFO Controller (dmfc) functions