diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-09-19 16:43:19 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-09-19 17:38:18 +0200 |
commit | 4f8b350be0b90554c93908458a27be34e8b722ca (patch) | |
tree | 8b39d985a590db8cc4eb275d68496cfa212d5ede /target/linux/brcm2708/patches-4.19/950-0784-staging-bcm2835-codec-Add-role-to-device-name.patch | |
parent | b400179ca66647944a26f4d4b7b4fd53a3d2f0d1 (diff) | |
download | upstream-4f8b350be0b90554c93908458a27be34e8b722ca.tar.gz upstream-4f8b350be0b90554c93908458a27be34e8b722ca.tar.bz2 upstream-4f8b350be0b90554c93908458a27be34e8b722ca.zip |
brcm2708: update to latest patches from RPi foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0784-staging-bcm2835-codec-Add-role-to-device-name.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0784-staging-bcm2835-codec-Add-role-to-device-name.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0784-staging-bcm2835-codec-Add-role-to-device-name.patch b/target/linux/brcm2708/patches-4.19/950-0784-staging-bcm2835-codec-Add-role-to-device-name.patch new file mode 100644 index 0000000000..de7263ba64 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0784-staging-bcm2835-codec-Add-role-to-device-name.patch @@ -0,0 +1,45 @@ +From ca613ed735fc52e68189d2ad0880f1007b931d78 Mon Sep 17 00:00:00 2001 +From: Kieran Bingham <kieran.bingham@ideasonboard.com> +Date: Wed, 20 Mar 2019 11:55:43 +0000 +Subject: [PATCH 784/806] staging: bcm2835-codec: Add role to device name + +Three entities are created, Decode, Encode and ISP but all of the video +nodes use the same video name string "bcm2835-codec" which makes it +difficult to identify each role. + +Append the role-name to the video name to facilitate identifying a +specific instance from userspace. + +The Card-Type is also extended with the role name to support identifying +the device context from within QUERY_CAP operations. + +Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> +--- + .../vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +--- a/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c ++++ b/drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c +@@ -947,8 +947,10 @@ static void device_run(void *priv) + static int vidioc_querycap(struct file *file, void *priv, + struct v4l2_capability *cap) + { ++ struct bcm2835_codec_dev *dev = video_drvdata(file); ++ + strncpy(cap->driver, MEM2MEM_NAME, sizeof(cap->driver) - 1); +- strncpy(cap->card, MEM2MEM_NAME, sizeof(cap->card) - 1); ++ strncpy(cap->card, dev->vfd.name, sizeof(cap->card) - 1); + snprintf(cap->bus_info, sizeof(cap->bus_info), "platform:%s", + MEM2MEM_NAME); + return 0; +@@ -2657,8 +2659,8 @@ static int bcm2835_codec_create(struct p + } + + video_set_drvdata(vfd, dev); +- snprintf(vfd->name, sizeof(vfd->name), "%s", +- bcm2835_codec_videodev.name); ++ snprintf(vfd->name, sizeof(vfd->name), "%s-%s", ++ bcm2835_codec_videodev.name, roles[role]); + v4l2_info(&dev->v4l2_dev, "Device registered as /dev/video%d\n", + vfd->num); + |