aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2020-02-29 09:25:20 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2020-02-29 12:50:51 +0100
commita1383655cfaa71609d6236ae0fcf3b6047462b98 (patch)
treec6f123859e0dfcfaa6c1063eda26f27e208d3cac /target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch
parenta8aa974a9dfb4cba484dc4c1e4207fd9ec803410 (diff)
downloadupstream-a1383655cfaa71609d6236ae0fcf3b6047462b98.tar.gz
upstream-a1383655cfaa71609d6236ae0fcf3b6047462b98.tar.bz2
upstream-a1383655cfaa71609d6236ae0fcf3b6047462b98.zip
bcm27xx: add linux 5.4 support
Tested on bcm2710 (Raspberry Pi 3B). Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch b/target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch
new file mode 100644
index 0000000000..e1539f4a71
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.4/950-0315-staging-bcm2835-codec-Add-role-to-device-name.patch
@@ -0,0 +1,45 @@
+From 434803a4828aed99d5328dd41b4600ef7b0be0ff 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] 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);
+