Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org,
	Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	hverkuil@xs4all.nl
Subject: Re: [PATCH v7 5/5] media: intel/ipu6: Obtain link frequency from a sub-device
Date: Mon, 16 Dec 2024 07:47:12 +0000	[thread overview]
Message-ID: <Z1_bAI3PQdDNG_VJ@kekkonen.localdomain> (raw)
In-Reply-To: <20241215170832.GI9975@pendragon.ideasonboard.com>

Hi Laurent,

On Sun, Dec 15, 2024 at 07:08:32PM +0200, Laurent Pinchart wrote:
> Hi Sakari,
> 
> Thank you for the patch.

Thank you for the review. I asked you to review a set but it wasn't this
one:
<URL:https://lore.kernel.org/linux-media/20241129095142.87196-1-sakari.ailus@linux.intel.com/T/#t>.
:-)

> 
> I think this should come before 4/5.
> 
> On Tue, Dec 10, 2024 at 09:59:06AM +0200, Sakari Ailus wrote:
> > Obtain the link frequency from the sub-device instead of a control
> > handler. This allows obtaining it using the get_mbus_config() sub-device
> > pad op that which is only supported by the IVSC driver.
> 
> "which is the only method supported by the IVSC driver"
> 
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> >  drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c | 12 +++---------
> >  1 file changed, 3 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
> > index 051898ce53f4..da8581a37e22 100644
> > --- a/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
> > +++ b/drivers/media/pci/intel/ipu6/ipu6-isys-csi2.c
> > @@ -80,25 +80,19 @@ static const struct ipu6_csi2_error dphy_rx_errors[] = {
> >  s64 ipu6_isys_csi2_get_link_freq(struct ipu6_isys_csi2 *csi2)
> >  {
> >  	struct media_pad *src_pad;
> > -	struct v4l2_subdev *ext_sd;
> > -	struct device *dev;
> >  
> >  	if (!csi2)
> >  		return -EINVAL;
> >  
> > -	dev = &csi2->isys->adev->auxdev.dev;
> >  	src_pad = media_entity_remote_source_pad_unique(&csi2->asd.sd.entity);
> 
> Not a candidate for this patch, but can the source change, or can it be
> cached at probe time (or notifier bound time) ?

It could be, but why would you do that?

This would also prevent connecting multiple sensors to a single CSI-2
receiver.

> 
> >  	if (IS_ERR(src_pad)) {
> > -		dev_err(dev, "can't get source pad of %s (%ld)\n",
> > +		dev_err(&csi2->isys->adev->auxdev.dev,
> > +			"can't get source pad of %s (%ld)\n",
> >  			csi2->asd.sd.name, PTR_ERR(src_pad));
> >  		return PTR_ERR(src_pad);
> >  	}
> >  
> > -	ext_sd = media_entity_to_v4l2_subdev(src_pad->entity);
> > -	if (WARN(!ext_sd, "Failed to get subdev for %s\n", csi2->asd.sd.name))
> > -		return -ENODEV;
> > -
> > -	return v4l2_get_link_freq(ext_sd->ctrl_handler, 0, 0);
> > +	return v4l2_get_link_freq(src_pad, 0, 0);
> >  }
> >  
> >  static int csi2_subscribe_event(struct v4l2_subdev *sd, struct v4l2_fh *fh,
> 

-- 
Regards,

Sakari Ailus

  reply	other threads:[~2024-12-16  7:47 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-10  7:59 [PATCH v7 0/5] Use V4L2 mbus config for conveying MEI CSI link frequency Sakari Ailus
2024-12-10  7:59 ` [PATCH v7 1/5] media: v4l: Support passing media pad argument to v4l2_get_link_freq() Sakari Ailus
2024-12-12 17:04   ` Jacopo Mondi
2024-12-15 16:45   ` Laurent Pinchart
2024-12-16  8:38     ` Sakari Ailus
2024-12-10  7:59 ` [PATCH v7 2/5] media: v4l: Support obtaining link frequency via get_mbus_config Sakari Ailus
2024-12-12 17:05   ` Jacopo Mondi
2024-12-15 16:59   ` Laurent Pinchart
2024-12-16  8:46     ` Sakari Ailus
2024-12-16 11:16       ` Laurent Pinchart
2024-12-16 12:15         ` Sakari Ailus
2024-12-16 13:51           ` Laurent Pinchart
2024-12-10  7:59 ` [PATCH v7 3/5] media: Documentation: Update link frequency driver documentation Sakari Ailus
2024-12-12 16:53   ` Jacopo Mondi
2024-12-13  7:15     ` Sakari Ailus
2024-12-15 17:02       ` Laurent Pinchart
2024-12-16  8:07         ` Sakari Ailus
2024-12-16  8:08           ` Sakari Ailus
2024-12-16 11:20           ` Laurent Pinchart
2024-12-16 12:05             ` Sakari Ailus
2024-12-16 13:51               ` Laurent Pinchart
2024-12-10  7:59 ` [PATCH v7 4/5] media: ivsc: csi: Obtain link frequency from the media pad Sakari Ailus
2024-12-10  7:59 ` [PATCH v7 5/5] media: intel/ipu6: Obtain link frequency from a sub-device Sakari Ailus
2024-12-15 17:08   ` Laurent Pinchart
2024-12-16  7:47     ` Sakari Ailus [this message]
2024-12-16  9:07       ` Laurent Pinchart
2024-12-16  9:18         ` Sakari Ailus
2024-12-16  9:40           ` Laurent Pinchart
2024-12-16  8:03     ` Sakari Ailus
2024-12-16 11:13       ` Laurent Pinchart
2024-12-16 11:21         ` Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z1_bAI3PQdDNG_VJ@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox