diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-09-23 22:49:06 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-10-12 10:46:37 +0300 |
commit | 603fbdc1122565dd5bb3fc0b3f574afe5ac49cd9 (patch) | |
tree | 6880a36bcb9a990119a72ba1e8edf7ab051b5843 /drivers/media | |
parent | 1a6ae627af1477e7dbc081c21102bb5d8889adb1 (diff) | |
download | linux-603fbdc1122565dd5bb3fc0b3f574afe5ac49cd9.tar.xz |
media: rkisp1: resizer: Use v4l2_area instead of v4l2_rect to store size
The rkisp1_rsz_config() and rkisp1_rsz_config_regs() functions use a
v4l2_rect to pass frame sizes, leaving the top and left members unused
and uninitialized. Use v4l2_area instead.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c index 26f9c16ccc3e..8700be7d19aa 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-resizer.c @@ -208,8 +208,8 @@ static void rkisp1_rsz_disable(struct rkisp1_resizer *rsz, static void rkisp1_rsz_config_regs(struct rkisp1_resizer *rsz, const struct v4l2_rect *sink_y, const struct v4l2_rect *sink_c, - const struct v4l2_rect *src_y, - const struct v4l2_rect *src_c, + const struct v4l2_area *src_y, + const struct v4l2_area *src_c, enum rkisp1_shadow_regs_when when) { u32 ratio, rsz_ctrl = 0; @@ -272,7 +272,8 @@ static void rkisp1_rsz_config(struct rkisp1_resizer *rsz, const struct rkisp1_rsz_yuv_mbus_info *sink_yuv_info, *src_yuv_info; const struct v4l2_mbus_framefmt *src_fmt, *sink_fmt; const struct v4l2_rect *sink_crop; - struct v4l2_rect sink_y, sink_c, src_y, src_c; + struct v4l2_rect sink_y, sink_c; + struct v4l2_area src_y, src_c; sink_fmt = v4l2_subdev_get_pad_format(&rsz->sd, sd_state, RKISP1_RSZ_PAD_SINK); |