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: 9467377 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 6A80C60231 for ; Fri, 9 Dec 2016 01:42:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D1092855A for ; Fri, 9 Dec 2016 01:42:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5109028618; Fri, 9 Dec 2016 01:42:46 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D26292855A for ; Fri, 9 Dec 2016 01:42:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3310A6E8D0; Fri, 9 Dec 2016 01:42:30 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg0-x241.google.com (mail-pg0-x241.google.com [IPv6:2607:f8b0:400e:c05::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 441706E6F0 for ; Thu, 8 Dec 2016 00:59:44 +0000 (UTC) Received: by mail-pg0-x241.google.com with SMTP id p66so25035026pga.2 for ; 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=Ul8BGBG3IQ8Msp1sDNYJnTGFrQYWf2YadzkX6W59LtSqGKIOLFj27VWFR96xqgyvUw 0Q3ujeYSd5sVKwIxs6kCKglfyt1+Etaq6SVYPmz/53ElydDvl+cYPH56aGzlldfEJm9G 4DsIdHmXrrSyCXg8qIJSuz0exG+YuvqrEmOds38kLXALdph2GTlUKyZeK1V0brmfkpuu eLO7XQY/OwJsOmwT0h4kpSWls15ogQm/ZB9fJi8p83zARJK+cTfyQq6rrXKRA4laWQ0/ XZw6KGeS4OydDTi8v8qGw7oCD+DooomEfRmwbeINN3k+f6YeJL+xzaNKKh2gWe0ax5Fl w3kQ== X-Gm-Message-State: AKaTC01hPuVRjCuwkkMIaRp1AGpIhARJ8XB2d4KvaAH92d9S0cQ82H98M1zczcZGTuuUUQ== 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 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> X-Mailman-Approved-At: Fri, 09 Dec 2016 01:39:51 +0000 Cc: devicetree@vger.kernel.org, linux-fbdev@vger.kernel.org, Steve Longerbeam , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org 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-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;