Commit aacbd4ff authored by Niklas Söderlund's avatar Niklas Söderlund Committed by Mauro Carvalho Chehab

media: rcar-vin: Rename wrongly named rectangle

After recent refactoring the rectangle named crop no longer reflects it
usage, to contain the source rectangle. Fix this by renaming it. There
is no functional change.
Signed-off-by: default avatarNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 1edfa9b1
...@@ -181,7 +181,8 @@ static int rvin_reset_format(struct rvin_dev *vin) ...@@ -181,7 +181,8 @@ static int rvin_reset_format(struct rvin_dev *vin)
static int rvin_try_format(struct rvin_dev *vin, u32 which, static int rvin_try_format(struct rvin_dev *vin, u32 which,
struct v4l2_pix_format *pix, struct v4l2_pix_format *pix,
struct v4l2_rect *crop, struct v4l2_rect *compose) struct v4l2_rect *src_rect,
struct v4l2_rect *compose)
{ {
struct v4l2_subdev *sd = vin_to_source(vin); struct v4l2_subdev *sd = vin_to_source(vin);
struct v4l2_subdev_pad_config *pad_cfg; struct v4l2_subdev_pad_config *pad_cfg;
...@@ -214,11 +215,11 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which, ...@@ -214,11 +215,11 @@ static int rvin_try_format(struct rvin_dev *vin, u32 which,
v4l2_fill_pix_format(pix, &format.format); v4l2_fill_pix_format(pix, &format.format);
if (crop) { if (src_rect) {
crop->top = 0; src_rect->top = 0;
crop->left = 0; src_rect->left = 0;
crop->width = pix->width; src_rect->width = pix->width;
crop->height = pix->height; src_rect->height = pix->height;
} }
if (field != V4L2_FIELD_ANY) if (field != V4L2_FIELD_ANY)
...@@ -266,21 +267,21 @@ static int rvin_s_fmt_vid_cap(struct file *file, void *priv, ...@@ -266,21 +267,21 @@ static int rvin_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f) struct v4l2_format *f)
{ {
struct rvin_dev *vin = video_drvdata(file); struct rvin_dev *vin = video_drvdata(file);
struct v4l2_rect crop, compose; struct v4l2_rect src_rect, compose;
int ret; int ret;
if (vb2_is_busy(&vin->queue)) if (vb2_is_busy(&vin->queue))
return -EBUSY; return -EBUSY;
ret = rvin_try_format(vin, V4L2_SUBDEV_FORMAT_ACTIVE, &f->fmt.pix, ret = rvin_try_format(vin, V4L2_SUBDEV_FORMAT_ACTIVE, &f->fmt.pix,
&crop, &compose); &src_rect, &compose);
if (ret) if (ret)
return ret; return ret;
vin->format = f->fmt.pix; vin->format = f->fmt.pix;
v4l2_rect_map_inside(&vin->crop, &crop); v4l2_rect_map_inside(&vin->crop, &src_rect);
v4l2_rect_map_inside(&vin->compose, &compose); v4l2_rect_map_inside(&vin->compose, &compose);
vin->src_rect = crop; vin->src_rect = src_rect;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment