1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-18 05:03:56 +02:00
openwrt/target/linux/bcm27xx/patches-5.10/950-0503-staging-bcm2835-codec-Implement-additional-g_selecti.patch
Álvaro Fernández Rojas 8299d1f057 bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted
patches, wireless patches and defconfig patches.

bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 4B v1.1 4G
bcm2711: boot tested on RPi 4B v1.1 4G

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2021-08-21 19:07:07 +02:00

36 lines
1.3 KiB
Diff

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