commit 52fdc49caa38c9c4d63642ef134f1f863ab9f758
Author: Hans de Goede <hdegoede(a)redhat.com>
Date: Thu Jun 27 18:25:51 2024 +0200
Updated ipu6-driver to commit aecec2aaef069fea56aa921cf5d7e449bb7a0b82
Adjust which modules are build to not conflict with upstreamed ivsc,
ov01a10, ov2740 and hi556 drivers
Fix building against 6.10 kernels
.gitignore | 2 +
0001-Skip-ljca-modules-for-the-kernel-6.7.patch | 53 --
0001-gc5035-Fix-compilation-with-kernels-6.8.patch | 96 +++
...ia-ipu6-Fix-compilation-with-kernels-6.10.patch | 68 ++
...efix-ipu6-modules-with-icamera-instead-of.patch | 84 +++
...just-which-modules-to-build-for-which-ker.patch | 773 +++++++++++++++++++++
1.patch | 107 ---
2.patch | 84 ---
3.patch | 22 -
4.patch | 56 --
5.patch | 117 ----
6.patch | 692 ------------------
intel-ipu6-kmod.rpmlintrc | 4 +
intel-ipu6-kmod.spec | 71 +-
sources | 2 +-
15 files changed, 1060 insertions(+), 1171 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index a5e3def..b3fe129 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,5 @@
/ipu6-drivers-fb4c170.tar.gz
/ivsc-driver-73a044d.tar.gz
/ivsc-driver-a6dccbb.tar.gz
+/ipu6-drivers-404740a.tar.gz
+/ipu6-drivers-aecec2a.tar.gz
diff --git a/0001-gc5035-Fix-compilation-with-kernels-6.8.patch
b/0001-gc5035-Fix-compilation-with-kernels-6.8.patch
new file mode 100644
index 0000000..64d7cd1
--- /dev/null
+++ b/0001-gc5035-Fix-compilation-with-kernels-6.8.patch
@@ -0,0 +1,96 @@
+From 1e0c448f48540e08f621b324627feca927eb75fe Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Mon, 10 Jun 2024 13:41:16 +0200
+Subject: [PATCH 1/4] gc5035: Fix compilation with kernels >= 6.8
+
+For some reason the gc5035 driver has been disabled for kernels >= 6.8,
+but it is not upstream yet.
+
+Fix compilation with kernel >= 6.8 and re-enable the driver.
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ Makefile | 2 +-
+ drivers/media/i2c/gc5035.c | 19 +++++++++++++++++++
+ 2 files changed, 20 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 6286beade..4734c4497 100644
+--- a/Makefile
++++ b/Makefile
+@@ -83,10 +83,10 @@ export CONFIG_VIDEO_OV02E10 = m
+ export CONFIG_VIDEO_HM2170 = m
+ export CONFIG_VIDEO_HM2172 = m
+ export CONFIG_VIDEO_HI556 = m
++export CONFIG_VIDEO_GC5035 = m
+
+ ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_OV2740)),true)
+ export CONFIG_VIDEO_OV2740 = m
+-export CONFIG_VIDEO_GC5035 = m
+ endif
+ obj-y += drivers/media/i2c/
+
+diff --git a/drivers/media/i2c/gc5035.c b/drivers/media/i2c/gc5035.c
+index 16bbd4845..e825dfa7d 100644
+--- a/drivers/media/i2c/gc5035.c
++++ b/drivers/media/i2c/gc5035.c
+@@ -1497,7 +1497,11 @@ static int gc5035_set_fmt(struct v4l2_subdev *sd,
+
+ mutex_lock(&gc5035->mutex);
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad) = fmt->format;
++#else
++ *v4l2_subdev_state_get_format(sd_state, fmt->pad) = fmt->format;
++#endif
+ } else {
+ gc5035->cur_mode = mode;
+ h_blank = mode->hts_def - mode->width;
+@@ -1522,7 +1526,11 @@ static int gc5035_get_fmt(struct v4l2_subdev *sd,
+
+ mutex_lock(&gc5035->mutex);
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
++#endif
+ } else {
+ fmt->format.width = mode->width;
+ fmt->format.height = mode->height;
+@@ -1714,7 +1722,9 @@ static const struct v4l2_subdev_video_ops gc5035_video_ops = {
+ };
+
+ static const struct v4l2_subdev_pad_ops gc5035_pad_ops = {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ .init_cfg = gc5035_entity_init_cfg,
++#endif
+ .enum_mbus_code = gc5035_enum_mbus_code,
+ .enum_frame_size = gc5035_enum_frame_sizes,
+ .get_fmt = gc5035_get_fmt,
+@@ -1730,6 +1740,12 @@ static const struct media_entity_operations
gc5035_subdev_entity_ops = {
+ .link_validate = v4l2_subdev_link_validate,
+ };
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
++static const struct v4l2_subdev_internal_ops gc5035_internal_ops = {
++ .init_state = gc5035_entity_init_cfg,
++};
++#endif
++
+ static int gc5035_set_exposure(struct gc5035 *gc5035, u32 val)
+ {
+ u32 caltime = 0;
+@@ -2091,6 +2107,9 @@ static int gc5035_probe(struct i2c_client *client)
+ mutex_init(&gc5035->mutex);
+ sd = &gc5035->subdev;
+ v4l2_i2c_subdev_init(sd, client, &gc5035_subdev_ops);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
++ sd->internal_ops = &gc5035_internal_ops;
++#endif
+ ret = gc5035_initialize_controls(gc5035);
+ if (ret) {
+ dev_err_probe(dev, ret, "Failed to initialize controls\n");
+--
+2.45.1
+
diff --git a/0002-media-ipu6-Fix-compilation-with-kernels-6.10.patch
b/0002-media-ipu6-Fix-compilation-with-kernels-6.10.patch
new file mode 100644
index 0000000..b5dc032
--- /dev/null
+++ b/0002-media-ipu6-Fix-compilation-with-kernels-6.10.patch
@@ -0,0 +1,68 @@
+From d28c18461df553e523e341ca24ca835767f39db8 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 11 Jun 2024 11:39:34 +0200
+Subject: [PATCH 2/4] media: ipu6: Fix compilation with kernels >= 6.10
+
+Fix compilation with kernels >= 6.10.
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/pci/intel/ipu-mmu.c | 1 +
+ drivers/media/pci/intel/ipu-psys.c | 16 ++++++++++++++++
+ drivers/media/pci/intel/ipu.c | 1 +
+ 3 files changed, 18 insertions(+)
+
+diff --git a/drivers/media/pci/intel/ipu-mmu.c b/drivers/media/pci/intel/ipu-mmu.c
+index a36a6ded8..b06c9f8c1 100644
+--- a/drivers/media/pci/intel/ipu-mmu.c
++++ b/drivers/media/pci/intel/ipu-mmu.c
+@@ -7,6 +7,7 @@
+ #include <linux/iova.h>
+ #include <linux/module.h>
+ #include <linux/sizes.h>
++#include <linux/vmalloc.h>
+
+ #include "ipu.h"
+ #include "ipu-platform.h"
+diff --git a/drivers/media/pci/intel/ipu-psys.c b/drivers/media/pci/intel/ipu-psys.c
+index b12ecf3fc..b93e47aaf 100644
+--- a/drivers/media/pci/intel/ipu-psys.c
++++ b/drivers/media/pci/intel/ipu-psys.c
+@@ -128,6 +128,22 @@ ipu_psys_lookup_kbuffer_by_kaddr(struct ipu_psys_fh *fh, void
*kaddr)
+ return NULL;
+ }
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0)
++/* Dropped from 6.10, use our own copy for now */
++static int follow_pfn(struct vm_area_struct *vma, unsigned long address, unsigned long
*pfn)
++{
++ spinlock_t *ptl;
++ pte_t *ptep;
++
++ if (follow_pte(vma, address, &ptep, &ptl))
++ return -EINVAL;
++
++ *pfn = pte_pfn(ptep_get(ptep));
++ pte_unmap_unlock(ptep, ptl);
++ return 0;
++}
++#endif
++
+ static int ipu_psys_get_userpages(struct ipu_dma_buf_attach *attach)
+ {
+ struct vm_area_struct *vma;
+diff --git a/drivers/media/pci/intel/ipu.c b/drivers/media/pci/intel/ipu.c
+index 33592a662..fc091a11a 100644
+--- a/drivers/media/pci/intel/ipu.c
++++ b/drivers/media/pci/intel/ipu.c
+@@ -15,6 +15,7 @@
+ #include <linux/timer.h>
+ #include <linux/sched.h>
+ #include <linux/version.h>
++#include <linux/vmalloc.h>
+
+ #include "ipu.h"
+ #include "ipu-buttress.h"
+--
+2.45.1
+
diff --git a/0003-Makefile-prefix-ipu6-modules-with-icamera-instead-of.patch
b/0003-Makefile-prefix-ipu6-modules-with-icamera-instead-of.patch
new file mode 100644
index 0000000..b678afc
--- /dev/null
+++ b/0003-Makefile-prefix-ipu6-modules-with-icamera-instead-of.patch
@@ -0,0 +1,84 @@
+From 2ea9ccd5fc964251da4c4c47abd7321ce868e478 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Mon, 10 Jun 2024 19:30:48 +0200
+Subject: [PATCH 3/4] Makefile: prefix ipu6 modules with icamera- instead of
+ intel-
+
+Now that IPU6 isys support has landed upstream, using an auxbus approach
+rather then the custom ipu6-bus, there is a conflict between the mainline
+intel-ipu6* kernel modules and the out of tree ipu6-drivers intel-ipu6*
+kernel modules.
+
+Rename the out of tree ipu6 modules to icamera-ipu6* so that both can be
+installed together and the user can easily switch by blacklisting one of
+the 2 sets of modules.
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/pci/intel/ipu6/Makefile | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/drivers/media/pci/intel/ipu6/Makefile
b/drivers/media/pci/intel/ipu6/Makefile
+index 23f8cdba4..92cd9fe1b 100644
+--- a/drivers/media/pci/intel/ipu6/Makefile
++++ b/drivers/media/pci/intel/ipu6/Makefile
+@@ -8,7 +8,7 @@ endif
+ ccflags-y += -DIPU_TPG_FRAME_SYNC -DIPU_PSYS_GPC \
+ -DIPU_ISYS_GPC
+
+-intel-ipu6-objs += ../ipu.o \
++icamera-ipu6-objs += ../ipu.o \
+ ../ipu-bus.o \
+ ../ipu-dma.o \
+ ../ipu-mmu.o \
+@@ -18,12 +18,12 @@ intel-ipu6-objs += ../ipu.o \
+ ipu6.o \
+ ../ipu-fw-com.o
+ ifdef CONFIG_IPU_ISYS_BRIDGE
+-intel-ipu6-objs += ../cio2-bridge.o
++icamera-ipu6-objs += ../cio2-bridge.o
+ endif
+
+-obj-$(CONFIG_VIDEO_INTEL_IPU6) += intel-ipu6.o
++obj-$(CONFIG_VIDEO_INTEL_IPU6) += icamera-ipu6.o
+
+-intel-ipu6-isys-objs += ../ipu-isys.o \
++icamera-ipu6-isys-objs += ../ipu-isys.o \
+ ../ipu-isys-csi2.o \
+ ipu6-isys.o \
+ ipu6-isys-phy.o \
+@@ -36,26 +36,26 @@ intel-ipu6-isys-objs += ../ipu-isys.o \
+ ../ipu-isys-queue.o \
+ ../ipu-isys-subdev.o
+
+-obj-$(CONFIG_VIDEO_INTEL_IPU6) += intel-ipu6-isys.o
++obj-$(CONFIG_VIDEO_INTEL_IPU6) += icamera-ipu6-isys.o
+
+-intel-ipu6-psys-objs += ../ipu-psys.o \
++icamera-ipu6-psys-objs += ../ipu-psys.o \
+ ipu6-psys.o \
+ ipu-resources.o \
+ ipu6-psys-gpc.o \
+ ipu6-l-scheduler.o \
+ ipu6-ppg.o
+
+-intel-ipu6-psys-objs += ipu-fw-resources.o \
++icamera-ipu6-psys-objs += ipu-fw-resources.o \
+ ipu6-fw-resources.o \
+ ipu6se-fw-resources.o \
+ ipu6ep-fw-resources.o \
+ ../ipu-fw-psys.o
+
+ ifeq ($(CONFIG_COMPAT),y)
+-intel-ipu6-psys-objs += ../ipu-psys-compat32.o
++icamera-ipu6-psys-objs += ../ipu-psys-compat32.o
+ endif
+
+-obj-$(CONFIG_VIDEO_INTEL_IPU6) += intel-ipu6-psys.o
++obj-$(CONFIG_VIDEO_INTEL_IPU6) += icamera-ipu6-psys.o
+
+ ccflags-y += -I$(srcpath)/$(src)/../../../../../include/
+ ccflags-y += -I$(srcpath)/$(src)/../
+--
+2.45.1
+
diff --git a/0101-Makefile-Adjust-which-modules-to-build-for-which-ker.patch
b/0101-Makefile-Adjust-which-modules-to-build-for-which-ker.patch
new file mode 100644
index 0000000..69bceb0
--- /dev/null
+++ b/0101-Makefile-Adjust-which-modules-to-build-for-which-ker.patch
@@ -0,0 +1,773 @@
+From 2c4ad1398dddfb307e8a40a714a6d5f70d6d14cb Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Mon, 10 Jun 2024 13:05:53 +0200
+Subject: [PATCH 4/4] Makefile: Adjust which modules to build for which
+ kernel-versions for Fedora
+
+Fedora's kernels have not enabled various IPU6 related drivers as soon
+as they were mainlined. Instead they were enabled at later times.
+
+Fix the automatic disabling of certain modules to match when they were
+enabled in the Fedora kernels:
+
+Do not build ljca for kernels >= 6.7
+Do not build ivsc for kernels >= 6.10
+Do not build ov2740 for kernels >= 6.10 (1)
+Do not build ov01a10 for kernels >= 6.10
+Do not build hi556 for kernels >= 6.10 (2)
+Do not build cio2-bridge for kernels >= 6.10 (3)
+
+1) Also switch the Kconfig symbols for mainlined sensor drivers from
+CONFIG_VIDEO_FOO to CONFIG_ICAMERA_FOO to avoid these still being
+set when they should not because of the CONFIG_VIDEO_FOO symbols
+inherited from the base kernel.
+
+2) hi556 was enabled in earlier Fedora patches but the mainline version
+missed reset GPIO / clk / regulator support
+
+3) The mainline ipu6-bridge is only used for kernels >= 6.10 because it
+lacked ACPI HIDs for many of the still out of tree sensor drivers, see:
+https://lore.kernel.org/linux-media/20240610173418.16119-1-hdegoede@redhat.com/
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ Makefile | 20 ++++++++++++--------
+ drivers/media/i2c/Makefile | 7 ++++---
+ drivers/media/i2c/hi556.c | 20 ++++++++++----------
+ drivers/media/i2c/hm2170.c | 20 ++++++++++----------
+ drivers/media/i2c/hm2172.c | 20 ++++++++++----------
+ drivers/media/i2c/ov01a10.c | 18 +++++++++---------
+ drivers/media/i2c/ov01a1s.c | 20 ++++++++++----------
+ drivers/media/i2c/ov02c10.c | 20 ++++++++++----------
+ drivers/media/i2c/ov02e10.c | 20 ++++++++++----------
+ 9 files changed, 85 insertions(+), 80 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4734c4497..5d716eb61 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,15 +20,16 @@ version_lt = $(shell \
+ echo "false"; \
+ fi)
+
+-KV_IVSC := 6.6.0
+-KV_IPU_BRIDGE := 6.6.0
+-KV_OV2740 := 6.8.0
++KV_LJCA := 6.7.0
++KV_IVSC := 6.10.0
++KV_IPU_BRIDGE := 6.10.0
++KV_OV2740 := 6.10.0
+
+ KERNEL_SRC ?= /lib/modules/$(KERNELRELEASE)/build
+ MODSRC := $(shell pwd)
+
+-ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_IVSC)),true)
+-$(warning build ljca ivsc)
++ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_LJCA)),true)
++$(warning build ljca)
+ obj-m += ljca.o
+ ljca-y := drivers/mfd/ljca.o
+
+@@ -40,7 +41,10 @@ gpio-ljca-y := drivers/gpio/gpio-ljca.o
+
+ obj-m += i2c-ljca.o
+ i2c-ljca-y := drivers/i2c/busses/i2c-ljca.o
++endif
+
++ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_IVSC)),true)
++$(warning build ivsc)
+ obj-m += mei-vsc.o
+ mei-vsc-y := drivers/misc/mei/spi-vsc.o
+ mei-vsc-y += drivers/misc/mei/hw-vsc.o
+@@ -77,16 +81,16 @@ obj-y += drivers/media/pci/intel/
+
+ export CONFIG_VIDEO_HM11B1 = m
+ export CONFIG_VIDEO_OV01A1S = m
+-export CONFIG_VIDEO_OV01A10 = m
+ export CONFIG_VIDEO_OV02C10 = m
+ export CONFIG_VIDEO_OV02E10 = m
+ export CONFIG_VIDEO_HM2170 = m
+ export CONFIG_VIDEO_HM2172 = m
+-export CONFIG_VIDEO_HI556 = m
+ export CONFIG_VIDEO_GC5035 = m
+
+ ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_OV2740)),true)
+-export CONFIG_VIDEO_OV2740 = m
++export CONFIG_ICAMERA_OV2740 = m
++export CONFIG_ICAMERA_OV01A10 = m
++export CONFIG_ICAMERA_HI556 = m
+ endif
+ obj-y += drivers/media/i2c/
+
+diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
+index 1f395448b..f49609620 100644
+--- a/drivers/media/i2c/Makefile
++++ b/drivers/media/i2c/Makefile
+@@ -4,11 +4,12 @@
+ obj-$(CONFIG_VIDEO_HM11B1) += hm11b1.o
+ obj-$(CONFIG_VIDEO_GC5035) += gc5035.o
+ obj-$(CONFIG_VIDEO_OV01A1S) += ov01a1s.o
+-obj-$(CONFIG_VIDEO_OV01A10) += ov01a10.o
+ obj-$(CONFIG_VIDEO_OV02C10) += ov02c10.o
+ obj-$(CONFIG_VIDEO_OV02E10) += ov02e10.o
+-obj-$(CONFIG_VIDEO_OV2740) += ov2740.o
+ obj-$(CONFIG_VIDEO_HM2170) += hm2170.o
+ obj-$(CONFIG_VIDEO_HM2170) += hm2172.o
+-obj-$(CONFIG_VIDEO_HI556) += hi556.o
+ obj-$(CONFIG_POWER_CTRL_LOGIC) += power_ctrl_logic.o
++
++obj-$(CONFIG_ICAMERA_OV2740) += ov2740.o
++obj-$(CONFIG_ICAMERA_OV01A10) += ov01a10.o
++obj-$(CONFIG_ICAMERA_HI556) += hi556.o
+diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
+index 4fc020b65..2adb5a1fe 100644
+--- a/drivers/media/i2c/hi556.c
++++ b/drivers/media/i2c/hi556.c
+@@ -12,7 +12,7 @@
+ #include <media/v4l2-ctrls.h>
+ #include <media/v4l2-device.h>
+ #include <media/v4l2-fwnode.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+
+@@ -510,7 +510,7 @@ struct hi556 {
+ /* Clock provider */
+ struct clk *img_clk;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct vsc_mipi_config conf;
+ struct vsc_camera_status status;
+@@ -527,7 +527,7 @@ struct hi556 {
+
+ /* True if the device has been identified */
+ bool identified;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ bool use_intel_vsc;
+ #endif
+@@ -704,7 +704,7 @@ static int hi556_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = hi556_test_pattern(hi556, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -732,7 +732,7 @@ static int hi556_init_controls(struct hi556 *hi556)
+ int ret;
+
+ ctrl_hdlr = &hi556->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -771,7 +771,7 @@ static int hi556_init_controls(struct hi556 *hi556)
+ h_blank);
+ if (hi556->hblank)
+ hi556->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ hi556->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hi556_ctrl_ops,
+ V4L2_CID_PRIVACY, 0, 1, 1,
+@@ -836,7 +836,7 @@ static int hi556_identify_module(struct hi556 *hi556)
+ return 0;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void hi556_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -936,7 +936,7 @@ static int hi556_power_off(struct device *dev)
+ struct hi556 *hi556 = to_hi556(sd);
+ int ret = 0;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (hi556->use_intel_vsc) {
+ ret = vsc_release_camera_sensor(&hi556->status);
+@@ -961,7 +961,7 @@ static int hi556_power_on(struct device *dev)
+ struct hi556 *hi556 = to_hi556(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (hi556->use_intel_vsc) {
+ hi556->conf.lane_num = HI556_DATA_LANES;
+@@ -1217,7 +1217,7 @@ static int hi556_get_pm_resources(struct device *dev)
+ struct hi556 *hi556 = to_hi556(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ acpi_handle handle = ACPI_HANDLE(dev);
+ struct acpi_handle_list dep_devices;
+diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c
+index 102eec25a..2987e0cbe 100644
+--- a/drivers/media/i2c/hm2170.c
++++ b/drivers/media/i2c/hm2170.c
+@@ -13,7 +13,7 @@
+ #include <media/v4l2-ctrls.h>
+ #include <media/v4l2-device.h>
+ #include <media/v4l2-fwnode.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+ #endif
+@@ -615,7 +615,7 @@ struct hm2170 {
+ struct v4l2_ctrl *vblank;
+ struct v4l2_ctrl *hblank;
+ struct v4l2_ctrl *exposure;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct vsc_mipi_config conf;
+ struct vsc_camera_status status;
+@@ -792,7 +792,7 @@ static int hm2170_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = hm2170_test_pattern(hm2170, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -825,7 +825,7 @@ static int hm2170_init_controls(struct hm2170 *hm2170)
+ int ret = 0;
+
+ ctrl_hdlr = &hm2170->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -864,7 +864,7 @@ static int hm2170_init_controls(struct hm2170 *hm2170)
+ h_blank);
+ if (hm2170->hblank)
+ hm2170->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ hm2170->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hm2170_ctrl_ops,
+ V4L2_CID_PRIVACY, 0, 1, 1,
+@@ -904,7 +904,7 @@ static void hm2170_update_pad_format(const struct hm2170_mode *mode,
+ fmt->field = V4L2_FIELD_NONE;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void hm2170_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -984,7 +984,7 @@ static int hm2170_set_stream(struct v4l2_subdev *sd, int enable)
+ return ret;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static int hm2170_power_off(struct device *dev)
+ {
+@@ -1323,7 +1323,7 @@ static int hm2170_probe(struct i2c_client *client)
+ }
+
+ v4l2_i2c_subdev_init(&hm2170->sd, client, &hm2170_subdev_ops);
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ hm2170->conf.lane_num = HM2170_DATA_LANES;
+ /* frequency unit 100k */
+@@ -1389,7 +1389,7 @@ probe_error_v4l2_ctrl_handler_free:
+ mutex_destroy(&hm2170->mutex);
+
+ probe_error_ret:
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ hm2170_power_off(&client->dev);
+ #endif
+@@ -1399,7 +1399,7 @@ probe_error_ret:
+
+ static const struct dev_pm_ops hm2170_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(hm2170_suspend, hm2170_resume)
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ SET_RUNTIME_PM_OPS(hm2170_power_off, hm2170_power_on, NULL)
+ #endif
+diff --git a/drivers/media/i2c/hm2172.c b/drivers/media/i2c/hm2172.c
+index 3362d3151..8e1d1f883 100644
+--- a/drivers/media/i2c/hm2172.c
++++ b/drivers/media/i2c/hm2172.c
+@@ -15,7 +15,7 @@
+ #include <media/v4l2-fwnode.h>
+ #include <linux/clk.h>
+ #include <linux/gpio/consumer.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+
+@@ -927,7 +927,7 @@ struct hm2172 {
+ struct gpio_desc *reset;
+ struct gpio_desc *handshake;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct vsc_mipi_config conf;
+ struct vsc_camera_status status;
+@@ -942,7 +942,7 @@ struct hm2172 {
+
+ /* Streaming on/off */
+ bool streaming;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ bool use_intel_vsc;
+ #endif
+@@ -1109,7 +1109,7 @@ static int hm2172_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = hm2172_test_pattern(hm2172, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -1142,7 +1142,7 @@ static int hm2172_init_controls(struct hm2172 *hm2172)
+ int ret = 0;
+
+ ctrl_hdlr = &hm2172->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -1183,7 +1183,7 @@ static int hm2172_init_controls(struct hm2172 *hm2172)
+ if (hm2172->hblank)
+ hm2172->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ hm2172->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hm2172_ctrl_ops,
+ V4L2_CID_PRIVACY, 0, 1, 1,
+@@ -1223,7 +1223,7 @@ static void hm2172_update_pad_format(const struct hm2172_mode
*mode,
+ fmt->field = V4L2_FIELD_NONE;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void hm2172_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -1309,7 +1309,7 @@ static int hm2172_power_off(struct device *dev)
+ struct hm2172 *hm2172 = to_hm2172(sd);
+ int ret = 0;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (hm2172->use_intel_vsc) {
+ ret = vsc_release_camera_sensor(&hm2172->status);
+@@ -1336,7 +1336,7 @@ static int hm2172_power_on(struct device *dev)
+ struct hm2172 *hm2172 = to_hm2172(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (hm2172->use_intel_vsc) {
+ hm2172->conf.lane_num = HM2172_DATA_LANES;
+@@ -1392,7 +1392,7 @@ static int hm2172_get_pm_resources(struct device *dev)
+ struct hm2172 *hm2172 = to_hm2172(sd);
+ int ret = 0;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ acpi_handle handle = ACPI_HANDLE(dev);
+ struct acpi_handle_list dep_devices;
+diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
+index 78ae01811..31f1e7a3d 100644
+--- a/drivers/media/i2c/ov01a10.c
++++ b/drivers/media/i2c/ov01a10.c
+@@ -11,7 +11,7 @@
+ #include <media/v4l2-ctrls.h>
+ #include <media/v4l2-device.h>
+ #include <media/v4l2-fwnode.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+ #endif
+@@ -296,7 +296,7 @@ struct ov01a10 {
+ /* To serialize asynchronus callbacks */
+ struct mutex mutex;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct vsc_mipi_config conf;
+ struct vsc_camera_status status;
+@@ -469,7 +469,7 @@ static int ov01a10_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = ov01a10_test_pattern(ov01a10, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -500,7 +500,7 @@ static int ov01a10_init_controls(struct ov01a10 *ov01a10)
+ int ret = 0;
+
+ ctrl_hdlr = &ov01a10->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -539,7 +539,7 @@ static int ov01a10_init_controls(struct ov01a10 *ov01a10)
+ if (ov01a10->hblank)
+ ov01a10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov01a10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr,
+ &ov01a10_ctrl_ops,
+@@ -661,7 +661,7 @@ static int ov01a10_set_stream(struct v4l2_subdev *sd, int enable)
+ return ret;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void ov01a10_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -1016,7 +1016,7 @@ static int ov01a10_probe(struct i2c_client *client)
+ return -ENOMEM;
+
+ v4l2_i2c_subdev_init(&ov01a10->sd, client, &ov01a10_subdev_ops);
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov01a10->conf.lane_num = OV01A10_DATA_LANES;
+ /* frequency unit 100k */
+@@ -1082,7 +1082,7 @@ probe_error_v4l2_ctrl_handler_free:
+ mutex_destroy(&ov01a10->mutex);
+
+ probe_error_ret:
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov01a10_power_off(&client->dev);
+ #endif
+@@ -1092,7 +1092,7 @@ probe_error_ret:
+
+ static const struct dev_pm_ops ov01a10_pm_ops = {
+ SET_SYSTEM_SLEEP_PM_OPS(ov01a10_suspend, ov01a10_resume)
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ SET_RUNTIME_PM_OPS(ov01a10_power_off, ov01a10_power_on, NULL)
+ #endif
+diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
+index f7cf2218c..85f9c684c 100644
+--- a/drivers/media/i2c/ov01a1s.c
++++ b/drivers/media/i2c/ov01a1s.c
+@@ -17,7 +17,7 @@
+ #elif IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
+ #include "power_ctrl_logic.h"
+ #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+ #endif
+@@ -303,7 +303,7 @@ struct ov01a1s {
+ struct v4l2_ctrl *vblank;
+ struct v4l2_ctrl *hblank;
+ struct v4l2_ctrl *exposure;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct v4l2_ctrl *privacy_status;
+
+@@ -337,7 +337,7 @@ struct ov01a1s {
+ #if IS_ENABLED(CONFIG_INTEL_SKL_INT3472) || IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
+ OV01A1S_USE_INT3472 = 1,
+ #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ OV01A1S_USE_INTEL_VSC = 2,
+ #endif
+@@ -508,7 +508,7 @@ static int ov01a1s_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = ov01a1s_test_pattern(ov01a1s, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -539,7 +539,7 @@ static int ov01a1s_init_controls(struct ov01a1s *ov01a1s)
+ int ret = 0;
+
+ ctrl_hdlr = &ov01a1s->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -577,7 +577,7 @@ static int ov01a1s_init_controls(struct ov01a1s *ov01a1s)
+ 1, h_blank);
+ if (ov01a1s->hblank)
+ ov01a1s->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov01a1s->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr,
+ &ov01a1s_ctrl_ops,
+@@ -619,7 +619,7 @@ static void ov01a1s_update_pad_format(const struct ov01a1s_mode
*mode,
+ fmt->field = V4L2_FIELD_NONE;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void ov01a1s_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -729,7 +729,7 @@ static int ov01a1s_power_off(struct device *dev)
+ if (ov01a1s->power_type == OV01A1S_USE_INT3472)
+ ret = power_ctrl_logic_set_power(0);
+ #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (ov01a1s->power_type == OV01A1S_USE_INTEL_VSC) {
+ ret = vsc_release_camera_sensor(&ov01a1s->status);
+@@ -764,7 +764,7 @@ static int ov01a1s_power_on(struct device *dev)
+ if (ov01a1s->power_type == OV01A1S_USE_INT3472)
+ ret = power_ctrl_logic_set_power(1);
+ #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (ov01a1s->power_type == OV01A1S_USE_INTEL_VSC) {
+ ret = vsc_acquire_camera_sensor(&ov01a1s->conf,
+@@ -1125,7 +1125,7 @@ static int ov01a1s_parse_power(struct ov01a1s *ov01a1s)
+ {
+ int ret = 0;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov01a1s->conf.lane_num = OV01A1S_DATA_LANES;
+ /* frequency unit 100k */
+diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c
+index 40865f8e3..4f58d5ac9 100644
+--- a/drivers/media/i2c/ov02c10.c
++++ b/drivers/media/i2c/ov02c10.c
+@@ -13,7 +13,7 @@
+ #include <media/v4l2-ctrls.h>
+ #include <media/v4l2-device.h>
+ #include <media/v4l2-fwnode.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+
+@@ -697,7 +697,7 @@ struct ov02c10 {
+ struct gpio_desc *reset;
+ struct gpio_desc *handshake;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct vsc_mipi_config conf;
+ struct vsc_camera_status status;
+@@ -717,7 +717,7 @@ IS_ENABLED(CONFIG_INTEL_VSC)
+
+ /* Module name index */
+ u8 module_name_index;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+
+ bool use_intel_vsc;
+@@ -857,7 +857,7 @@ static int ov02c10_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = ov02c10_test_pattern(ov02c10, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -888,7 +888,7 @@ static int ov02c10_init_controls(struct ov02c10 *ov02c10)
+ int ret = 0;
+
+ ctrl_hdlr = &ov02c10->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -926,7 +926,7 @@ IS_ENABLED(CONFIG_INTEL_VSC)
+ 1, h_blank);
+ if (ov02c10->hblank)
+ ov02c10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov02c10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr,
+ &ov02c10_ctrl_ops,
+@@ -1102,7 +1102,7 @@ static int ov02c10_get_pm_resources(struct device *dev)
+ struct ov02c10 *ov02c10 = to_ov02c10(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ acpi_handle handle = ACPI_HANDLE(dev);
+ struct acpi_handle_list deps;
+@@ -1162,7 +1162,7 @@ IS_ENABLED(CONFIG_INTEL_VSC)
+ return 0;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void ov02c10_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -1179,7 +1179,7 @@ static int ov02c10_power_off(struct device *dev)
+ struct ov02c10 *ov02c10 = to_ov02c10(sd);
+ int ret = 0;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (ov02c10->use_intel_vsc) {
+ ret = vsc_release_camera_sensor(&ov02c10->status);
+@@ -1206,7 +1206,7 @@ static int ov02c10_power_on(struct device *dev)
+ struct ov02c10 *ov02c10 = to_ov02c10(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (ov02c10->use_intel_vsc) {
+ ov02c10->conf.lane_num = ov02c10->mipi_lanes;
+diff --git a/drivers/media/i2c/ov02e10.c b/drivers/media/i2c/ov02e10.c
+index 916def90f..c5c373aa6 100644
+--- a/drivers/media/i2c/ov02e10.c
++++ b/drivers/media/i2c/ov02e10.c
+@@ -13,7 +13,7 @@
+ #include <media/v4l2-ctrls.h>
+ #include <media/v4l2-device.h>
+ #include <media/v4l2-fwnode.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ #include <linux/vsc.h>
+
+@@ -289,7 +289,7 @@ struct ov02e10 {
+ struct gpio_desc *reset;
+ struct gpio_desc *handshake;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ struct vsc_mipi_config conf;
+ struct vsc_camera_status status;
+@@ -304,7 +304,7 @@ struct ov02e10 {
+
+ /* Streaming on/off */
+ bool streaming;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ bool use_intel_vsc;
+ #endif
+@@ -486,7 +486,7 @@ static int ov02e10_set_ctrl(struct v4l2_ctrl *ctrl)
+ ret = ov02e10_test_pattern(ov02e10, ctrl->val);
+ break;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ case V4L2_CID_PRIVACY:
+ dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
+@@ -520,7 +520,7 @@ static int ov02e10_init_controls(struct ov02e10 *ov02e10)
+ int ret;
+
+ ctrl_hdlr = &ov02e10->ctrl_handler;
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
+ #else
+@@ -561,7 +561,7 @@ static int ov02e10_init_controls(struct ov02e10 *ov02e10)
+ if (ov02e10->hblank)
+ ov02e10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ ov02e10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &ov02e10_ctrl_ops,
+ V4L2_CID_PRIVACY, 0, 1, 1,
+@@ -602,7 +602,7 @@ static void ov02e10_update_pad_format(const struct ov02e10_mode
*mode,
+ fmt->field = V4L2_FIELD_NONE;
+ }
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ static void ov02e10_vsc_privacy_callback(void *handle,
+ enum vsc_privacy_status status)
+@@ -696,7 +696,7 @@ static int ov02e10_get_pm_resources(struct device *dev)
+ struct ov02e10 *ov02e10 = to_ov02e10(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ acpi_handle handle = ACPI_HANDLE(dev);
+ struct acpi_handle_list dep_devices;
+@@ -763,7 +763,7 @@ static int ov02e10_power_off(struct device *dev)
+ struct ov02e10 *ov02e10 = to_ov02e10(sd);
+ int ret = 0;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (ov02e10->use_intel_vsc) {
+ ret = vsc_release_camera_sensor(&ov02e10->status);
+@@ -790,7 +790,7 @@ static int ov02e10_power_on(struct device *dev)
+ struct ov02e10 *ov02e10 = to_ov02e10(sd);
+ int ret;
+
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
+ IS_ENABLED(CONFIG_INTEL_VSC)
+ if (ov02e10->use_intel_vsc) {
+ ov02e10->conf.lane_num = OV02E10_DATA_LANES;
+--
+2.45.1
+
diff --git a/intel-ipu6-kmod.rpmlintrc b/intel-ipu6-kmod.rpmlintrc
new file mode 100644
index 0000000..0560092
--- /dev/null
+++ b/intel-ipu6-kmod.rpmlintrc
@@ -0,0 +1,4 @@
+# these are all normal for the generated [a]kmod pkgs
+addFilter("W: no-documentation")
+addFilter("E: spelling-error")
+addFilter("E: no-binary")
diff --git a/intel-ipu6-kmod.spec b/intel-ipu6-kmod.spec
index cf960e1..2842736 100644
--- a/intel-ipu6-kmod.spec
+++ b/intel-ipu6-kmod.spec
@@ -3,8 +3,8 @@
%global debug_package %{nil}
%endif
-%global ipu6_commit fb4c17019c9ede9412065d61ecd352cdf1c0e7af
-%global ipu6_commitdate 20240226
+%global ipu6_commit aecec2aaef069fea56aa921cf5d7e449bb7a0b82
+%global ipu6_commitdate 20240624
%global ipu6_shortcommit %(c=%{ipu6_commit}; echo ${c:0:7})
%global ivsc_commit a6dccbbf5a955489d20d996234b6ebb481183ed7
@@ -16,24 +16,23 @@
Name: %{prjname}-kmod
Summary: Kernel module (kmod) for %{prjname}
Version: 0.0
-Release: 13.%{ipu6_commitdate}git%{ipu6_shortcommit}%{?dist}
+Release: 14.%{ipu6_commitdate}git%{ipu6_shortcommit}%{?dist}
License: GPLv2+
+URL:
https://github.com/intel/ipu6-drivers
-URL:
https://github.com/intel
Source0:
%{url}/ivsc-driver/archive/%{ivsc_commit}/ivsc-driver-%{ivsc_shortcommit}.tar.gz
Source1:
%{url}/ipu6-drivers/archive/%{ipu6_commit}/ipu6-drivers-%{ipu6_shortcommit}.tar.gz
-
# Patches
-#
https://github.com/intel/ipu6-drivers/pull/213
-#
https://github.com/intel/ipu6-drivers/pull/214
-Patch10: 1.patch
-Patch11: 2.patch
-Patch12: 3.patch
-Patch13: 4.patch
-Patch14: 5.patch
-Patch15: 6.patch
-Patch16: 0001-Skip-ljca-modules-for-the-kernel-6.7.patch
+#
https://github.com/intel/ipu6-drivers/pull/239
+Patch1: 0001-gc5035-Fix-compilation-with-kernels-6.8.patch
+#
https://github.com/intel/ipu6-drivers/pull/242
+Patch2: 0002-media-ipu6-Fix-compilation-with-kernels-6.10.patch
+#
https://github.com/intel/ipu6-drivers/pull/243
+Patch3: 0003-Makefile-prefix-ipu6-modules-with-icamera-instead-of.patch
+
+# Downstream / Fedora specific patches
+Patch101: 0101-Makefile-Adjust-which-modules-to-build-for-which-ker.patch
BuildRequires: gcc
BuildRequires: elfutils-libelf-devel
@@ -44,11 +43,8 @@ BuildRequires: kmodtool
%{expand:%(kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{prjname}
%{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}
2>/dev/null) }
%description
-This enables intel IPU6 image processor. The package includes Intel IPU6 and iVSC
drivers
-The source can be found from the following URL.
-https://github.com/intel/ipu6-drivers
-
-This package contains the kmod module for %{prjname}.
+This enables intel IPU6 image processor. The package includes Intel IPU6
+and iVSC drivers.
%prep
@@ -60,13 +56,10 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname
%{prjname} %{?buil
%setup -q -c -a 1
(cd ipu6-drivers-%{ipu6_commit}
-%patch 10 -p1
-%patch 11 -p1
-%patch 12 -p1
-%patch 13 -p1
-%patch 14 -p1
-%patch 15 -p1
-%patch 16 -p1
+%patch 1 -p1
+%patch 2 -p1
+%patch 3 -p1
+%patch 101 -p1
)
@@ -86,24 +79,24 @@ done
%install
for kernel_version in %{?kernel_versions}; do
- mkdir -p
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/hi556.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/hi556.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/hm11b1.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/hm11b1.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/hm2170.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/hm2170.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/ov01a10.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/ov01a10.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/ov01a1s.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/ov01a1s.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/ov02c10.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/ov02c10.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/ov2740.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/ov2740.ko
- install -D -m 755
_kmod_build_${kernel_version%%___*}/drivers/media/pci/intel/ipu6/intel-ipu6-isys.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/pci/intel/ipu6/intel-ipu6-isys.ko
- install -D -m 755
_kmod_build_${kernel_version%%___*}/drivers/media/pci/intel/ipu6/intel-ipu6-psys.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/pci/intel/ipu6/intel-ipu6-psys.ko
- install -D -m 755
_kmod_build_${kernel_version%%___*}/drivers/media/pci/intel/ipu6/intel-ipu6.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/pci/intel/ipu6/intel-ipu6.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/*.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}
- chmod a+x
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko
+ mkdir -p
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/
+ mkdir -p
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/pci/intel/ipu6/
+ install -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/i2c/*.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/i2c/
+ install -m 755 _kmod_build_${kernel_version%%___*}/drivers/media/pci/intel/ipu6/*.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/media/pci/intel/ipu6/
+ if [ -f _kmod_build_${kernel_version%%___*}/intel_vsc.ko* ]; then
+ install -m 755 _kmod_build_${kernel_version%%___*}/*.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}
+ fi
done
%{?akmod_install}
%changelog
+* Thu Jun 27 2024 Hans de Goede <hdegoede(a)redhat.com> - 0.0-14.20240624gitaecec2a
+- Updated ipu6-driver to commit aecec2aaef069fea56aa921cf5d7e449bb7a0b82
+- Adjust which modules are build to not conflict with upstreamed ivsc,
+ ov01a10, ov2740 and hi556 drivers
+- Fix building against 6.10 kernels
+
* Fri Apr 19 2024 Kate Hsuan <hpa(a)redhat.cpm> - 0.0-13.20240226gitfb4c170
- Update ivsc to commit a6dccbbf5a955489d20d996234b6ebb481183ed7
- ivsc: Update mei_dev.h for kernel >= 6.8
diff --git a/sources b/sources
index ccd6367..82186ae 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (ipu6-drivers-fb4c170.tar.gz) =
1722fb07428844303f5b8f6694691f19db90651119db5cd90e665019101c3b6c46e82232a9bf87abaf2c982ce01bf7a672d584b03eab5c9810bf74840e02f055
+SHA512 (ipu6-drivers-aecec2a.tar.gz) =
dca9049029cc36583e7cea8bb1f91e51f6487cc63494e4e36961f1a08d0f4ef60c1938452efa17a4d9d1ec0523e76e148b1b5b37e9d0d56da24d3272eb07d09a
SHA512 (ivsc-driver-a6dccbb.tar.gz) =
10e0c4c24d9f7e3ffb99aa36808663fec3b6a020b22c1625da2548c5939ee0ae532a0f7e48ed5701b67233bb430e0dce65ea64870b253d83ba586ff427d35551