From patchwork Sat Nov 12 13:12:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 9424179 X-Patchwork-Delegate: geert@linux-m68k.org 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 703CC60484 for ; Sat, 12 Nov 2016 13:14:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 655D6296DC for ; Sat, 12 Nov 2016 13:14:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59CB0298C0; Sat, 12 Nov 2016 13:14:24 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 083A3296E2 for ; Sat, 12 Nov 2016 13:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965962AbcKLNOW (ORCPT ); Sat, 12 Nov 2016 08:14:22 -0500 Received: from smtp-4.sys.kth.se ([130.237.48.193]:33546 "EHLO smtp-4.sys.kth.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965978AbcKLNNv (ORCPT ); Sat, 12 Nov 2016 08:13:51 -0500 Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id 2C0023364; Sat, 12 Nov 2016 14:13:50 +0100 (CET) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YMwqdCfZYeES; Sat, 12 Nov 2016 14:13:47 +0100 (CET) X-KTH-Auth: niso [89.233.230.99] X-KTH-mail-from: niklas.soderlund+renesas@ragnatech.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by smtp-4.sys.kth.se (Postfix) with ESMTPSA id 7AA652A5B; Sat, 12 Nov 2016 14:13:47 +0100 (CET) From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= To: Laurent Pinchart , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, tomoharu.fukawa.eb@renesas.com, Sakari Ailus , Geert Uytterhoeven , =?UTF-8?q?Niklas=20S=C3=B6derlund?= Subject: [PATCHv2 22/32] media: rcar-vin: add chsel information to rvin_info Date: Sat, 12 Nov 2016 14:12:06 +0100 Message-Id: <20161112131216.22635-23-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161112131216.22635-1-niklas.soderlund+renesas@ragnatech.se> References: <20161112131216.22635-1-niklas.soderlund+renesas@ragnatech.se> MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Each Gen3 SoC have a limited set of predefined routing possibilities for which CSI2 device and virtual channel can be routed to which VIN instance. Prepare to store this information in the struct rvin_info. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-vin.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h index 90c28a7..cd7d959 100644 --- a/drivers/media/platform/rcar-vin/rcar-vin.h +++ b/drivers/media/platform/rcar-vin/rcar-vin.h @@ -35,6 +35,9 @@ /* Max number on VIN instances that can be in a system */ #define RCAR_VIN_NUM 8 +/* Max number of CHSEL values for any Gen3 SoC */ +#define RCAR_CHSEL_MAX 6 + enum chip_id { RCAR_H1, RCAR_M1, @@ -111,6 +114,16 @@ struct rvin_graph_entity { struct rvin_group; + +/** struct rvin_group_chsel - Map a CSI2 device and channel for a CHSEL value + * @csi: VIN internal number for CSI2 device + * @chan: CSI2 VC number on remote + */ +struct rvin_group_chsel { + enum rvin_csi_id csi; + int chan; +}; + /** * struct rvin_info- Information about the particular VIN implementation * @chip: type of VIN chip @@ -123,6 +136,9 @@ struct rvin_info { unsigned int max_width; unsigned int max_height; + + unsigned int num_chsels; + struct rvin_group_chsel chsels[RCAR_VIN_NUM][RCAR_CHSEL_MAX]; }; /**