summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2026-05-11 13:30:06 -0300
committerGitHub <noreply@github.com>2026-05-11 13:30:06 -0300
commit3949624f36cbc5b7fd4033ce5ef001d83fc1a3e9 (patch)
treee021326b94cef2dfe25cf6b66d77c71fa17affad
parented4082f49c04306bed3e35714f903da92325a8df (diff)
parentbd90d58fe926b335e3f8c08c0387573d8369f17e (diff)
downloadmeta-freescale-master.tar.gz
Merge pull request #2520 from ernestvh/fix-isp-vvcamHEADmaster
Fix ParseError in linux-fslc-imx and fix kernel-module-isp-vvcam builds for pre 6.18 kernels
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-video-add-v4l2-fh-compat-for-pre-6.18-kernels.patch88
-rw-r--r--recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.26.1.bb4
-rw-r--r--recipes-kernel/linux/linux-fslc-imx_6.18.bb14
3 files changed, 98 insertions, 8 deletions
diff --git a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-video-add-v4l2-fh-compat-for-pre-6.18-kernels.patch b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-video-add-v4l2-fh-compat-for-pre-6.18-kernels.patch
new file mode 100644
index 000000000..4a784eee2
--- /dev/null
+++ b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-video-add-v4l2-fh-compat-for-pre-6.18-kernels.patch
@@ -0,0 +1,88 @@
1From 35d5a732cc4b53897a0e6188fae5e9c8fd1b97a1 Mon Sep 17 00:00:00 2001
2From: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
3Date: Mon, 11 May 2026 16:00:30 +0000
4Subject: [PATCH] video: add v4l2_fh compat for pre-6.18 kernels
5
6Linux v6.18 added file_to_v4l2_fh() and changed v4l2_fh_add() and
7v4l2_fh_del() to take the file pointer so the helpers can manage
8file->private_data internally.
9
10The relevant upstream commits are:
11 618882c92681 ("media: Wrap file->private_data access with a helper function")
12 47f4b1acb4d5 ("media: Set file->private_data in v4l2_fh_add()")
13 277966749f46 ("media: Reset file->private_data to NULL in v4l2_fh_del()")
14
15Add a small compatibility layer for older kernels that keeps
16file->private_data management in this driver.
17
18Upstream-Status: Inappropriate
19Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
20---
21 video/video.c | 30 +++++++++++++++++++++++++++---
22 1 file changed, 27 insertions(+), 3 deletions(-)
23
24diff --git a/video/video.c b/video/video.c
25index bccf466b05f5..ce8c7d725150 100644
26--- a/video/video.c
27+++ b/video/video.c
28@@ -69,6 +69,30 @@
29 #include "vvdefs.h"
30 #include "vvsensor.h"
31
32+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 18, 0)
33+static inline struct v4l2_fh *viv_file_to_v4l2_fh(struct file *file)
34+{
35+ return file->private_data;
36+}
37+
38+static inline void viv_v4l2_fh_add(struct v4l2_fh *fh, struct file *file)
39+{
40+ file->private_data = fh;
41+ v4l2_fh_add(fh);
42+}
43+
44+static inline void viv_v4l2_fh_del(struct v4l2_fh *fh, struct file *file)
45+{
46+ v4l2_fh_del(fh);
47+ file->private_data = NULL;
48+}
49+
50+#define file_to_v4l2_fh(file) viv_file_to_v4l2_fh(file)
51+#else
52+#define viv_v4l2_fh_add(fh, file) v4l2_fh_add(fh, file)
53+#define viv_v4l2_fh_del(fh, file) v4l2_fh_del(fh, file)
54+#endif
55+
56 #define DEF_PLANE_NO (0)
57
58 static struct viv_video_device *vvdev[VIDEO_NODE_NUM];
59@@ -573,7 +597,7 @@ static int video_open(struct file *file)
60 handle = kzalloc(sizeof(*handle), GFP_KERNEL);
61
62 v4l2_fh_init(&handle->vfh, dev->video);
63- v4l2_fh_add(&handle->vfh, file);
64+ viv_v4l2_fh_add(&handle->vfh, file);
65
66 handle->vdev = dev;
67 handle->queue.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
68@@ -589,7 +613,7 @@ static int video_open(struct file *file)
69 rc = vb2_queue_init(&handle->queue);
70 if (rc) {
71 pr_err("can't init vb queue\n");
72- v4l2_fh_del(&handle->vfh, file);
73+ viv_v4l2_fh_del(&handle->vfh, file);
74 v4l2_fh_exit(&handle->vfh);
75 kfree(handle);
76 return rc;
77@@ -654,7 +678,7 @@ static int video_close(struct file *file)
78 vb2_buffer_done(vb, VB2_BUF_STATE_ERROR);
79 }
80
81- v4l2_fh_del(&handle->vfh, file);
82+ viv_v4l2_fh_del(&handle->vfh, file);
83 v4l2_fh_exit(&handle->vfh);
84
85 {
86--
872.43.0
88
diff --git a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.26.1.bb b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.26.1.bb
index b4f5cdf95..dfe55bc80 100644
--- a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.26.1.bb
+++ b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.26.1.bb
@@ -4,7 +4,9 @@ DESCRIPTION = "Kernel loadable module for ISP"
4LICENSE = "GPL-2.0-only" 4LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://${S}/../LICENSE;md5=64381a6ea83b48c39fe524c85f65fb44" 5LIC_FILES_CHKSUM = "file://${S}/../LICENSE;md5=64381a6ea83b48c39fe524c85f65fb44"
6 6
7SRC_URI = "${ISP_KERNEL_SRC};branch=${SRCBRANCH}" 7SRC_URI = "${ISP_KERNEL_SRC};branch=${SRCBRANCH} \
8 file://0001-video-add-v4l2-fh-compat-for-pre-6.18-kernels.patch \
9"
8ISP_KERNEL_SRC ?= "git://github.com/nxp-imx/isp-vvcam.git;protocol=https" 10ISP_KERNEL_SRC ?= "git://github.com/nxp-imx/isp-vvcam.git;protocol=https"
9SRCBRANCH = "lf-6.18.y_1.0.0" 11SRCBRANCH = "lf-6.18.y_1.0.0"
10SRCREV = "5484bc99a258562c3893808736dd67af22ac355e" 12SRCREV = "5484bc99a258562c3893808736dd67af22ac355e"
diff --git a/recipes-kernel/linux/linux-fslc-imx_6.18.bb b/recipes-kernel/linux/linux-fslc-imx_6.18.bb
index f556f6882..229ec1dcb 100644
--- a/recipes-kernel/linux/linux-fslc-imx_6.18.bb
+++ b/recipes-kernel/linux/linux-fslc-imx_6.18.bb
@@ -43,13 +43,13 @@ Latest stable Kernel patchlevel is applied and maintained by Community."
43# Additional commits may exist to better acommodate yocto builds. 43# Additional commits may exist to better acommodate yocto builds.
44# 44#
45# $ git log --oneline --no-merges v6.18.24.. ^mainline/linux-6.18.y ^NXP/lf-6.18.y 45# $ git log --oneline --no-merges v6.18.24.. ^mainline/linux-6.18.y ^NXP/lf-6.18.y
46$ 6e811374f6340 drm/imx: lcdifv3: Fix videomode settings 46# - 6e811374f6340 drm/imx: lcdifv3: Fix videomode settings
47$ 40b594773feaf drm: of: Fix build without CONFIG_OF 47# - 40b594773feaf drm: of: Fix build without CONFIG_OF
48$ 40d5cc16c304a arm64: dts: imx8mm-evk-qca-wifi: enable support for bluetooth 48# - 40d5cc16c304a arm64: dts: imx8mm-evk-qca-wifi: enable support for bluetooth
49$ eff109d884f3b gpu: drm: cadence: select hdmi helper 49# - eff109d884f3b gpu: drm: cadence: select hdmi helper
50$ ddfe8741dab43 of: enable using OF_DYNAMIC without OF_UNITTEST 50# - ddfe8741dab43 of: enable using OF_DYNAMIC without OF_UNITTEST
51$ 1b982f1a29bbc arm64: dts: imx8mq: drop cpu-idle-states 51# - 1b982f1a29bbc arm64: dts: imx8mq: drop cpu-idle-states
52$ de4b96e987407 hwrng: optee: support generic crypto 52# - de4b96e987407 hwrng: optee: support generic crypto
53 53
54# 54#
55# NOTE to upgraders: 55# NOTE to upgraders: