Message ID | 20200328105606.13660-2-dafna.hirschfeld@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | media: staging: rkisp1: add support for RGB formats | expand |
On 3/28/20 7:56 AM, Dafna Hirschfeld wrote: > Currently the format info of the capture is retrieved by calling > the function v4l2_format_info. This is not needed since it is > already save in the capture object. > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Acked-by: Helen Koike <helen.koike@collabora.com> > --- > drivers/staging/media/rkisp1/rkisp1-resizer.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-resizer.c b/drivers/staging/media/rkisp1/rkisp1-resizer.c > index 87799fbf0363..8704267a066f 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-resizer.c > +++ b/drivers/staging/media/rkisp1/rkisp1-resizer.c > @@ -387,8 +387,7 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz, > if (rsz->fmt_type == RKISP1_FMT_YUV) { > struct rkisp1_capture *cap = > &rsz->rkisp1->capture_devs[rsz->id]; > - const struct v4l2_format_info *pixfmt_info = > - v4l2_format_info(cap->pix.fmt.pixelformat); > + const struct v4l2_format_info *pixfmt_info = cap->pix.info; > > hdiv = pixfmt_info->hdiv; > vdiv = pixfmt_info->vdiv; >
Hi Dafna, Thank you for the patch. On Sat, Mar 28, 2020 at 11:56:04AM +0100, Dafna Hirschfeld wrote: > Currently the format info of the capture is retrieved by calling > the function v4l2_format_info. This is not needed since it is > already save in the capture object. > > Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/staging/media/rkisp1/rkisp1-resizer.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/staging/media/rkisp1/rkisp1-resizer.c b/drivers/staging/media/rkisp1/rkisp1-resizer.c > index 87799fbf0363..8704267a066f 100644 > --- a/drivers/staging/media/rkisp1/rkisp1-resizer.c > +++ b/drivers/staging/media/rkisp1/rkisp1-resizer.c > @@ -387,8 +387,7 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz, > if (rsz->fmt_type == RKISP1_FMT_YUV) { > struct rkisp1_capture *cap = > &rsz->rkisp1->capture_devs[rsz->id]; > - const struct v4l2_format_info *pixfmt_info = > - v4l2_format_info(cap->pix.fmt.pixelformat); > + const struct v4l2_format_info *pixfmt_info = cap->pix.info; > > hdiv = pixfmt_info->hdiv; > vdiv = pixfmt_info->vdiv;
diff --git a/drivers/staging/media/rkisp1/rkisp1-resizer.c b/drivers/staging/media/rkisp1/rkisp1-resizer.c index 87799fbf0363..8704267a066f 100644 --- a/drivers/staging/media/rkisp1/rkisp1-resizer.c +++ b/drivers/staging/media/rkisp1/rkisp1-resizer.c @@ -387,8 +387,7 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz, if (rsz->fmt_type == RKISP1_FMT_YUV) { struct rkisp1_capture *cap = &rsz->rkisp1->capture_devs[rsz->id]; - const struct v4l2_format_info *pixfmt_info = - v4l2_format_info(cap->pix.fmt.pixelformat); + const struct v4l2_format_info *pixfmt_info = cap->pix.info; hdiv = pixfmt_info->hdiv; vdiv = pixfmt_info->vdiv;
Currently the format info of the capture is retrieved by calling the function v4l2_format_info. This is not needed since it is already save in the capture object. Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com> --- drivers/staging/media/rkisp1/rkisp1-resizer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)