1 From ba936c1969753c11ed4f903d007f7e6a9e2d8abb Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Tue, 2 Feb 2021 16:46:39 +0000
4 Subject: [PATCH] staging/bcm2835-codec: Implement additional
5 g_selection calls for decode
7 v4l_cropcap calls our vidioc_g_pixelaspect function to get the pixel
8 aspect ratio, but also calls g_selection for V4L2_SEL_TGT_CROP_BOUNDS
9 and V4L2_SEL_TGT_CROP_DEFAULT. Whilst it allows for vidioc_g_pixelaspect
10 not to be implemented, it doesn't allow for either of the other two.
12 Add in support for the additional selection targets.
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
16 .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 8 ++++++++
17 1 file changed, 8 insertions(+)
19 --- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
20 +++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c
21 @@ -1517,6 +1517,14 @@ static int vidioc_g_selection(struct fil
22 s->r.width = q_data->crop_width;
23 s->r.height = q_data->crop_height;
25 + case V4L2_SEL_TGT_CROP_BOUNDS:
26 + case V4L2_SEL_TGT_CROP_DEFAULT:
29 + s->r.width = (q_data->bytesperline << 3) /
31 + s->r.height = q_data->height;