Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4201457img; Tue, 26 Mar 2019 05:10:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWgDuFenwRb7CdIwFAjZWLr1DhPLVowMkNpK6LDT/02j1jxJ5QN1taO5mOLMfd6KFH+tza X-Received: by 2002:a17:902:6b8c:: with SMTP id p12mr31440887plk.282.1553602205947; Tue, 26 Mar 2019 05:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553602205; cv=none; d=google.com; s=arc-20160816; b=tW5xl3xww2mSurI0gGMqfUlzD9qHtGemRQpFvHThsG9k2N9q8bLE3nn47EJj6jPCYu ov8Em+I5Hdcie6senI1ECtWTFxKfT7rKSoxSs4RkwCppomzhZR1QeEwd/XFSsRrWbuf7 WLavBdVNcqWR9j8GA6Rfumnt5YrJwK3gWuqkqp6Fa16To04sotBXKVWy+tllk8rrxwO6 VintJsFASodx2fXfhTQqavh0eBzfVr0qLYhYHwe3zAQNbG2+5n5Fw9qJjnehnkB62pq5 w7GLedAAuE+Nd91l4OA0MnXxCiGvF2oj8tAKNyxqRemX6p6YwG+zTNHQcfjuABaSZoYx 2n5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:user-agent:content-language:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from; bh=dEFIgoJwOnkF7tAWiKqQCxw92RxICbrUnp1WQvjuzis=; b=tLwsOeeyghpN5RPt4oEGtx94iNW0zZo0PRnKYP7zW/d7DAYzPcDHUXjxF0EjsktSsw xdrt8eOeR+Qw+dbYXiKTCV9wX4KTh+WxaQthKh+uVO+wp/0it+UKBKxs5XiJpLamn57I J6xfX3Ujlwe36QK0neYykzhj8DqzCIbaFdxbA/pJTbcVg5op+TrGkMi73xUDnbPtJ8z4 2YraK1NkVE6GVdPk9eQ421eH0h1i81cMOtwek7eJYK1Dj+gClUlDJ3QO/dUuURMswBMZ UbU7AZ34etpPCnGoE3RurFerF+yf7zhwltB54DK/EMqR9CUGFx05bkkPtCOH5ATV27Lu i6iQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bg8si16131189plb.109.2019.03.26.05.09.50; Tue, 26 Mar 2019 05:10:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727617AbfCZMH6 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Mar 2019 08:07:58 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:60397 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725776AbfCZMH6 (ORCPT ); Tue, 26 Mar 2019 08:07:58 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2QC122n026241; Tue, 26 Mar 2019 13:07:38 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2rf4ybvbj1-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 26 Mar 2019 13:07:38 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 6722B31; Tue, 26 Mar 2019 12:07:37 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag5node2.st.com [10.75.127.14]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 323AB56DD; Tue, 26 Mar 2019 12:07:37 +0000 (GMT) Received: from SFHDAG5NODE3.st.com (10.75.127.15) by SFHDAG5NODE2.st.com (10.75.127.14) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 26 Mar 2019 13:07:36 +0100 Received: from SFHDAG5NODE3.st.com ([fe80::7c09:5d6b:d2c7:5f47]) by SFHDAG5NODE3.st.com ([fe80::7c09:5d6b:d2c7:5f47%20]) with mapi id 15.00.1347.000; Tue, 26 Mar 2019 13:07:36 +0100 From: Mickael GUENE To: Sakari Ailus CC: Sakari Ailus , "linux-media@vger.kernel.org" , Mauro Carvalho Chehab , Matt Ranostay , "linux-kernel@vger.kernel.org" , Ben Kao , Todor Tomov , Rui Miguel Silva , "Akinobu Mita" , Hans Verkuil , "Jason Chen" , Jacopo Mondi , Tianshu Qiu , Bingbu Cao Subject: Re: [PATCH v1 2/3] media:st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver Thread-Topic: [PATCH v1 2/3] media:st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver Thread-Index: AQHU2J8yZZpo/KT5AkiuZtoI6rx6VqYOyUaAgAJWyACACxavgIAAD7oAgAGIGICAAAhuAA== Date: Tue, 26 Mar 2019 12:07:36 +0000 Message-ID: <2d278ffa-79f8-6497-448f-0f53f7bee6df@st.com> References: <1552373045-134493-1-git-send-email-mickael.guene@st.com> <1552373045-134493-3-git-send-email-mickael.guene@st.com> <20190316221437.e3ukdpgyn2yq72tu@valkosipuli.retiisi.org.uk> <024de1c6-3e40-ac5a-586e-d9878947ff18@st.com> <20190325111746.h26isglf4d765mtg@kekkonen.localdomain> <80f98c19-6045-9f7c-d549-f559ae8eb9d9@st.com> <20190326113725.mx3ixvy4tunb44xw@paasikivi.fi.intel.com> In-Reply-To: <20190326113725.mx3ixvy4tunb44xw@paasikivi.fi.intel.com> Accept-Language: fr-FR, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.45] Content-Type: text/plain; charset="Windows-1252" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-26_08:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Sakari, On 3/26/19 12:37, Sakari Ailus wrote: > On Mon, Mar 25, 2019 at 12:14:05PM +0000, Mickael GUENE wrote: >> Hi Sakari, >> >> On 3/25/19 12:17, Sakari Ailus wrote: >>> Hi Mickael, >>> >>> On Mon, Mar 18, 2019 at 09:57:44AM +0000, Mickael GUENE wrote: >>>> Hi Sakari, >>>> >>>> Thanks for your review. Find my comments below. >>>> >>>> On 3/16/19 23:14, Sakari Ailus wrote: >>> ... >>>>>> +static struct v4l2_subdev *mipid02_find_sensor(struct mipid02_dev *bridge) >>>>>> +{ >>>>>> + struct media_device *mdev = bridge->sd.v4l2_dev->mdev; >>>>>> + struct media_entity *entity; >>>>>> + >>>>>> + if (!mdev) >>>>>> + return NULL; >>>>>> + >>>>>> + media_device_for_each_entity(entity, mdev) >>>>>> + if (entity->function == MEDIA_ENT_F_CAM_SENSOR) >>>>>> + return media_entity_to_v4l2_subdev(entity); >>>>> >>>>> Hmm. Could you instead use the link state to determine which of the >>>>> receivers is active? You'll need one more pad, and then you'd had 1:1 >>>>> mapping between ports and pads. >>>>> >>>> Goal here is not to detect which of the receivers is active but to find >>>> sensor in case there are others sub-dev in chain (for example a >>>> serializer/deserializer as found in cars). >>> >>> You shouldn't make assumptions on the rest of the pipeline beyond the >>> device that's directly connected. You might not even have a camera there. >>> >> I have also seen your answer to '[PATCH v2 2/2] media:st-mipid02: MIPID02 CSI-2 to PARALLEL bridge driver' >> concerning support of set_fmt, get_fmt and link_validate. >> My initial idea was to avoid to avoid to implement them and to avoid media ctrl configuration. According >> to your remark is seems a bad idea. Right ? > > Yes, you'll need them. This is how the media controller pipeline works: a > driver for a given device is generally only aware of its direct links and > generally only communicate with drivers for devices directly connected to > them. > >> In that case I have to also implement enum_mbus_code ? > > Yes, please. > Ok I will add it in v4 >> I will drop this code and use connected device only to get link speed. > > Ack. >