diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-11-15 16:14:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-04-13 17:53:22 -0400 |
commit | b7e5107eebb73d27affed95c20cedbf4784bf17c (patch) | |
tree | ad15c9876450de10ce4d852eafda5f6cbf78b865 /drivers/media/platform/vsp1/vsp1_wpf.c | |
parent | e790c3cb8d904c4bad0d4a37885bece2eb848eeb (diff) |
[media] v4l: vsp1: Store active selection rectangles in a pad config structure
Use the pad config structure part of the vsp1_entity to store all active
pad selection rectangles. This generalizes the code to operate on pad
config structures.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_wpf.c')
-rw-r--r-- | drivers/media/platform/vsp1/vsp1_wpf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index c86d31f274bf..0797927d14cf 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c | |||
@@ -44,7 +44,7 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) | |||
44 | struct vsp1_device *vsp1 = wpf->entity.vsp1; | 44 | struct vsp1_device *vsp1 = wpf->entity.vsp1; |
45 | const struct v4l2_mbus_framefmt *source_format; | 45 | const struct v4l2_mbus_framefmt *source_format; |
46 | const struct v4l2_mbus_framefmt *sink_format; | 46 | const struct v4l2_mbus_framefmt *sink_format; |
47 | const struct v4l2_rect *crop = &wpf->crop; | 47 | const struct v4l2_rect *crop; |
48 | unsigned int i; | 48 | unsigned int i; |
49 | u32 srcrpf = 0; | 49 | u32 srcrpf = 0; |
50 | u32 outfmt = 0; | 50 | u32 outfmt = 0; |
@@ -88,6 +88,8 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) | |||
88 | format->plane_fmt[1].bytesperline); | 88 | format->plane_fmt[1].bytesperline); |
89 | } | 89 | } |
90 | 90 | ||
91 | crop = vsp1_rwpf_get_crop(wpf, wpf->entity.config); | ||
92 | |||
91 | vsp1_wpf_write(wpf, VI6_WPF_HSZCLIP, VI6_WPF_SZCLIP_EN | | 93 | vsp1_wpf_write(wpf, VI6_WPF_HSZCLIP, VI6_WPF_SZCLIP_EN | |
92 | (crop->left << VI6_WPF_SZCLIP_OFST_SHIFT) | | 94 | (crop->left << VI6_WPF_SZCLIP_OFST_SHIFT) | |
93 | (crop->width << VI6_WPF_SZCLIP_SIZE_SHIFT)); | 95 | (crop->width << VI6_WPF_SZCLIP_SIZE_SHIFT)); |