commit 577ee8c1355ccf454a5e754e311fea988378b7a5
Author: Kate Hsuan <hpa(a)redhat.com>
Date: Thu Mar 7 15:06:05 2024 +0800
Support for kernel >= 6.7
- Fix for kernel >= 6.7
- Fix and improve ipu6_isys probe()
- Skip ljca driver when the system runs the kernel >= 6.7
.gitignore | 2 +
0001-Skip-ljca-modules-for-the-kernel-6.7.patch | 53 ++
...u-psys-Fix-compilation-with-kernels-6.5.0.patch | 32 -
0001-ipu6-Fix-compilation-with-kernels-6.6.0.patch | 363 -----------
...-spi-vsc-Call-acpi_dev_clear_dependencies.patch | 40 --
1.patch | 107 ++++
2.patch | 84 +++
3.patch | 22 +
4.patch | 56 ++
5.patch | 117 ++++
6.patch | 692 +++++++++++++++++++++
intel-ipu6-kmod.spec | 51 +-
sources | 4 +-
vsc-44.patch | 124 ++++
14 files changed, 1289 insertions(+), 458 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c6287a1..38e131b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,5 @@
/ipu6-drivers-8e41080.tar.gz
/ivsc-driver-cce4377.tar.gz
/ivsc-driver-e8ea8b8.tar.gz
+/ipu6-drivers-fb4c170.tar.gz
+/ivsc-driver-73a044d.tar.gz
diff --git a/0001-Skip-ljca-modules-for-the-kernel-6.7.patch
b/0001-Skip-ljca-modules-for-the-kernel-6.7.patch
new file mode 100644
index 0000000..65bfdf2
--- /dev/null
+++ b/0001-Skip-ljca-modules-for-the-kernel-6.7.patch
@@ -0,0 +1,53 @@
+From 8ff945ba4964fad45e36230ec799dfc0405c2d5e Mon Sep 17 00:00:00 2001
+From: Kate Hsuan <hpa(a)redhat.com>
+Date: Thu, 7 Mar 2024 13:20:05 +0800
+Subject: [PATCH] Skip ljca modules for the kernel >=6.7
+
+---
+ Makefile | 24 ++++++++++++++++++++----
+ 1 file changed, 20 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 4b8b3b551..42e82d49a 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,16 +1,32 @@
+ # SPDX-License-Identifier: GPL-2.0
+ # Copyright (c) 2022 Intel Corporation.
+
+-obj-m += ljca.o
++K_VERSION = $(shell uname -r)
++K_MAJ = $(shell echo $(K_VERSION)|sed -e
's/^\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*.*/\1/' )
++K_MIN = $(shell echo $(K_VERSION)|sed -e
's/^[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*.*/\1/')
++
++version_greator = $(shell echo test | awk '{if($(K_MAJ) < $(1)) {print 0}}')
++
++ver_ge = $(shell \
++echo test | awk '{if($(K_MAJ) < $(1)) {print 0} else { \
++if($(K_MAJ) > $(1)) {print 1} else { \
++if($(K_MIN) < $(2)) {print 0} else { print 1 } \
++}}}' \
++)
++
++ifeq ($(call ver_ge,6,7),0)
++ obj-m += i2c-ljca.o
++ obj-m += ljca.o
++ obj-m += spi-ljca.o
++ obj-m += gpio-ljca.o
++endif
++
+ ljca-y := drivers/mfd/ljca.o
+
+-obj-m += spi-ljca.o
+ spi-ljca-y := drivers/spi/spi-ljca.o
+
+-obj-m += gpio-ljca.o
+ gpio-ljca-y := drivers/gpio/gpio-ljca.o
+
+-obj-m += i2c-ljca.o
+ i2c-ljca-y := drivers/i2c/busses/i2c-ljca.o
+
+ obj-m += mei-vsc.o
+--
+2.43.2
+
diff --git a/1.patch b/1.patch
new file mode 100644
index 0000000..55057d3
--- /dev/null
+++ b/1.patch
@@ -0,0 +1,107 @@
+From 24a4c9abc2c4c6d0aa84f9045424f62b8b9bdbe9 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 16:59:05 +0100
+Subject: [PATCH] ipu6-isys: Add error logging to various probe error paths
+
+Add error logging to various probe() error paths to make it easier to
+debug probe() failures.
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/pci/intel/ipu-isys-csi2.c | 4 +++-
+ drivers/media/pci/intel/ipu-isys-subdev.c | 9 +++++++--
+ drivers/media/pci/intel/ipu-isys.c | 16 ++++++++++++----
+ 3 files changed, 22 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/media/pci/intel/ipu-isys-csi2.c
b/drivers/media/pci/intel/ipu-isys-csi2.c
+index 2dad9ce7dfcc..4c47de9169a9 100644
+--- a/drivers/media/pci/intel/ipu-isys-csi2.c
++++ b/drivers/media/pci/intel/ipu-isys-csi2.c
+@@ -531,8 +531,10 @@ int ipu_isys_csi2_init(struct ipu_isys_csi2 *csi2,
+ NR_OF_CSI2_SOURCE_PADS,
+ NR_OF_CSI2_SINK_PADS,
+ 0);
+- if (rval)
++ if (rval) {
++ dev_err(&isys->adev->dev, "ipu_isys_subdev_init() err %d\n",
rval);
+ goto fail;
++ }
+
+ csi2->asd.pad[CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK
+ | MEDIA_PAD_FL_MUST_CONNECT;
+diff --git a/drivers/media/pci/intel/ipu-isys-subdev.c
b/drivers/media/pci/intel/ipu-isys-subdev.c
+index b9f48d41f844..6c0180d50ab1 100644
+--- a/drivers/media/pci/intel/ipu-isys-subdev.c
++++ b/drivers/media/pci/intel/ipu-isys-subdev.c
+@@ -819,17 +819,22 @@ int ipu_isys_subdev_init(struct ipu_isys_subdev *asd,
+ return -ENOMEM;
+
+ rval = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad);
+- if (rval)
++ if (rval) {
++ dev_err(&asd->isys->adev->dev, "%s: media_entity_pads_init() err
%d\n", __func__, rval);
+ goto out_mutex_destroy;
++ }
+
+ if (asd->ctrl_init) {
+ rval = v4l2_ctrl_handler_init(&asd->ctrl_handler, nr_ctrls);
+- if (rval)
++ if (rval) {
++ dev_err(&asd->isys->adev->dev, "%s: v4l2_ctrl_handler_init() err
%d\n", __func__, rval);
+ goto out_media_entity_cleanup;
++ }
+
+ asd->ctrl_init(&asd->sd);
+ if (asd->ctrl_handler.error) {
+ rval = asd->ctrl_handler.error;
++ dev_err(&asd->isys->adev->dev, "%s: ctrl_handler.error %d\n",
__func__, rval);
+ goto out_v4l2_ctrl_handler_free;
+ }
+
+diff --git a/drivers/media/pci/intel/ipu-isys.c b/drivers/media/pci/intel/ipu-isys.c
+index 3cc38d4c959a..19b3fee56dd2 100644
+--- a/drivers/media/pci/intel/ipu-isys.c
++++ b/drivers/media/pci/intel/ipu-isys.c
+@@ -396,8 +396,10 @@ static int isys_register_subdevices(struct ipu_isys *isys)
+ rval = ipu_isys_csi2_init(&isys->csi2[i], isys,
+ isys->pdata->base +
+ csi2->offsets[i], i);
+- if (rval)
++ if (rval) {
++ dev_err(&isys->adev->dev, "ipu_isys_csi2_init() err %d\n",
rval);
+ goto fail;
++ }
+
+ isys->isr_csi2_bits |= IPU_ISYS_UNISPART_IRQ_CSI2(i);
+ }
+@@ -1009,12 +1011,16 @@ static int isys_register_devices(struct ipu_isys *isys)
+ goto out_v4l2_device_unregister;
+
+ rval = isys_notifier_init(isys);
+- if (rval)
++ if (rval) {
++ dev_err(&isys->adev->dev, "isys_notifier_init() err %d\n", rval);
+ goto out_isys_unregister_subdevices;
++ }
+
+ rval = v4l2_device_register_subdev_nodes(&isys->v4l2_dev);
+- if (rval)
++ if (rval) {
++ dev_err(&isys->adev->dev, "error registering subdev nodes %d\n",
rval);
+ goto out_isys_notifier_cleanup;
++ }
+
+ return 0;
+
+@@ -1561,8 +1567,10 @@ static int isys_probe(struct ipu_bus_device *adev)
+ if (rval)
+ goto out_remove_pkg_dir_shared_buffer;
+ rval = isys_iwake_watermark_init(isys);
+- if (rval)
++ if (rval) {
++ dev_err(&adev->dev, "isys_iwake_watermark_init() err %d\n", rval);
+ goto out_unregister_devices;
++ }
+
+ ipu_mmu_hw_cleanup(adev->mmu);
+
diff --git a/2.patch b/2.patch
new file mode 100644
index 0000000..4c0624a
--- /dev/null
+++ b/2.patch
@@ -0,0 +1,84 @@
+From 4b33ce53bbe991f82ebc4fd16e4d70dd2f24c86c Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 17:05:57 +0100
+Subject: [PATCH] ipu6-isys: Fix crash when ipu_isys_csi2_init() fails
+
+Calling isys_unregister_subdevices() on errors in
+isys_register_subdevices() leads to not yet registered subdevs
+getting unregistered resulting in a NULL pointer deref:
+
+[ 143.100638] BUG: kernel NULL pointer dereference, address: 0000000000000000
+...
+[ 143.100655] RIP: 0010:__wake_up_common+0x2a/0xa0
+...
+[ 143.100672] Call Trace:
+[ 143.100674] <TASK>
+[ 143.100676] ? __die+0x23/0x70
+[ 143.100680] ? page_fault_oops+0x171/0x4e0
+[ 143.100684] ? exc_page_fault+0x7f/0x180
+[ 143.100687] ? asm_exc_page_fault+0x26/0x30
+[ 143.100690] ? __wake_up_common+0x2a/0xa0
+[ 143.100692] __wake_up+0x36/0x60
+[ 143.100697] __vb2_queue_cancel+0xd2/0x290 [videobuf2_common]
+[ 143.100706] vb2_core_queue_release+0x22/0x50 [videobuf2_common]
+[ 143.100714] isys_unregister_subdevices+0x49/0xb0 [intel_ipu6_isys]
+[ 143.100723] isys_probe+0x59c/0xa30 [intel_ipu6_isys]
+
+Fix this by only cleaning up subdevs which have actually been registered.
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/pci/intel/ipu-isys.c | 23 +++++++++++++++--------
+ 1 file changed, 15 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/media/pci/intel/ipu-isys.c b/drivers/media/pci/intel/ipu-isys.c
+index 19b3fee56dd2..d57a38b637b5 100644
+--- a/drivers/media/pci/intel/ipu-isys.c
++++ b/drivers/media/pci/intel/ipu-isys.c
+@@ -382,15 +382,12 @@ static int isys_register_subdevices(struct ipu_isys *isys)
+ const struct ipu_isys_internal_csi2_pdata *csi2 =
+ &isys->pdata->ipdata->csi2;
+ struct ipu_isys_csi2_be_soc *csi2_be_soc;
+- unsigned int i, k;
+- int rval;
++ int i = 0, k = 0, rval;
+
+ isys->csi2 = devm_kcalloc(&isys->adev->dev, csi2->nports,
+ sizeof(*isys->csi2), GFP_KERNEL);
+- if (!isys->csi2) {
+- rval = -ENOMEM;
+- goto fail;
+- }
++ if (!isys->csi2)
++ return -ENOMEM;
+
+ for (i = 0; i < csi2->nports; i++) {
+ rval = ipu_isys_csi2_init(&isys->csi2[i], isys,
+@@ -425,7 +422,8 @@ static int isys_register_subdevices(struct ipu_isys *isys)
+ if (rval) {
+ dev_info(&isys->adev->dev,
+ "can't create link csi2->be_soc\n");
+- goto fail;
++ isys_unregister_subdevices(isys);
++ return rval;
+ }
+ }
+ }
+@@ -433,7 +431,16 @@ static int isys_register_subdevices(struct ipu_isys *isys)
+ return 0;
+
+ fail:
+- isys_unregister_subdevices(isys);
++ while (--k >= 0) {
++ dev_info(&isys->adev->dev, "foo %d\n", k);
++ ipu_isys_csi2_be_soc_cleanup(&isys->csi2_be_soc[k]);
++ }
++
++ while (--i >= 0) {
++ dev_info(&isys->adev->dev, "bar %d\n", k);
++ ipu_isys_csi2_cleanup(&isys->csi2[i]);
++ }
++
+ return rval;
+ }
+
diff --git a/3.patch b/3.patch
new file mode 100644
index 0000000..91b14a9
--- /dev/null
+++ b/3.patch
@@ -0,0 +1,22 @@
+From f7ee25d614f07a917440a338e8765ec104f4272c Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 18:00:41 +0100
+Subject: [PATCH] err-fixup
+
+---
+ drivers/media/pci/intel/ipu-isys-subdev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/media/pci/intel/ipu-isys-subdev.c
b/drivers/media/pci/intel/ipu-isys-subdev.c
+index 6c0180d50ab1..5f6fa850b1a6 100644
+--- a/drivers/media/pci/intel/ipu-isys-subdev.c
++++ b/drivers/media/pci/intel/ipu-isys-subdev.c
+@@ -820,7 +820,7 @@ int ipu_isys_subdev_init(struct ipu_isys_subdev *asd,
+
+ rval = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad);
+ if (rval) {
+- dev_err(&asd->isys->adev->dev, "%s: media_entity_pads_init() err
%d\n", __func__, rval);
++ dev_err(&asd->isys->adev->dev, "%s: media_entity_pads_init(%d) err
%d\n", __func__, num_pads, rval);
+ goto out_mutex_destroy;
+ }
+
diff --git a/4.patch b/4.patch
new file mode 100644
index 0000000..ffe3ebc
--- /dev/null
+++ b/4.patch
@@ -0,0 +1,56 @@
+From 777bf4727f61937603633a4bc1955c0c0077bd92 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 18:14:50 +0100
+Subject: [PATCH] ipu6-isys: Fix ipu_isys_probe() error exit resource cleanup
+
+Add a bunch of missing resource cleanups to ipu_isys_probe()'s
+error exit path.
+
+Also add a missing mutex_destroy() to isys_remove()
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/pci/intel/ipu-isys.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/media/pci/intel/ipu-isys.c b/drivers/media/pci/intel/ipu-isys.c
+index d57a38b637b5..222c901b32a0 100644
+--- a/drivers/media/pci/intel/ipu-isys.c
++++ b/drivers/media/pci/intel/ipu-isys.c
+@@ -1217,6 +1217,7 @@ static void isys_remove(struct ipu_bus_device *adev)
+
+ mutex_destroy(&isys->stream_mutex);
+ mutex_destroy(&isys->mutex);
++ mutex_destroy(&isys->lib_mutex);
+
+ if (isys->short_packet_source == IPU_ISYS_SHORT_PACKET_FROM_TUNIT) {
+ u32 trace_size = IPU_ISYS_SHORT_PACKET_TRACE_BUFFER_SIZE;
+@@ -1587,6 +1588,16 @@ static int isys_probe(struct ipu_bus_device *adev)
+ isys_iwake_watermark_cleanup(isys);
+ isys_unregister_devices(isys);
+ out_remove_pkg_dir_shared_buffer:
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0)
++ cpu_latency_qos_remove_request(&isys->pm_qos);
++#else
++ pm_qos_remove_request(&isys->pm_qos);
++#endif
++ ipu_trace_uninit(&adev->dev);
++#ifdef CONFIG_DEBUG_FS
++ if (isp->ipu_dir)
++ debugfs_remove_recursive(isys->debugfsdir);
++#endif
+ if (!isp->secure_mode)
+ ipu_cpd_free_pkg_dir(adev, isys->pkg_dir,
+ isys->pkg_dir_dma_addr,
+@@ -1597,10 +1608,10 @@ static int isys_probe(struct ipu_bus_device *adev)
+ release_firmware:
+ if (!isp->secure_mode)
+ release_firmware(isys->fw);
+- ipu_trace_uninit(&adev->dev);
+
+ mutex_destroy(&isys->mutex);
+ mutex_destroy(&isys->stream_mutex);
++ mutex_destroy(&isys->lib_mutex);
+
+ if (isys->short_packet_source == IPU_ISYS_SHORT_PACKET_FROM_TUNIT)
+ mutex_destroy(&isys->short_packet_tracing_mutex);
diff --git a/5.patch b/5.patch
new file mode 100644
index 0000000..899ef32
--- /dev/null
+++ b/5.patch
@@ -0,0 +1,117 @@
+From da1fb08fe045a83fbdc585490a3ce3bcc4c658e6 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 20:56:24 +0100
+Subject: [PATCH] ipu6-isys: Fix probe() failure with kernel >= 6.7
+
+media_entity_pads_init() from kernel >= 6.7 requires the passed
+in pads to have one of MEDIA_PAD_FL_SINK or MEDIA_PAD_FL_SOURCE
+set in their flags before calling media_entity_pads_init().
+
+The ipu6 code was only setting these flags later, causing
+media_entity_pads_init() to fail with -EINVAL causing ipu_isys_probe()
+to fail.
+
+Use the num_sink and num_source parameters to ipu_isys_subdev_init()
+to set the MEDIA_PAD_FL_SINK / _FL_SOURCE flags there before
+calling media_entity_pads_init() to fix this and drop the setting
+of these flags in the caller since this is no longer necessary.
+
+Closes:
https://github.com/intel/ipu6-drivers/issues/205
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/pci/intel/ipu-isys-csi2-be-soc.c | 3 ---
+ drivers/media/pci/intel/ipu-isys-csi2-be.c | 4 +---
+ drivers/media/pci/intel/ipu-isys-csi2.c | 4 +---
+ drivers/media/pci/intel/ipu-isys-subdev.c | 14 +++++++++++++-
+ drivers/media/pci/intel/ipu-isys-tpg.c | 1 -
+ 5 files changed, 15 insertions(+), 11 deletions(-)
+
+diff --git a/drivers/media/pci/intel/ipu-isys-csi2-be-soc.c
b/drivers/media/pci/intel/ipu-isys-csi2-be-soc.c
+index 2c94491480e1..e18176f4775a 100644
+--- a/drivers/media/pci/intel/ipu-isys-csi2-be-soc.c
++++ b/drivers/media/pci/intel/ipu-isys-csi2-be-soc.c
+@@ -298,9 +298,6 @@ int ipu_isys_csi2_be_soc_init(struct ipu_isys_csi2_be_soc
*csi2_be_soc,
+ if (rval)
+ goto fail;
+
+- csi2_be_soc->asd.pad[CSI2_BE_SOC_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
+- csi2_be_soc->asd.pad[CSI2_BE_SOC_PAD_SOURCE].flags =
+- MEDIA_PAD_FL_SOURCE;
+ csi2_be_soc->asd.valid_tgts[CSI2_BE_SOC_PAD_SOURCE].crop = true;
+
+ for (i = 0; i < NR_OF_CSI2_BE_SOC_PADS; i++)
+diff --git a/drivers/media/pci/intel/ipu-isys-csi2-be.c
b/drivers/media/pci/intel/ipu-isys-csi2-be.c
+index 1b885ef21e5b..b430a20e35ca 100644
+--- a/drivers/media/pci/intel/ipu-isys-csi2-be.c
++++ b/drivers/media/pci/intel/ipu-isys-csi2-be.c
+@@ -307,9 +307,7 @@ int ipu_isys_csi2_be_init(struct ipu_isys_csi2_be *csi2_be,
+ if (rval)
+ goto fail;
+
+- csi2_be->asd.pad[CSI2_BE_PAD_SINK].flags = MEDIA_PAD_FL_SINK
+- | MEDIA_PAD_FL_MUST_CONNECT;
+- csi2_be->asd.pad[CSI2_BE_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
++ csi2_be->asd.pad[CSI2_BE_PAD_SINK].flags |= MEDIA_PAD_FL_MUST_CONNECT;
+ csi2_be->asd.valid_tgts[CSI2_BE_PAD_SOURCE].crop = true;
+ csi2_be->asd.set_ffmt = csi2_be_set_ffmt;
+
+diff --git a/drivers/media/pci/intel/ipu-isys-csi2.c
b/drivers/media/pci/intel/ipu-isys-csi2.c
+index 4c47de9169a9..1f4df4cd88fa 100644
+--- a/drivers/media/pci/intel/ipu-isys-csi2.c
++++ b/drivers/media/pci/intel/ipu-isys-csi2.c
+@@ -536,9 +536,7 @@ int ipu_isys_csi2_init(struct ipu_isys_csi2 *csi2,
+ goto fail;
+ }
+
+- csi2->asd.pad[CSI2_PAD_SINK].flags = MEDIA_PAD_FL_SINK
+- | MEDIA_PAD_FL_MUST_CONNECT;
+- csi2->asd.pad[CSI2_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
++ csi2->asd.pad[CSI2_PAD_SINK].flags |= MEDIA_PAD_FL_MUST_CONNECT;
+
+ src = index;
+ csi2->asd.source = IPU_FW_ISYS_STREAM_SRC_CSI2_PORT0 + src;
+diff --git a/drivers/media/pci/intel/ipu-isys-subdev.c
b/drivers/media/pci/intel/ipu-isys-subdev.c
+index 5f6fa850b1a6..7bf736712727 100644
+--- a/drivers/media/pci/intel/ipu-isys-subdev.c
++++ b/drivers/media/pci/intel/ipu-isys-subdev.c
+@@ -787,7 +787,12 @@ int ipu_isys_subdev_init(struct ipu_isys_subdev *asd,
+ unsigned int num_sink,
+ unsigned int sd_flags)
+ {
+- int rval = -EINVAL;
++ int i, rval = -EINVAL;
++
++ if ((num_source + num_sink) != num_pads) {
++ dev_err(&asd->isys->adev->dev, "%s: invalid num pads, source, sink
combo\n", __func__);
++ return -EINVAL;
++ }
+
+ mutex_init(&asd->mutex);
+
+@@ -818,6 +823,13 @@ int ipu_isys_subdev_init(struct ipu_isys_subdev *asd,
+ !asd->valid_tgts)
+ return -ENOMEM;
+
++ for (i = 0; i < num_sink; i++)
++ asd->pad[i].flags = MEDIA_PAD_FL_SINK;
++
++ /* Continue from above loop */
++ for (;i < num_pads; i++)
++ asd->pad[i].flags = MEDIA_PAD_FL_SOURCE;
++
+ rval = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad);
+ if (rval) {
+ dev_err(&asd->isys->adev->dev, "%s: media_entity_pads_init(%d) err
%d\n", __func__, num_pads, rval);
+diff --git a/drivers/media/pci/intel/ipu-isys-tpg.c
b/drivers/media/pci/intel/ipu-isys-tpg.c
+index b8e3e1f9018b..c02770648729 100644
+--- a/drivers/media/pci/intel/ipu-isys-tpg.c
++++ b/drivers/media/pci/intel/ipu-isys-tpg.c
+@@ -291,7 +291,6 @@ int ipu_isys_tpg_init(struct ipu_isys_tpg *tpg,
+ #else
+ tpg->asd.sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;
+ #endif
+- tpg->asd.pad[TPG_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
+
+ tpg->asd.source = IPU_FW_ISYS_STREAM_SRC_MIPIGEN_PORT0 + index;
+ tpg->asd.supported_codes = tpg_supported_codes;
diff --git a/6.patch b/6.patch
new file mode 100644
index 0000000..ffd6b82
--- /dev/null
+++ b/6.patch
@@ -0,0 +1,692 @@
+From 491b191be833f385d94e3165ec278775736afa71 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 22:17:50 +0100
+Subject: [PATCH] Fix compilation with kernel >= 6.8
+
+1. Adjust for v4l2 subdev state API changes in 6.8.
+2. kernels >= 6.8 no longer have strlcpy use strscpy instead,
+ strscpy has been available since at least kernel 4.8.
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/media/i2c/gc5035.c | 19 +++++++++++++++++++
+ drivers/media/i2c/hi556.c | 13 ++++++++++---
+ drivers/media/i2c/hm11b1.c | 12 +++++++++---
+ drivers/media/i2c/hm2170.c | 13 +++++++++++++
+ drivers/media/i2c/hm2172.c | 13 +++++++++++++
+ drivers/media/i2c/ov01a10.c | 13 ++++++++++---
+ drivers/media/i2c/ov01a1s.c | 13 ++++++++++---
+ drivers/media/i2c/ov02c10.c | 13 ++++++++++---
+ drivers/media/i2c/ov02e10.c | 13 +++++++++++++
+ drivers/media/i2c/ov08a10.c | 13 +++++++++++++
+ drivers/media/i2c/ov2740.c | 13 ++++++++++---
+ drivers/media/i2c/ov8856.c | 13 ++++++++++---
+ drivers/media/pci/intel/cio2-bridge.c | 1 +
+ drivers/media/pci/intel/ipu-isys-subdev.c | 20 +++++++++++++++++---
+ drivers/media/pci/intel/ipu-isys-video.c | 6 +++---
+ drivers/media/pci/intel/ipu-isys.c | 4 ++--
+ drivers/media/pci/intel/ipu-psys.c | 2 +-
+ 17 files changed, 164 insertions(+), 30 deletions(-)
+
+diff --git a/drivers/media/i2c/gc5035.c b/drivers/media/i2c/gc5035.c
+index 16bbd4845b8d..b421f29d9186 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,13 +1722,21 @@ 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,
+ .set_fmt = gc5035_set_fmt,
+ };
+
++#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 const struct v4l2_subdev_ops gc5035_subdev_ops = {
+ .video = &gc5035_video_ops,
+ .pad = &gc5035_pad_ops,
+@@ -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");
+diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
+index 97c821cf9371..8f71d8562264 100644
+--- a/drivers/media/i2c/hi556.c
++++ b/drivers/media/i2c/hi556.c
+@@ -1058,8 +1058,10 @@ static int hi556_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ hi556->cur_mode = mode;
+@@ -1101,10 +1103,12 @@ static int hi556_get_format(struct v4l2_subdev *sd,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ fmt->format =
+ *v4l2_subdev_get_try_format(&hi556->sd, cfg, fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&hi556->sd,
+ sd_state,
+ fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ hi556_assign_pad_format(hi556->cur_mode, &fmt->format);
+@@ -1160,9 +1164,12 @@ static int hi556_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ hi556_assign_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ hi556_assign_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ hi556_assign_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&hi556->mutex);
+
+diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c
+index fa9da1b58b11..20a7f21a12a3 100644
+--- a/drivers/media/i2c/hm11b1.c
++++ b/drivers/media/i2c/hm11b1.c
+@@ -920,8 +920,10 @@ static int hm11b1_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ hm11b1->cur_mode = mode;
+@@ -961,9 +963,11 @@ static int hm11b1_get_format(struct v4l2_subdev *sd,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&hm11b1->sd, cfg,
+ fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&hm11b1->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ hm11b1_update_pad_format(hm11b1->cur_mode, &fmt->format);
+@@ -1019,8 +1023,10 @@ static int hm11b1_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ hm11b1_update_pad_format(&supported_modes[0],
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&hm11b1->mutex);
+
+diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c
+index 74638557f7da..ec5c5f5fa3b6 100644
+--- a/drivers/media/i2c/hm2170.c
++++ b/drivers/media/i2c/hm2170.c
+@@ -1065,7 +1065,11 @@ static int hm2170_set_format(struct v4l2_subdev *sd,
+ mutex_lock(&hm2170->mutex);
+ hm2170_update_pad_format(mode, &fmt->format);
+ 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 {
+ hm2170->cur_mode = mode;
+ __v4l2_ctrl_s_ctrl(hm2170->link_freq, mode->link_freq_index);
+@@ -1097,8 +1101,12 @@ static int hm2170_get_format(struct v4l2_subdev *sd,
+
+ mutex_lock(&hm2170->mutex);
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&hm2170->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
++#endif
+ else
+ hm2170_update_pad_format(hm2170->cur_mode, &fmt->format);
+
+@@ -1144,8 +1152,13 @@ static int hm2170_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ struct hm2170 *hm2170 = to_hm2170(sd);
+
+ mutex_lock(&hm2170->mutex);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ hm2170_update_pad_format(&supported_modes[hm2170->rev][0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ hm2170_update_pad_format(&supported_modes[hm2170->rev][0],
++ v4l2_subdev_state_get_format(fh->state, 0));
++#endif
+ mutex_unlock(&hm2170->mutex);
+
+ return 0;
+diff --git a/drivers/media/i2c/hm2172.c b/drivers/media/i2c/hm2172.c
+index 71cef03bfcb2..966c59392e28 100644
+--- a/drivers/media/i2c/hm2172.c
++++ b/drivers/media/i2c/hm2172.c
+@@ -1494,7 +1494,11 @@ static int hm2172_set_format(struct v4l2_subdev *sd,
+ mutex_lock(&hm2172->mutex);
+ hm2172_update_pad_format(mode, &fmt->format);
+ 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 {
+ hm2172->cur_mode = mode;
+ __v4l2_ctrl_s_ctrl(hm2172->link_freq, mode->link_freq_index);
+@@ -1526,8 +1530,12 @@ static int hm2172_get_format(struct v4l2_subdev *sd,
+
+ mutex_lock(&hm2172->mutex);
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&hm2172->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
++#endif
+ else
+ hm2172_update_pad_format(hm2172->cur_mode, &fmt->format);
+
+@@ -1571,8 +1579,13 @@ static int hm2172_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ struct hm2172 *hm2172 = to_hm2172(sd);
+
+ mutex_lock(&hm2172->mutex);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ hm2172_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ hm2172_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
++#endif
+ mutex_unlock(&hm2172->mutex);
+
+ return 0;
+diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
+index ae8024e88344..0050bff87389 100644
+--- a/drivers/media/i2c/ov01a10.c
++++ b/drivers/media/i2c/ov01a10.c
+@@ -752,8 +752,10 @@ static int ov01a10_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ ov01a10->cur_mode = mode;
+@@ -791,9 +793,11 @@ static int ov01a10_get_format(struct v4l2_subdev *sd,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov01a10->sd, cfg,
+ fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov01a10->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ ov01a10_update_pad_format(ov01a10->cur_mode, &fmt->format);
+@@ -849,9 +853,12 @@ static int ov01a10_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ ov01a10_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov01a10_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov01a10_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&ov01a10->mutex);
+
+diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
+index 0dcce8b492b4..923b12b2a948 100644
+--- a/drivers/media/i2c/ov01a1s.c
++++ b/drivers/media/i2c/ov01a1s.c
+@@ -832,8 +832,10 @@ static int ov01a1s_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ ov01a1s->cur_mode = mode;
+@@ -871,9 +873,11 @@ static int ov01a1s_get_format(struct v4l2_subdev *sd,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov01a1s->sd, cfg,
+ fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov01a1s->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ ov01a1s_update_pad_format(ov01a1s->cur_mode, &fmt->format);
+@@ -929,9 +933,12 @@ static int ov01a1s_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ ov01a1s_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov01a1s_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov01a1s_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&ov01a1s->mutex);
+
+diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c
+index 3f627442395c..5b159de84b2c 100644
+--- a/drivers/media/i2c/ov02c10.c
++++ b/drivers/media/i2c/ov02c10.c
+@@ -1176,8 +1176,10 @@ static int ov02c10_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ ov02c10->cur_mode = mode;
+@@ -1215,9 +1217,11 @@ static int ov02c10_get_format(struct v4l2_subdev *sd,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov02c10->sd, cfg,
+ fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov02c10->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ ov02c10_update_pad_format(ov02c10->cur_mode, &fmt->format);
+@@ -1273,9 +1277,12 @@ static int ov02c10_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ ov02c10_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov02c10_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov02c10_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&ov02c10->mutex);
+
+diff --git a/drivers/media/i2c/ov02e10.c b/drivers/media/i2c/ov02e10.c
+index ccdb7dae5ed6..5697f3c2d14e 100644
+--- a/drivers/media/i2c/ov02e10.c
++++ b/drivers/media/i2c/ov02e10.c
+@@ -877,8 +877,12 @@ static int ov02e10_set_format(struct v4l2_subdev *sd,
+ mutex_lock(&ov02e10->mutex);
+ ov02e10_update_pad_format(mode, &fmt->format);
+ 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 {
+ ov02e10->cur_mode = mode;
+ __v4l2_ctrl_s_ctrl(ov02e10->link_freq, mode->link_freq_index);
+@@ -910,8 +914,12 @@ static int ov02e10_get_format(struct v4l2_subdev *sd,
+
+ mutex_lock(&ov02e10->mutex);
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov02e10->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
++#endif
+ else
+ ov02e10_update_pad_format(ov02e10->cur_mode, &fmt->format);
+
+@@ -955,8 +963,13 @@ static int ov02e10_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ struct ov02e10 *ov02e10 = to_ov02e10(sd);
+
+ mutex_lock(&ov02e10->mutex);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov02e10_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov02e10_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
++#endif
+ mutex_unlock(&ov02e10->mutex);
+
+ return 0;
+diff --git a/drivers/media/i2c/ov08a10.c b/drivers/media/i2c/ov08a10.c
+index d47473528ad0..ceda341e6129 100644
+--- a/drivers/media/i2c/ov08a10.c
++++ b/drivers/media/i2c/ov08a10.c
+@@ -858,8 +858,12 @@ static int ov08a10_set_format(struct v4l2_subdev *sd,
+ mutex_lock(&ov08a10->mutex);
+ ov08a10_update_pad_format(mode, &fmt->format);
+ 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 {
+ ov08a10->cur_mode = mode;
+ __v4l2_ctrl_s_ctrl(ov08a10->link_freq, mode->link_freq_index);
+@@ -892,9 +896,13 @@ static int ov08a10_get_format(struct v4l2_subdev *sd,
+
+ mutex_lock(&ov08a10->mutex);
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov08a10->sd,
+ sd_state,
+ fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
++#endif
+ else
+ ov08a10_update_pad_format(ov08a10->cur_mode, &fmt->format);
+
+@@ -938,8 +946,13 @@ static int ov08a10_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ struct ov08a10 *ov08a10 = to_ov08a10(sd);
+
+ mutex_lock(&ov08a10->mutex);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov08a10_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov08a10_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
++#endif
+ mutex_unlock(&ov08a10->mutex);
+
+ return 0;
+diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c
+index f117173309aa..568831f00ecf 100644
+--- a/drivers/media/i2c/ov2740.c
++++ b/drivers/media/i2c/ov2740.c
+@@ -1115,8 +1115,10 @@ static int ov2740_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ ov2740->cur_mode = mode;
+@@ -1157,10 +1159,12 @@ static int ov2740_get_format(struct v4l2_subdev *sd,
+ fmt->format = *v4l2_subdev_get_try_format(&ov2740->sd,
+ cfg,
+ fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov2740->sd,
+ sd_state,
+ fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ ov2740_update_pad_format(ov2740->cur_mode, &fmt->format);
+@@ -1230,9 +1234,12 @@ static int ov2740_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ ov2740_update_pad_format(ov2740->cur_mode,
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov2740_update_pad_format(ov2740->cur_mode,
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov2740_update_pad_format(ov2740->cur_mode,
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&ov2740->mutex);
+
+diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c
+index b1e938e678c7..a66117db2015 100644
+--- a/drivers/media/i2c/ov8856.c
++++ b/drivers/media/i2c/ov8856.c
+@@ -1043,8 +1043,10 @@ static int ov8856_set_format(struct v4l2_subdev *sd,
+ if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ *v4l2_subdev_get_try_format(sd, cfg, fmt->pad) = fmt->format;
+-#else
++#elif 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 {
+ ov8856->cur_mode = mode;
+@@ -1085,9 +1087,11 @@ static int ov8856_get_format(struct v4l2_subdev *sd,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov8856->sd, cfg,
+ fmt->pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ fmt->format = *v4l2_subdev_get_try_format(&ov8856->sd,
+ sd_state, fmt->pad);
++#else
++ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad);
+ #endif
+ else
+ ov8856_update_pad_format(ov8856->cur_mode, &fmt->format);
+@@ -1144,9 +1148,12 @@ static int ov8856_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ ov8856_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->pad, 0));
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ ov8856_update_pad_format(&supported_modes[0],
+ v4l2_subdev_get_try_format(sd, fh->state, 0));
++#else
++ ov8856_update_pad_format(&supported_modes[0],
++ v4l2_subdev_state_get_format(fh->state, 0));
+ #endif
+ mutex_unlock(&ov8856->mutex);
+
+diff --git a/drivers/media/pci/intel/cio2-bridge.c
b/drivers/media/pci/intel/cio2-bridge.c
+index 4d4cf0a2e6e3..889e4195d509 100644
+--- a/drivers/media/pci/intel/cio2-bridge.c
++++ b/drivers/media/pci/intel/cio2-bridge.c
+@@ -9,6 +9,7 @@
+ #include <linux/version.h>
+ #include <media/v4l2-fwnode.h>
+
++#include "ipu.h"
+ #include "cio2-bridge.h"
+
+ /*
+diff --git a/drivers/media/pci/intel/ipu-isys-subdev.c
b/drivers/media/pci/intel/ipu-isys-subdev.c
+index 7bf736712727..b65d7bb2eaef 100644
+--- a/drivers/media/pci/intel/ipu-isys-subdev.c
++++ b/drivers/media/pci/intel/ipu-isys-subdev.c
+@@ -162,8 +162,10 @@ struct v4l2_mbus_framefmt *__ipu_isys_get_ffmt(struct v4l2_subdev
*sd,
+ return v4l2_subdev_get_try_format(cfg, pad);
+ #elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0)
+ return v4l2_subdev_get_try_format(sd, cfg, pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ return v4l2_subdev_get_try_format(sd, state, pad);
++#else
++ return v4l2_subdev_state_get_format(state, pad);
+ #endif
+ }
+
+@@ -199,11 +201,16 @@ struct v4l2_rect *__ipu_isys_get_selection(struct v4l2_subdev *sd,
+ return v4l2_subdev_get_try_crop(sd, cfg, pad);
+ case V4L2_SEL_TGT_COMPOSE:
+ return v4l2_subdev_get_try_compose(sd, cfg, pad);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ case V4L2_SEL_TGT_CROP:
+ return v4l2_subdev_get_try_crop(sd, state, pad);
+ case V4L2_SEL_TGT_COMPOSE:
+ return v4l2_subdev_get_try_compose(sd, state, pad);
++#else
++ case V4L2_SEL_TGT_CROP:
++ return v4l2_subdev_state_get_crop(state, pad);
++ case V4L2_SEL_TGT_COMPOSE:
++ return v4l2_subdev_state_get_compose(state, pad);
+ #endif
+ }
+ }
+@@ -755,13 +762,20 @@ int ipu_isys_subdev_open(struct v4l2_subdev *sd, struct
v4l2_subdev_fh *fh)
+ v4l2_subdev_get_try_crop(sd, fh->pad, i);
+ struct v4l2_rect *try_compose =
+ v4l2_subdev_get_try_compose(sd, fh->pad, i);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
+ struct v4l2_mbus_framefmt *try_fmt =
+ v4l2_subdev_get_try_format(sd, fh->state, i);
+ struct v4l2_rect *try_crop =
+ v4l2_subdev_get_try_crop(sd, fh->state, i);
+ struct v4l2_rect *try_compose =
+ v4l2_subdev_get_try_compose(sd, fh->state, i);
++#else
++ struct v4l2_mbus_framefmt *try_fmt =
++ v4l2_subdev_state_get_format(fh->state, i);
++ struct v4l2_rect *try_crop =
++ v4l2_subdev_state_get_crop(fh->state, i);
++ struct v4l2_rect *try_compose =
++ v4l2_subdev_state_get_compose(fh->state, i);
+ #endif
+
+ *try_fmt = asd->ffmt[i];
+diff --git a/drivers/media/pci/intel/ipu-isys-video.c
b/drivers/media/pci/intel/ipu-isys-video.c
+index 3ee79afef21c..11f17cd1faa1 100644
+--- a/drivers/media/pci/intel/ipu-isys-video.c
++++ b/drivers/media/pci/intel/ipu-isys-video.c
+@@ -359,8 +359,8 @@ int ipu_isys_vidioc_querycap(struct file *file, void *fh,
+ {
+ struct ipu_isys_video *av = video_drvdata(file);
+
+- strlcpy(cap->driver, IPU_ISYS_NAME, sizeof(cap->driver));
+- strlcpy(cap->card, av->isys->media_dev.model, sizeof(cap->card));
++ strscpy(cap->driver, IPU_ISYS_NAME, sizeof(cap->driver));
++ strscpy(cap->card, av->isys->media_dev.model, sizeof(cap->card));
+ snprintf(cap->bus_info, sizeof(cap->bus_info), "PCI:%s",
+ av->isys->media_dev.bus_info);
+ return 0;
+@@ -586,7 +586,7 @@ static int vidioc_enum_input(struct file *file, void *fh,
+ {
+ if (input->index > 0)
+ return -EINVAL;
+- strlcpy(input->name, "camera", sizeof(input->name));
++ strscpy(input->name, "camera", sizeof(input->name));
+ input->type = V4L2_INPUT_TYPE_CAMERA;
+
+ return 0;
+diff --git a/drivers/media/pci/intel/ipu-isys.c b/drivers/media/pci/intel/ipu-isys.c
+index 222c901b32a0..165d4b90e12c 100644
+--- a/drivers/media/pci/intel/ipu-isys.c
++++ b/drivers/media/pci/intel/ipu-isys.c
+@@ -985,14 +985,14 @@ static int isys_register_devices(struct ipu_isys *isys)
+ #else
+ isys->media_dev.link_notify = v4l2_pipeline_link_notify;
+ #endif
+- strlcpy(isys->media_dev.model,
++ strscpy(isys->media_dev.model,
+ IPU_MEDIA_DEV_MODEL_NAME, sizeof(isys->media_dev.model));
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0)
+ isys->media_dev.driver_version = LINUX_VERSION_CODE;
+ #endif
+ snprintf(isys->media_dev.bus_info, sizeof(isys->media_dev.bus_info),
+ "pci:%s", dev_name(isys->adev->dev.parent->parent));
+- strlcpy(isys->v4l2_dev.name, isys->media_dev.model,
++ strscpy(isys->v4l2_dev.name, isys->media_dev.model,
+ sizeof(isys->v4l2_dev.name));
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
+diff --git a/drivers/media/pci/intel/ipu-psys.c b/drivers/media/pci/intel/ipu-psys.c
+index 8e8e200677cb..a698edb51d7a 100644
+--- a/drivers/media/pci/intel/ipu-psys.c
++++ b/drivers/media/pci/intel/ipu-psys.c
+@@ -1647,7 +1647,7 @@ static int ipu_psys_probe(struct ipu_bus_device *adev)
+ }
+
+ /* Add the hw stepping information to caps */
+- strlcpy(psys->caps.dev_model, IPU_MEDIA_DEV_MODEL_NAME,
++ strscpy(psys->caps.dev_model, IPU_MEDIA_DEV_MODEL_NAME,
+ sizeof(psys->caps.dev_model));
+
+ pm_runtime_set_autosuspend_delay(&psys->adev->dev,
diff --git a/intel-ipu6-kmod.spec b/intel-ipu6-kmod.spec
index 3dd4194..5afedbf 100644
--- a/intel-ipu6-kmod.spec
+++ b/intel-ipu6-kmod.spec
@@ -3,12 +3,12 @@
%global debug_package %{nil}
%endif
-%global ipu6_commit 8e410803b5d31c2c5bf32961f786d205ba6acc5d
-%global ipu6_commitdate 20230622
+%global ipu6_commit fb4c17019c9ede9412065d61ecd352cdf1c0e7af
+%global ipu6_commitdate 20240226
%global ipu6_shortcommit %(c=%{ipu6_commit}; echo ${c:0:7})
-%global ivsc_commit e8ea8b825217091fa91c9b3cb68cee4101d416e2
-%global ivsc_commitdate 20231009
+%global ivsc_commit 73a044d9633212fac54ea96cdd882ff5ab40573e
+%global ivsc_commitdate 20231109
%global ivsc_shortcommit %(c=%{ivsc_commit}; echo ${c:0:7})
%global prjname intel-ipu6
@@ -16,7 +16,7 @@
Name: %{prjname}-kmod
Summary: Kernel module (kmod) for %{prjname}
Version: 0.0
-Release: 10.%{ipu6_commitdate}git%{ipu6_shortcommit}%{?dist}
+Release: 11.%{ipu6_commitdate}git%{ipu6_shortcommit}%{?dist}
License: GPLv2+
URL:
https://github.com/intel
@@ -25,9 +25,17 @@ Source1:
%{url}/ipu6-drivers/archive/%{ipu6_commit}/ipu6-drivers-%{ipu6_s
# Patches
-Patch10: 0001-ipu-psys-Fix-compilation-with-kernels-6.5.0.patch
-Patch11: 0001-ipu6-Fix-compilation-with-kernels-6.6.0.patch
-Patch12: 0001-spi-vsc-Call-acpi_dev_clear_dependencies.patch
+#
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/ivsc-driver/pull/44
+Patch17: vsc-44.patch
BuildRequires: gcc
BuildRequires: elfutils-libelf-devel
@@ -54,12 +62,17 @@ kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname
%{prjname} %{?buil
%setup -q -c -a 1
(cd ipu6-drivers-%{ipu6_commit}
-%patch10 -p1
-%patch11 -p1
+%patch 10 -p1
+%patch 11 -p1
+%patch 12 -p1
+%patch 13 -p1
+%patch 14 -p1
+%patch 15 -p1
+%patch 16 -p1
)
(cd ivsc-driver-%{ivsc_commit}
-%patch12 -p1
+%patch 17 -p1
)
cp -Rp ivsc-driver-%{ivsc_commit}/backport-include ipu6-drivers-%{ipu6_commit}/
@@ -89,22 +102,18 @@ for kernel_version in %{?kernel_versions}; do
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%%___*}/gpio-ljca.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/gpio-ljca.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/i2c-ljca.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/i2c-ljca.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/intel_vsc.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/intel_vsc.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/ljca.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ljca.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/mei-vsc.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/mei-vsc.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/mei_ace.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/mei_ace.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/mei_ace_debug.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/mei_ace_debug.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/mei_csi.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/mei_csi.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/mei_pse.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/mei_pse.ko
- install -D -m 755 _kmod_build_${kernel_version%%___*}/spi-ljca.ko
%{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/spi-ljca.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
done
%{?akmod_install}
%changelog
+* Thu Mar 07 2024 Kate Hsuan <hpa(a)redhat.com> - 0.0-11.20240226gitfb4c170
+- Fix for kernel >= 6.7
+- Fix and improve ipu6_isys probe()
+- Skip ljca driver when the system runs the kernel >= 6.7
+
* Sat Nov 4 2023 Hans de Goede <hdegoede(a)redhat.com> - 0.0-10.20230622git8e41080
- Add "spi_vsc: Call acpi_dev_clear_dependencies()" patch to fix laptops
with iVSC chip no longer working with 6.6 kernels
diff --git a/sources b/sources
index c427ed3..333b367 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-SHA512 (ipu6-drivers-8e41080.tar.gz) =
53ea2da2d34e6a046aafe4ac2bb66e9330b727332dcefeebb00bc0727995b6bfeaa43b9e8d93008b67b3b2e18b8fc4a79d843ea4a440cde74bcb1d3d8d78c2fc
-SHA512 (ivsc-driver-e8ea8b8.tar.gz) =
95eca44ecff6e657abd861a7ca63312d134110f6ec62fd8941d6b94040291d54f97dfd01775fa41f6487eb2adb9a69afdc1a6bba7ece0d491c050ba263fa041d
+SHA512 (ipu6-drivers-fb4c170.tar.gz) =
1722fb07428844303f5b8f6694691f19db90651119db5cd90e665019101c3b6c46e82232a9bf87abaf2c982ce01bf7a672d584b03eab5c9810bf74840e02f055
+SHA512 (ivsc-driver-73a044d.tar.gz) =
b43b51fb7a08fc619333796eb76098173da1919ba0f008d46900269b01e076baa203c714abbb677825d1070905f1cca0a124a02dedc023e9ac2ecf72b62cdf71
diff --git a/vsc-44.patch b/vsc-44.patch
new file mode 100644
index 0000000..79d7591
--- /dev/null
+++ b/vsc-44.patch
@@ -0,0 +1,124 @@
+From 368285d0401703c2243b2c122e2d80c49cb2ae83 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 21:44:24 +0100
+Subject: [PATCH 1/2] ljca: s/strlcpy/strcpy/
+
+kernels >= 6.8 no longer have strlcpy use strscpy instead,
+strscpy has been available since at least kernel 4.8 .
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/mfd/ljca.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mfd/ljca.c b/drivers/mfd/ljca.c
+index 9a416d3..ec03417 100644
+--- a/drivers/mfd/ljca.c
++++ b/drivers/mfd/ljca.c
+@@ -221,7 +221,7 @@ static int try_match_acpi_hid(struct acpi_device *child, char **hids,
int hids_n
+ int i;
+
+ for (i = 0; i < hids_num; i++) {
+- strlcpy(ids[0].id, hids[i], sizeof(ids[0].id));
++ strscpy(ids[0].id, hids[i], sizeof(ids[0].id));
+ if (!acpi_match_device_ids(child, ids))
+ return i;
+ }
+
+From 0e1aa89783c7c17dcf8dbe184a286eb787f783d0 Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede(a)redhat.com>
+Date: Tue, 5 Mar 2024 21:46:20 +0100
+Subject: [PATCH 2/2] ljca: Fix 6.8 compiler warnings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+1. Fix compiler warnings from the newly enabled (in 6.8) -Wmissing-prototypes
+warning option.
+
+2. Fix following warning caused by changes in struct spi_device:
+drivers/spi/spi-ljca.c:216:39: warning: format ‘%d’ expects argument of type ‘int’, but
argument 4 has type ‘u8 *’ {aka ‘unsigned char *’} [-Wformat=]
+ 216 | dev_dbg(&ljca_spi->pdev->dev, "cs %d\n",
spi->chip_select);
+Rather then adding a ifdef on the kernel version for this just
+drop the dev_dbg().
+
+Signed-off-by: Hans de Goede <hdegoede(a)redhat.com>
+---
+ drivers/gpio/gpio-ljca.c | 4 ++--
+ drivers/mfd/ljca.c | 2 +-
+ drivers/misc/ivsc/mei_ace.c | 6 +++---
+ drivers/spi/spi-ljca.c | 4 ----
+ 4 files changed, 6 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/gpio/gpio-ljca.c b/drivers/gpio/gpio-ljca.c
+index 0041d26..bea39b6 100644
+--- a/drivers/gpio/gpio-ljca.c
++++ b/drivers/gpio/gpio-ljca.c
+@@ -253,8 +253,8 @@ static void ljca_gpio_async(struct work_struct *work)
+ }
+ }
+
+-void ljca_gpio_event_cb(struct platform_device *pdev, u8 cmd,
+- const void *evt_data, int len)
++static void ljca_gpio_event_cb(struct platform_device *pdev, u8 cmd,
++ const void *evt_data, int len)
+ {
+ const struct gpio_packet *packet = evt_data;
+ struct ljca_gpio_dev *ljca_gpio = platform_get_drvdata(pdev);
+diff --git a/drivers/mfd/ljca.c b/drivers/mfd/ljca.c
+index ec03417..2de6faa 100644
+--- a/drivers/mfd/ljca.c
++++ b/drivers/mfd/ljca.c
+@@ -320,7 +320,7 @@ static bool ljca_validate(void *data, u32 data_len)
+ return (header->len + sizeof(*header) == data_len);
+ }
+
+-void ljca_dump(struct ljca_dev *ljca, void *buf, int len)
++static void ljca_dump(struct ljca_dev *ljca, void *buf, int len)
+ {
+ int i;
+ u8 tmp[256] = { 0 };
+diff --git a/drivers/misc/ivsc/mei_ace.c b/drivers/misc/ivsc/mei_ace.c
+index 025fd7d..415a8e4 100644
+--- a/drivers/misc/ivsc/mei_ace.c
++++ b/drivers/misc/ivsc/mei_ace.c
+@@ -311,21 +311,21 @@ static int set_camera_ownership(struct mei_ace *ace,
+ return ret;
+ }
+
+-int ipu_own_camera(void *ace, struct camera_status *status)
++static int ipu_own_camera(void *ace, struct camera_status *status)
+ {
+ struct mei_ace *p_ace = (struct mei_ace *)ace;
+
+ return set_camera_ownership(p_ace, IPU_OWN_CAMERA, status);
+ }
+
+-int ace_own_camera(void *ace, struct camera_status *status)
++static int ace_own_camera(void *ace, struct camera_status *status)
+ {
+ struct mei_ace *p_ace = (struct mei_ace *)ace;
+
+ return set_camera_ownership(p_ace, ACE_OWN_CAMERA, status);
+ }
+
+-int get_camera_status(void *ace, struct camera_status *status)
++static int get_camera_status(void *ace, struct camera_status *status)
+ {
+ int ret;
+ struct ace_cmd cmd;
+diff --git a/drivers/spi/spi-ljca.c b/drivers/spi/spi-ljca.c
+index adcd00f..f11556d 100644
+--- a/drivers/spi/spi-ljca.c
++++ b/drivers/spi/spi-ljca.c
+@@ -210,10 +210,6 @@ static int ljca_spi_transfer(struct ljca_spi_dev *ljca_spi, const u8
*tx_data,
+ static int ljca_spi_prepare_message(struct spi_master *master,
+ struct spi_message *message)
+ {
+- struct ljca_spi_dev *ljca_spi = spi_master_get_devdata(master);
+- struct spi_device *spi = message->spi;
+-
+- dev_dbg(&ljca_spi->pdev->dev, "cs %d\n", spi->chip_select);
+ return 0;
+ }
+