From patchwork Thu Dec 8 00:57:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9465521 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4508B607D8 for ; Thu, 8 Dec 2016 01:01:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F7702859E for ; Thu, 8 Dec 2016 01:01:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 031E128599; Thu, 8 Dec 2016 01:01:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 902B72858A for ; Thu, 8 Dec 2016 01:01:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934024AbcLHBAb (ORCPT ); Wed, 7 Dec 2016 20:00:31 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:32997 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753460AbcLHA7r (ORCPT ); Wed, 7 Dec 2016 19:59:47 -0500 Received: by mail-pg0-f65.google.com with SMTP id 3so25048076pgd.0; Wed, 07 Dec 2016 16:59:44 -0800 (PST) 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=qyMrCCy6/tPi5mNIA3zMBOTo9tOxKC7OFTdvE1ZI9t0=; b=JXU1Cj63wiKxZmZatp6dJ65ASb620VlewjDX3O94jguD1BpSehGF/Sr8vdG9GyOEAZ INtksc+RFn2XomEPyuS8CShkTNNd9W0izKHMAnTsNhDK7/cwABEgRBWgt+/VVx3gbhiV gekwW4V4TOBCi4lRzptR6lWDDpvv9BulmU2fc5XceZ/U9cPMUwIcTkeIZpC6HRxjOLLf IeLzFzLecK2kQfQPwCniwBMZhxHa3fBPFXCT7ltvFP8rlgXl3g6tkH1fObjoFfHBPqaj EcRPEnNeVqOPg+q+IZDG49PRSdQ6YaO/trtNXuHSjMpHL2RlMLE+hUm7eyEm/y4nnfXt LYZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qyMrCCy6/tPi5mNIA3zMBOTo9tOxKC7OFTdvE1ZI9t0=; b=UdCk65D9V/qUTZbCilQgwduPdYb2g0FnTv+Pxc57BHj4z71ezzjYt2z7o+dLidXvV3 nfeUKRguZY67SdDZhGIQ1tAg2i1yu/CKCLBj1CDzbYhRIhO2ad5FgkZsMiLDdtelkrUp ZpmviGzZPbsTBeG5qSjIB1u8wbuGN1bKn1nUOgLtwrAWFuTtGB0Q0Rw4gEEMCkOpA0QK 5ETVNQmhWwflf60vxvQXPvw04E0vDmxDvTY7wdP/wTDXw0VrwTuj8FjsxL4gKX8q6Lgc ISjx/M8RVIdfpRtnEVFIbtIYRBgU6tPMZU1wAWsOadybw4nXk6tbU+BFOzRKegyBb9k4 1dvA== X-Gm-Message-State: AKaTC00KKhyPwBTqgubBQOXcCr0u1ZJLLpPjAGYQToAWBgM8nA6Mbl/BLf6MAdbxFujk7Q== X-Received: by 10.99.48.68 with SMTP id w65mr126472044pgw.68.1481158783664; Wed, 07 Dec 2016 16:59:43 -0800 (PST) Received: from majic.sklembedded.com (c-73-241-2-21.hsd1.ca.comcast.net. [73.241.2.21]) by smtp.googlemail.com with ESMTPSA id n25sm45265872pfi.33.2016.12.07.16.59.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Dec 2016 16:59:42 -0800 (PST) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, tomi.valkeinen@ti.com, p.zabel@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Steve Longerbeam Subject: [PATCH 12/12] gpu: ipu-v3: Add smfc and ic client devices Date: Wed, 7 Dec 2016 16:57:53 -0800 Message-Id: <1481158673-15937-13-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481158673-15937-1-git-send-email-steve_longerbeam@mentor.com> References: <1481158673-15937-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adds IPU client devices for the SMFC and IC task units. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-common.c | 87 +++++++++++++++++++++++++++++++++++++++-- include/video/imx-ipu-v3.h | 3 ++ 2 files changed, 87 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c index b6ca36b..729581d 100644 --- a/drivers/gpu/ipu-v3/ipu-common.c +++ b/drivers/gpu/ipu-v3/ipu-common.c @@ -1161,18 +1161,77 @@ static struct ipu_platform_reg client_reg[] = { .pdata = { .type = IPU_CSI, .csi = 0, - .dma[0] = IPUV3_CHANNEL_CSI0, - .dma[1] = -EINVAL, + .dma[0] = -EINVAL, }, .name = "imx-ipuv3-csi", }, { .pdata = { .type = IPU_CSI, .csi = 1, + .dma[0] = -EINVAL, + }, + .name = "imx-ipuv3-csi", + }, { + .pdata = { + .type = IPU_SMFC, + .smfc = 0, + .dma[0] = IPUV3_CHANNEL_CSI0, + .dma[1] = -EINVAL, + }, + .name = "imx-ipuv3-smfc", + }, { + .pdata = { + .type = IPU_SMFC, + .smfc = 1, .dma[0] = IPUV3_CHANNEL_CSI1, .dma[1] = -EINVAL, }, - .name = "imx-ipuv3-csi", + .name = "imx-ipuv3-smfc", + }, { + .pdata = { + .type = IPU_IC, + .ic_task = IC_TASK_ENCODER, + .ic = 0, + .dma[0] = IPUV3_CHANNEL_IC_PRP_ENC_MEM, + .dma[1] = -EINVAL, + }, + .name = "imx-ipuv3-ic", + }, { + .pdata = { + .type = IPU_IC, + .ic_task = IC_TASK_VIEWFINDER, + .ic = 0, + .dma[0] = IPUV3_CHANNEL_IC_PRP_VF_MEM, + .dma[1] = -EINVAL, + }, + .name = "imx-ipuv3-ic", + }, { + .pdata = { + .type = IPU_IC, + .ic_task = IC_TASK_POST_PROCESSOR, + .ic = 0, + .dma[0] = IPUV3_CHANNEL_IC_PP_MEM, + .dma[1] = -EINVAL, + }, + .name = "imx-ipuv3-ic", + }, { + .pdata = { + .type = IPU_IC, + .ic_task = IC_TASK_POST_PROCESSOR, + .ic = 1, + .dma[0] = IPUV3_CHANNEL_IC_PP_MEM, + .dma[1] = -EINVAL, + }, + .name = "imx-ipuv3-ic", + }, { + .pdata = { + .type = IPU_IC, + .ic_task = IC_TASK_POST_PROCESSOR, + .ic = 2, + .dma[0] = IPUV3_CHANNEL_IC_PP_MEM, + .dma[1] = -EINVAL, + }, + .name = "imx-ipuv3-ic", }, { .pdata = { .type = IPU_DI, @@ -1213,6 +1272,28 @@ of_get_ipu_client_node(struct ipu_soc *ipu, struct ipu_platform_reg *reg) "ipu%d_csi", ipu->id + 1); client_id = reg->pdata.csi; break; + case IPU_SMFC: + snprintf(node_name, sizeof(node_name), "ipu%d_smfc", + ipu->id + 1); + client_id = reg->pdata.smfc; + break; + case IPU_IC: + switch (reg->pdata.ic_task) { + case IC_TASK_ENCODER: + snprintf(node_name, sizeof(node_name), + "ipu%d_ic_prpenc", ipu->id + 1); + break; + case IC_TASK_VIEWFINDER: + snprintf(node_name, sizeof(node_name), + "ipu%d_ic_prpvf", ipu->id + 1); + break; + case IC_TASK_POST_PROCESSOR: + snprintf(node_name, sizeof(node_name), + "ipu%d_ic_pp", ipu->id + 1); + break; + } + client_id = reg->pdata.ic; + break; case IPU_DI: snprintf(node_name, sizeof(node_name), "ipu%d_di", ipu->id + 1); diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 7709af7..4e70ca4 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -418,6 +418,9 @@ int ipu_rot_mode_to_degrees(int *degrees, enum ipu_rotate_mode mode, struct ipu_client_platformdata { enum ipu_unit_type type; int csi; + int smfc; + int ic_task; + int ic; int di; int dc; int dp;