Re: [PATCH/RFC v2 13/15] adv748x: csi2: only allow formats on sink pads

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI Kieran,

Thanks for your comments.

On 2017-12-14 23:16:08 +0000, Kieran Bingham wrote:
> Hi Niklas,
> 
> On 14/12/17 19:08, Niklas Söderlund wrote:
> > The driver is now pad and stream aware, only allow to get/set format on
> > sink pads.
> 
> Ok - I can see the patch is doing this ...
> 
> > Also record a different format for each sink pad since it's
> > no longer true that they are all the same
> 
> But I can't see how the patch is doing this ^ ?
> 
> What have I missed?

I have missed moving this commit message to another patch when moving 
code around :-) Thanks for noticing. Will fix this for next version.

> 
> --
> Kieran
> 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> > ---
> >  drivers/media/i2c/adv748x/adv748x-csi2.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/drivers/media/i2c/adv748x/adv748x-csi2.c b/drivers/media/i2c/adv748x/adv748x-csi2.c
> > index 39f993282dd3bb5c..291b35bef49d41fb 100644
> > --- a/drivers/media/i2c/adv748x/adv748x-csi2.c
> > +++ b/drivers/media/i2c/adv748x/adv748x-csi2.c
> > @@ -176,6 +176,9 @@ static int adv748x_csi2_get_format(struct v4l2_subdev *sd,
> >  	struct adv748x_state *state = tx->state;
> >  	struct v4l2_mbus_framefmt *mbusformat;
> >  
> > +	if (sdformat->pad != ADV748X_CSI2_SINK)
> > +		return -EINVAL;
> > +
> >  	mbusformat = adv748x_csi2_get_pad_format(sd, cfg, sdformat->pad,
> >  						 sdformat->which);
> >  	if (!mbusformat)
> > @@ -199,6 +202,9 @@ static int adv748x_csi2_set_format(struct v4l2_subdev *sd,
> >  	struct v4l2_mbus_framefmt *mbusformat;
> >  	int ret = 0;
> >  
> > +	if (sdformat->pad != ADV748X_CSI2_SINK)
> > +		return -EINVAL;
> > +
> >  	mbusformat = adv748x_csi2_get_pad_format(sd, cfg, sdformat->pad,
> >  						 sdformat->which);
> >  	if (!mbusformat)
> > 

-- 
Regards,
Niklas Söderlund



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux