From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0187DC433DB for ; Thu, 11 Feb 2021 13:51:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BDEAA64DE7 for ; Thu, 11 Feb 2021 13:51:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230348AbhBKNvb (ORCPT ); Thu, 11 Feb 2021 08:51:31 -0500 Received: from perceval.ideasonboard.com ([213.167.242.64]:51514 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232080AbhBKNqE (ORCPT ); Thu, 11 Feb 2021 08:46:04 -0500 Received: from [192.168.1.111] (91-157-208-71.elisa-laajakaista.fi [91.157.208.71]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 980C545E; Thu, 11 Feb 2021 14:44:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613051098; bh=g4+sXUYPsH1u3FNFVgG3+ISCZtj0FkcS0FTgQCzisTs=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=X7z9yKKaEnh1BBO8BNnwnlrxxhgkGGmSVQ51WyNcUoXZbt4f3StSKOqH3RRuSnh38 TN1EhteduzSGDRZg5jkTVeYgnp3+Jd5+0s7yv6ON2m2jZVJFvNOjfLxhlS2Jhl/yR6 73Zr66UxGhfZ0TTuIcMC9fWyrHQhjIHxsnamVunM= Subject: Re: [PATCH v4 00/31] v4l: add support for multiplexed streams To: Jacopo Mondi , sakari.ailus@linux.intel.com, laurent.pinchart@ideasonboard.com, niklas.soderlund+renesas@ragnatech.se Cc: luca@lucaceresoli.net, ian.arkver.dev@gmail.com, linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org References: <20190328200608.9463-1-jacopo+renesas@jmondi.org> From: Tomi Valkeinen Autocrypt: addr=tomi.valkeinen@ideasonboard.com; keydata= mQINBE6ms0cBEACyizowecZqXfMZtnBniOieTuFdErHAUyxVgtmr0f5ZfIi9Z4l+uUN4Zdw2 wCEZjx3o0Z34diXBaMRJ3rAk9yB90UJAnLtb8A97Oq64DskLF81GCYB2P1i0qrG7UjpASgCA Ru0lVvxsWyIwSfoYoLrazbT1wkWRs8YBkkXQFfL7Mn3ZMoGPcpfwYH9O7bV1NslbmyJzRCMO eYV258gjCcwYlrkyIratlHCek4GrwV8Z9NQcjD5iLzrONjfafrWPwj6yn2RlL0mQEwt1lOvn LnI7QRtB3zxA3yB+FLsT1hx0va6xCHpX3QO2gBsyHCyVafFMrg3c/7IIWkDLngJxFgz6DLiA G4ld1QK/jsYqfP2GIMH1mFdjY+iagG4DqOsjip479HCWAptpNxSOCL6z3qxCU8MCz8iNOtZk DYXQWVscM5qgYSn+fmMM2qN+eoWlnCGVURZZLDjg387S2E1jT/dNTOsM/IqQj+ZROUZuRcF7 0RTtuU5q1HnbRNwy+23xeoSGuwmLQ2UsUk7Q5CnrjYfiPo3wHze8avK95JBoSd+WIRmV3uoO rXCoYOIRlDhg9XJTrbnQ3Ot5zOa0Y9c4IpyAlut6mDtxtKXr4+8OzjSVFww7tIwadTK3wDQv Bus4jxHjS6dz1g2ypT65qnHen6mUUH63lhzewqO9peAHJ0SLrQARAQABtDBUb21pIFZhbGtl aW5lbiA8dG9ta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zKBP832I3PQjeok7F yjt+9S+KgSFSHP3Pa4E7lsSdWhSlHYNdG/czhoUkSCN09C0rEK93wxACx3vtxPLjXu6RptBw 3dRq7n+mQChEB1am0BueV1JZaBboIL0AGlSJkm23kw== Message-ID: <1510023a-a6aa-611e-8920-32b949ec5250@ideasonboard.com> Date: Thu, 11 Feb 2021 15:44:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20190328200608.9463-1-jacopo+renesas@jmondi.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org Hi all, On 28/03/2019 22:05, Jacopo Mondi wrote: > Hello, > new iteration of multiplexed stream support patch series. > > V3 available at: > https://patchwork.kernel.org/cover/10839889/ > > V2 sent by Niklas is available at: > https://patchwork.kernel.org/cover/10573817/ > > Series available at: > git://jmondi.org/linux v4l2-mux/media-master/v4 I'm trying to understand how these changes can be used with virtual channels and also with embedded data. I have an SoC with two CSI-2 RX ports, both of which connect to a processing block with 8 DMA engines. Each of the DMA engines can be programmed to handle a certain virtual channel and datatype. The board has a multiplexer, connected to 4 cameras, and the multiplexer connects to SoC's CSI-2 RX port. This board has just one multiplexer connected, but, of course, both RX ports could have a multiplexer, amounting to total 8 cameras. So, in theory, there could be 16 streams to be handled (4 pixel streams and 4 embedded data streams for both RX ports). With only 8 DMA engines available, the driver has to manage them dynamically, reserving a DMA engine when a stream is started. My confusion is with the /dev/video nodes. I think it would be logical to create 8 of them, one for each DMA engine (or less, if I know there is only, say, 1 camera connected, in which case 2 nodes would be enough). But in that case how does the user know what data is being received from that node? In other words, how to connect, say, /dev/video0 to second camera's embedded data stream? Another option would be to create 16 /dev/video nodes, and document that first one maps to virtual channel 0 + pixel data, second to virtual channel 0 + embedded data, and so on. And only allow 8 of them to be turned on at a time. But I don't like this idea much. The current driver architecture is such that the multiplexer is modeled with a subdev with 4 sink pads and one source pad, the SoC's RX ports are subdevs with a single sink and a single output pad, and then there are the video devices connected to RX's source pad. And while I can connect the video node's pad to the source pad on either of the RX ports, I don't think I have any way to define which stream it receives. Does that mean that each RX port subdev should instead have 8 source pads? Isn't a pad like a physical connection? There's really just one output from the RX port, with multiplexed streams, so 8 pads doesn't sound right. Tomi