Message ID | 20170314185957.25253-5-niklas.soderlund+renesas@ragnatech.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Niklas, Thank you for the patch. On Tuesday 14 Mar 2017 19:59:45 Niklas Söderlund wrote: > If the subdevice supports dv_timings_cap the driver should not fill in > the standard. A subdev could have analog TV and digital TV inputs. However, as the rcar-vin driver supports a single input only, this patch is correct. I'd mention this fact in the commit message. Apart from that, Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> > --- > drivers/media/platform/rcar-vin/rcar-v4l2.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c > b/drivers/media/platform/rcar-vin/rcar-v4l2.c index > 610f59e2a9142622..7be52c2036bb35fc 100644 > --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c > +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c > @@ -483,10 +483,14 @@ static int rvin_enum_input(struct file *file, void > *priv, return ret; > > i->type = V4L2_INPUT_TYPE_CAMERA; > - i->std = vin->vdev.tvnorms; > > - if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) > + if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) { > i->capabilities = V4L2_IN_CAP_DV_TIMINGS; > + i->std = 0; > + } else { > + i->capabilities = V4L2_IN_CAP_STD; > + i->std = vin->vdev.tvnorms; > + } > > strlcpy(i->name, "Camera", sizeof(i->name));
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index 610f59e2a9142622..7be52c2036bb35fc 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -483,10 +483,14 @@ static int rvin_enum_input(struct file *file, void *priv, return ret; i->type = V4L2_INPUT_TYPE_CAMERA; - i->std = vin->vdev.tvnorms; - if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) + if (v4l2_subdev_has_op(sd, pad, dv_timings_cap)) { i->capabilities = V4L2_IN_CAP_DV_TIMINGS; + i->std = 0; + } else { + i->capabilities = V4L2_IN_CAP_STD; + i->std = vin->vdev.tvnorms; + } strlcpy(i->name, "Camera", sizeof(i->name));
If the subdevice supports dv_timings_cap the driver should not fill in the standard. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)