[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<ZQ0PR01MB13024823EE94D8A5705FC728F2A42@ZQ0PR01MB1302.CHNPR01.prod.partner.outlook.cn>
Date: Wed, 10 Jul 2024 13:04:27 +0000
From: Changhuang Liang <changhuang.liang@...rfivetech.com>
To: Jacopo Mondi <jacopo.mondi@...asonboard.com>
CC: Mauro Carvalho Chehab <mchehab@...nel.org>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Sakari Ailus <sakari.ailus@...ux.intel.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>, Laurent Pinchart
<laurent.pinchart@...asonboard.com>, Jean-Michel Hautbois
<jeanmichel.hautbois@...asonboard.com>, Benjamin Gaignard
<benjamin.gaignard@...labora.com>, Tomi Valkeinen
<tomi.valkeinen+renesas@...asonboard.com>, Mingjia Zhang
<mingjia.zhang@...iatek.com>, Jack Zhu <jack.zhu@...rfivetech.com>, Keith
Zhao <keith.zhao@...rfivetech.com>, "linux-media@...r.kernel.org"
<linux-media@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-staging@...ts.linux.dev"
<linux-staging@...ts.linux.dev>
Subject:
回复: [PATCH v5 04/14] staging: media: starfive: Add a params sink pad and a scd source pad for ISP
Hi, Jacopo
Thanks for your comments.
[...]
> > @@ -151,6 +171,9 @@ static int isp_set_format(struct v4l2_subdev *sd,
> > isp_try_format(isp_dev, state, fmt->pad, &fmt->format);
> > *format = fmt->format;
> >
> > + if (fmt->pad == STF_ISP_PAD_SRC_SCD || fmt->pad ==
> > +STF_ISP_PAD_SINK_PARAMS)
>
> nit: can easily be made < 80 cols (again, not mandatory in Linux but enforced
> in v4l according to
> Documentation/driver-api/media/maintainer-entry-profile.rst)
>
I will add --max-line-length=80 to check patchs again.
> > + return 0;
> > +
> > isp_dev->current_fmt =
> stf_g_fmt_by_mcode(&isp_dev->formats[fmt->pad],
> > fmt->format.code);
> >
> > @@ -202,6 +225,9 @@ static int isp_get_selection(struct v4l2_subdev *sd,
> > struct v4l2_subdev_format fmt = { 0 };
> > struct v4l2_rect *rect;
> >
> > + if (sel->pad == STF_ISP_PAD_SRC_SCD || sel->pad ==
> STF_ISP_PAD_SINK_PARAMS)
> > + return -EINVAL;
> > +
> > switch (sel->target) {
> > case V4L2_SEL_TGT_CROP_BOUNDS:
> > if (sel->pad == STF_ISP_PAD_SINK) { @@ -239,6 +265,9 @@ static
> int
> > isp_set_selection(struct v4l2_subdev *sd,
> > struct stf_isp_dev *isp_dev = v4l2_get_subdevdata(sd);
> > struct v4l2_rect *rect;
> >
> > + if (sel->pad == STF_ISP_PAD_SRC_SCD || sel->pad ==
> STF_ISP_PAD_SINK_PARAMS)
> > + return -EINVAL;
> > +
> > if (sel->target != V4L2_SEL_TGT_CROP)
> > return -EINVAL;
> >
> > @@ -296,8 +325,38 @@ static int isp_init_formats(struct v4l2_subdev *sd,
> > .height = 1080
> > }
> > };
> > + struct v4l2_subdev_format format_params = {
> > + .pad = STF_ISP_PAD_SINK_PARAMS,
> > + .which = V4L2_SUBDEV_FORMAT_ACTIVE,
> > + .format = {
> > + .code = MEDIA_BUS_FMT_METADATA_FIXED,
> > + .width = 1,
> > + .height = 1
> > + }
> > + };
> > + struct v4l2_subdev_format format_scd = {
> > + .pad = STF_ISP_PAD_SRC_SCD,
> > + .which = V4L2_SUBDEV_FORMAT_ACTIVE,
> > + .format = {
> > + .code = MEDIA_BUS_FMT_METADATA_FIXED,
> > + .width = 1,
> > + .height = 1
> > + }
> > + };
> > + int ret;
> > +
> > + /* Init for STF_ISP_PAD_SINK and STF_ISP_PAD_SRC pad */
>
> Does this initialize the format on STF_ISP_PAD_SRC for real ?
>
Yes, it will initialize the PAD_SINK and PAND_SRC formats by isp_set_selection.
> Anyway, was there already so
> Reviewed-by: Jacopo Mondi <jacopo.mondi@...asonboard.com>
>
> Thanks
> j
>
Powered by blists - more mailing lists