Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4175516img; Tue, 26 Mar 2019 04:39:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8Q5fzYX8eGlssUq+r3LfjiNYjMtgqDXW7+kmHLqj/hRxdMSQmczG23GlI5nSUfGZmtmLq X-Received: by 2002:a17:902:2ac3:: with SMTP id j61mr30493326plb.112.1553600364514; Tue, 26 Mar 2019 04:39:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553600364; cv=none; d=google.com; s=arc-20160816; b=sR2dv13WYxGMGG7vzGVn2EC/OCLNg4+cb2H3m/m3oHuedPiGzIsjXWhIvqrHv+D4qI 5ElXMeF5KZOG2lZVuhdmOYVOMeehubq5T6Pq96sPaOfCW+6+KRLvsMuq/UK7KMujaB49 kc94YLrki5pVqcCK9vADSMQYG17oqj3ylw0Zxxy0R5dL3QI4oFYdxBSMdn8wqb9kFcYE 7nik0+hZC6lUq8glSlVwngF2Pf+mPZqgmhslMO5jA8/BElAy9RksW8qxkCLsOzrCQiUA eElueHj7s2BuD7FBJDpXrgClqZoZVJjtNTJY5Zl6wmmtq0uVTNG+kr3J7T9R70CH/keZ z6cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=164dKmGiY4WcUkQK95t3BfF7jtgF4SSSO3eiRKfxWG4=; b=vrBgbhM/qefuC+i2P8KpQAOKs7sHDvyoPtVtkPRC6yM4aXIh5jRol7kNXbNw6ggsCs REBos8As7YTCsfWsF/GveCqpekJva0mD8xqWQ5V/HEzb9zwIWq4aOx1Ntss5jpPNaNEm AkJ833XHwg59qBX9Hwy+zpT5vTqJnH5c01stRUN9xnKnuk85uT+Jfl9ouHoeyyNkQZWE lA8POJ8ufHrUbh27dcrNxQyMWDCOju6s9rTIKba12atoERbbQF+t/XKc9g/HcVSvWLSw FK0cJY6a63HhQ2CEQFWZ70fSpMvLQDsQpp5Pa56I4kUy+d4JiEUJnkllQNn0G3v7CQrr +/pw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si15919474plk.126.2019.03.26.04.39.08; Tue, 26 Mar 2019 04:39:24 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731443AbfCZLhe (ORCPT + 99 others); Tue, 26 Mar 2019 07:37:34 -0400 Received: from mga14.intel.com ([192.55.52.115]:13907 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730722AbfCZLhb (ORCPT ); Tue, 26 Mar 2019 07:37:31 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 04:37:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,271,1549958400"; d="scan'208";a="310505879" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga005.jf.intel.com with ESMTP; 26 Mar 2019 04:37:26 -0700 Received: by paasikivi.fi.intel.com (Postfix, from userid 1000) id F36C6207E2; Tue, 26 Mar 2019 13:37:25 +0200 (EET) Date: Tue, 26 Mar 2019 13:37:25 +0200 From: Sakari Ailus To: Mickael GUENE 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 Message-ID: <20190326113725.mx3ixvy4tunb44xw@paasikivi.fi.intel.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <80f98c19-6045-9f7c-d549-f559ae8eb9d9@st.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > I will drop this code and use connected device only to get link speed. Ack. -- Sakari Ailus sakari.ailus@linux.intel.com