From patchwork Fri Oct 31 22:53:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 5207581 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 BB01B9FBAB for ; Fri, 31 Oct 2014 23:57:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C510920120 for ; Fri, 31 Oct 2014 23:57:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 05D81201C7 for ; Fri, 31 Oct 2014 23:57:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF3016E875; 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-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 5FD8E6E84E for ; Fri, 31 Oct 2014 15:56:56 -0700 (PDT) Received: by mail-pd0-f182.google.com with SMTP id fp1so8142135pdb.27 for ; Fri, 31 Oct 2014 15:56:56 -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=NgU1tw1Fibrp0eGSMwRXDO42xetTy4J94/ceoZGDXCw=; b=cWb0VZjbqaHnY0NRca7WuTj5kUMZYa7dqRxZOjSrbs1vVtxPxqrw4L1KfZVxXYtwjp lFaJRsoJwC5lIV0hhG2y8tf+/upO6//2ERvTBYDvBC1NgDc+piPJ7eoAvufePfsY/fe3 MKW7KugUPSid6yZz29KivD2LZDbCRc2qzIwjCRxgPCrfJj8wCO2F/ZYMwnGLpZhI0Hww EGMw3aCtwKWB8QXjm1ng6vv0JoPRMo2HCAGUOD5C77lbhR0iezN43MwASQU+tINMKf+o b9XHDdPLcu3fTLiRPUvCZ4qx1IDa4sZ27EQSG51eTsmjX7hbz8amLNMd3JkLqBRKv9cC Y6hQ== X-Received: by 10.66.240.228 with SMTP id wd4mr26081483pac.113.1414796216280; Fri, 31 Oct 2014 15:56:56 -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.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 31 Oct 2014 15:56:55 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: dri-devel@lists.freedesktop.org Subject: [PATCH 10/72] gpu: ipu-v3: Add ipu_dc_uninit_sync() Date: Fri, 31 Oct 2014 15:53:53 -0700 Message-Id: <1414796095-10107-11-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_dc_uninit_sync() which tears down ipu_dc_init_sync(). Signed-off-by: Steve Longerbeam Signed-off-by: Muzaffar Mahmood --- drivers/gpu/ipu-v3/ipu-dc.c | 14 ++++++++++++++ include/video/imx-ipu-v3.h | 1 + 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 36c7c57..6992f84 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -327,6 +327,20 @@ int ipu_dc_init_sync(struct ipu_dc *dc, struct ipu_di *di, bool interlaced, } EXPORT_SYMBOL_GPL(ipu_dc_init_sync); +void ipu_dc_uninit_sync(struct ipu_dc *dc) +{ + dc_link_event(dc, DC_EVT_NL, 0, 0); + dc_link_event(dc, DC_EVT_EOL, 0, 0); + dc_link_event(dc, DC_EVT_NEW_DATA, 0, 0); + dc_link_event(dc, DC_EVT_NF, 0, 0); + dc_link_event(dc, DC_EVT_NFIELD, 0, 0); + dc_link_event(dc, DC_EVT_EOF, 0, 0); + dc_link_event(dc, DC_EVT_EOFIELD, 0, 0); + dc_link_event(dc, DC_EVT_NEW_CHAN, 0, 0); + dc_link_event(dc, DC_EVT_NEW_ADDR, 0, 0); +} +EXPORT_SYMBOL_GPL(ipu_dc_uninit_sync); + void ipu_dc_enable(struct ipu_soc *ipu) { ipu_module_enable(ipu, IPU_CONF_DC_EN); diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 032948b5..758c773 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -245,6 +245,7 @@ struct ipu_dc *ipu_dc_get(struct ipu_soc *ipu, int channel); 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_channel(struct ipu_dc *dc); void ipu_dc_disable_channel(struct ipu_dc *dc);