diff mbox series

[meta-ti,master,v3] ti-bsp: recipes-multimedia: Add udev rules for VPU and JPEG encoder symlinks

Message ID 20250825192839.596031-1-t-lannynd@ti.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [meta-ti,master,v3] ti-bsp: recipes-multimedia: Add udev rules for VPU and JPEG encoder symlinks | expand

Commit Message

Thorsten Lannynd Aug. 25, 2025, 7:28 p.m. UTC
This patch introduces udev rules to ensure consistent device naming for
VPU decoders, encoders, and the JPEG encoder. These rules are essential
for enabling hardware-accelerated video decoding in Chromium using the
V4L2 Stateful decoder.

The following udev rules are added:
- Map vpu and vpu0 to /dev/video-dec0 and /dev/video-enc0.
- Map vpu1 to /dev/video-dec1 and /dev/video-enc1.
- Map the JPEG encoder to /dev/jpeg-enc0.

These changes ensure proper operation of the VPU and JPEG encoder,
especially when other video devices are connected, avoiding mismatches.

Signed-off-by: Thorsten Lannynd <t-lannynd@ti.com>
Reviewed-by: Andrew Davis <afd@ti.com>
---

v3:
- Changed ti-multimedia-udev.bb to use UNPACKDIR instead of WORKDIR

v2:
- Split patch into seperate master and scarthgap patches
- Added SUMMARY to bitbake recipe

 .../recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb      |  2 ++
 .../ti-img-encode-decode/ti-vxe-vxd-driver_6.12.bb  |  2 ++
 .../ti-multimedia-udev/files/67-multimedia.rules    |  5 +++++
 .../ti-multimedia-udev/ti-multimedia-udev.bb        | 13 +++++++++++++
 4 files changed, 22 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/files/67-multimedia.rules
 create mode 100644 meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/ti-multimedia-udev.bb

Comments

PRC Automation Aug. 25, 2025, 7:35 p.m. UTC | #1
meta-ti / na / 20250825192839.596031-1-t-lannynd

PRC Results: PASS

=========================================================
  check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
All patches passed



=========================================================
  apply-yocto-patch: PASS
=========================================================
master
=====================
Summary:
- Patch Series: [meta-ti][master][PATCH v3] ti-bsp: recipes-multimedia: Add udev rules for VPU and JPEG encoder symlinks
- Submitter: From: Thorsten Lannynd <t-lannynd@ti.com>
- Date: Date: Mon, 25 Aug 2025 14:28:39 -0500
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 61d56ae4c93320af67ae33a4997a4c6b5579a8d6

Applied to:
- Repository: lcpd-prc-meta-ti
- Base Branch: master-next
- Commit Author: LCPD Automation Script <lcpdbld@list.ti.com>
- Commit Subject: CI/CD Auto-Merger: cicd.master.202508250100
- Commit SHA: 7e27eb1dd3a2a3e81b1d951c53619c46a1704176

Patches
----------------------------------------
All patches applied



=========================================================
  check-yocto-repo: PASS
=========================================================
master
=====================
PASS
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb b/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb
index 6a65992f..95bfd01a 100644
--- a/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb
+++ b/meta-ti-bsp/recipes-bsp/cnm-wave-fw/cnm-wave-fw_git.bb
@@ -27,3 +27,5 @@  do_install() {
 	install -d ${D}${nonarch_base_libdir}/firmware/cnm
 	install -m 0644 ${S}/cnm/${SOURCE_WAVE521C} ${D}${nonarch_base_libdir}/firmware/cnm/${TARGET_WAVE521C}
 }
+
+RDEPENDS:${PN} += "ti-multimedia-udev"
diff --git a/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/ti-vxe-vxd-driver_6.12.bb b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/ti-vxe-vxd-driver_6.12.bb
index f73f59fa..cdcf4af0 100644
--- a/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/ti-vxe-vxd-driver_6.12.bb
+++ b/meta-ti-bsp/recipes-bsp/ti-img-encode-decode/ti-vxe-vxd-driver_6.12.bb
@@ -19,3 +19,5 @@  SRCREV = "0bcbb20af32ea13275b452f0e84f5a49966d0bf6"
 TARGET_PRODUCT:j721e = "j721e_linux"
 
 EXTRA_OEMAKE += 'KERNEL_DIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'
+
+RDEPENDS:${PN} += "ti-multimedia-udev"
diff --git a/meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/files/67-multimedia.rules b/meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/files/67-multimedia.rules
new file mode 100644
index 00000000..5239d1ef
--- /dev/null
+++ b/meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/files/67-multimedia.rules
@@ -0,0 +1,5 @@ 
+SUBSYSTEM=="video4linux", DEVPATH=="/devices/*/*210000.video-codec/video4linux/video*", ATTR{name}=="C&M Wave5 VPU decoder", SYMLINK+="video-dec0"
+SUBSYSTEM=="video4linux", DEVPATH=="/devices/*/*210000.video-codec/video4linux/video*", ATTR{name}=="C&M Wave5 VPU encoder", SYMLINK+="video-enc0"
+SUBSYSTEM=="video4linux", DEVPATH=="/devices/*/4220000.video-codec/video4linux/video*", ATTR{name}=="C&M Wave5 VPU decoder", SYMLINK+="video-dec1"
+SUBSYSTEM=="video4linux", DEVPATH=="/devices/*/4220000.video-codec/video4linux/video*", ATTR{name}=="C&M Wave5 VPU encoder", SYMLINK+="video-enc1"
+SUBSYSTEM=="video4linux", DEVPATH=="/devices/*/fd20000.jpeg-encoder/video4linux/video*", ATTR{name}=="e5010", SYMLINK+="jpeg-enc0"
diff --git a/meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/ti-multimedia-udev.bb b/meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/ti-multimedia-udev.bb
new file mode 100644
index 00000000..457b3a55
--- /dev/null
+++ b/meta-ti-bsp/recipes-multimedia/ti-multimedia-udev/ti-multimedia-udev.bb
@@ -0,0 +1,13 @@ 
+SUMMARY = "Udev rules for device naming of VPU devices and JPEG encoder"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+SRC_URI += "file://67-multimedia.rules"
+
+S = "${UNPACKDIR}"
+
+do_install() {
+    install -d ${D}${sysconfdir}/udev/rules.d
+    install -m 0644 ${UNPACKDIR}/67-multimedia.rules ${D}${sysconfdir}/udev/rules.d/
+}