Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1314618rwd; Tue, 13 Jun 2023 07:37:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6hhGs74WYlrC+NAH7TmSN0g6xhucPgh3ODkb6wEiHJ0iE0Uy8dIzL2xv3uDg5zVY/Gh+VW X-Received: by 2002:a17:906:da85:b0:966:2123:e0ca with SMTP id xh5-20020a170906da8500b009662123e0camr13783520ejb.34.1686667052680; Tue, 13 Jun 2023 07:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686667052; cv=none; d=google.com; s=arc-20160816; b=gFg3v0c6lqXjz9sc4qefIs/mG9hcDTMC0lnx2uE+r3FQtgVePOr3CPgR2lAqXFHxEd svYzfbB7H8kiPn2U+zDNGe7Ob/wUHx4xZgLc8rMlnqFcOgFWUJL446o9N8GCi4R//1Bv cUGolJEs9qggKCTVwQxWLG09zIYeZz5+g2KePZ0e7Oz2zder7j2EoFxZwZYQW+8+D1GT 8Opx7DMXpZk/OEidPgGPb9cvO7m9KXqa0yS4zxqxbD7y9ZhLcL5be/fqLGgbXjfPfI6N 03/K2rOljT4WSFpunfAdrFnKQr/D0Vu7hm/A8ovB5mFvsqxkvGyUDxyUvrPTCHW6HwsP V+Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=5wIREHDjrytosgIZBydCnY1O4Gvbr5aonYJ28mi685Y=; b=eU6efR3CGrFG4M0QM8i77IlnQMDPxM1c0esQtdE14LvKjv5SWf9EN5ms9aONLE2+mm YGhRYC024V9PlBNiSqoQuEtNKKjTbiysNhriprx6aa3gUYxGYlEYXBblNJm58HwXX//r vVzHFmUYFhXP+ATrEpq6Lmq3Qkc4ON1ZyCRUs2jxaMP92SS+d3JgIbCp0L0I3g6w1Po+ 3thWKLTSNQBvK23CweWfEEjG1+OozfxgZxQbCaqYxziZPMx2YYSTnpnt7H/HA38P6efa pWL5UXEOfRo2HVY9PNJt7sOKemefqdk7/U7c5TJHFv8QZ/kyjDAC15BrDTH1FKK/b4/O Eaxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gu24-20020a170906f29800b00977d9a2c08csi6518549ejb.517.2023.06.13.07.37.07; Tue, 13 Jun 2023 07:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235443AbjFMOOh (ORCPT + 99 others); Tue, 13 Jun 2023 10:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239278AbjFMOOe (ORCPT ); Tue, 13 Jun 2023 10:14:34 -0400 Received: from mx.gpxsee.org (mx.gpxsee.org [37.205.14.76]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6DC541BD3; Tue, 13 Jun 2023 07:14:04 -0700 (PDT) Received: from [192.168.4.25] (unknown [62.77.71.229]) by mx.gpxsee.org (Postfix) with ESMTPSA id 8F0D6DC81; Tue, 13 Jun 2023 16:13:51 +0200 (CEST) Message-ID: <219c6e63-f036-9491-9f4a-c11c824c0b5f@gpxsee.org> Date: Tue, 13 Jun 2023 16:13:51 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [RESEND PATCH v6 1/1] Added Digiteq Automotive MGB4 driver Content-Language: en-US To: Hans Verkuil , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Martin_T=c5=afma?= References: <20230524112126.2242-1-tumic@gpxsee.org> <20230524112126.2242-2-tumic@gpxsee.org> <3a7da3cd-8d03-a2c4-0534-a75565aefc13@xs4all.nl> <0cec2b34-01bb-ec0e-f215-9e6ed3f44e73@xs4all.nl> <5021c762-3435-719b-18a3-def7888fb5f6@gpxsee.org> <313827c0-3b7a-e70a-b281-cbb5f68e6fd2@xs4all.nl> From: =?UTF-8?Q?Martin_T=c5=afma?= In-Reply-To: <313827c0-3b7a-e70a-b281-cbb5f68e6fd2@xs4all.nl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13. 06. 23 14:26, Hans Verkuil wrote: > On 12/06/2023 16:36, Martin Tůma wrote: >> On 12. 06. 23 10:42, Hans Verkuil wrote: >>> On 08/06/2023 13:16, Martin Tůma wrote: >>>> Hi, >>>> This is the "technical" part of my response, comments bellow: >>>> >>>> On 07. 06. 23 10:41, Hans Verkuil wrote: >>>>> Hi Martin, >>>>> >>>>> Some comments below: >>>>> >>>>> On 24/05/2023 13:21, tumic@gpxsee.org wrote: >>>>>> From: Martin Tůma >>>> >>>>>> diff --git a/Documentation/admin-guide/media/mgb4.rst b/Documentation/admin-guide/media/mgb4.rst >>>>>> new file mode 100644 >>>>>> index 000000000000..77db2fa64ab4 >>>>>> --- /dev/null >>>>>> +++ b/Documentation/admin-guide/media/mgb4.rst >>>>>> @@ -0,0 +1,352 @@ >>>>>> +.. SPDX-License-Identifier: GPL-2.0 >>>>>> + >>>>> >>>>> Perhaps it is a good idea to start with a high level overview of the >>>>> hardware blocks. That might help understand how the various parts are >>>>> connected. >>>>> >>>> >>>> This is the "admin-guide" documentation and I'm not sure if the admins (= the card users) are interested in some hardware blocks description. I can for sure ad some basic info like that the card (with >>>> the given module) has two inputs and two outputs, but if you hold the card in your hands while installing it into the PCIe slot you definitely notice that ;-) >>> >>> True, but I don't have that module :-). >>> >>> I assume the inputs (and also outputs) are mutually exclusive? I.e., only one at a time can be active? >>> >>> But it is also possible to switch between the inputs/outputs dynamically if you want? >>> >>> Right now it is hard coded through this property, but I assume there is a reason these >>> modules have two inputs and two outputs, so it is odd that it is not possible use >>> VIDIOC_S_INPUT/S_OUTPUT to toggle between them. >>> >> >> With the current modules, you can not even theoretically (after changing the FPGA bitstream) change the outputs to inputs or vice versa as the the serializers/deserializers are hardcoded on the modules. > > I think you misunderstand me. > > Let's keep it simple: a source is connected to input 0 and you capture from it with V4L2. > > Can I dynamically switch to input 1 and capture from that? I.e., each input has a > different source connected to it, so userspace can select from which input to capture. > > Right now it appears that V4L2 just advertises a single input. And the input_id > property is read-only. So that means that input 1 is effectively unusable with > the current driver, or am I missing something? > You can not mix the inputs. Input 0 is always wired to video0 (or whatever the naming of the video devices may be) and input 1 to video1 - there are two v4l2 devices, for every HW input one. The input_id property is just a "hint" which device corresponds to the given HW input. For the GMSL module, the situation is a little bit more complicated, as a single "wire" may contain multiple streams which are extracted by the GMSL deserializer (see the "gmsl_stream_id" property) so one "wire" may be the source of both video0 and video1, but the video streams are different. For the outputs, you can do more with the video_source property. You can for example "duplicate" the input stream to both HW outputs in the loopback mode or duplicate a v4l2 output stream to both HW outputs. In both cases, the duplication happens inside the PCIe card. >> >> I can post here some photo of the card, if it is ok to send image attachement to the mailing list so you have some image of what we are talking about. Or I can even show you the card live when you are >> in Prague in few days. > > Actually, I'd like that! We'll meet there anyway, so that's a good opportunity to > see the real deal :-) > I have no problem with taking the PCIe card (and the modules) to the conference, but I will definitely not bring the whole setup to see it running there as all together (the PC, monitor, infotainment system, car display and 12V power supply) it takes a whole desk at my office ;-) But if you would desperately like to see it "live", you can visit our offices and see it there, if you like. M. > Regards, > > Hans