Toshaan Bharvani
4 months ago
commit
fd502f467d
4 changed files with 562 additions and 0 deletions
@ -0,0 +1,32 @@
@@ -0,0 +1,32 @@
|
||||
From c93409cfdb39fb13e2f92bae6314a1403496e8e0 Mon Sep 17 00:00:00 2001 |
||||
From: Hans de Goede <hdegoede@redhat.com> |
||||
Date: Mon, 28 Aug 2023 15:19:16 +0200 |
||||
Subject: [PATCH] ipu-psys: Fix compilation with kernels >= 6.5.0 |
||||
|
||||
Kernel 6.5 has removed the last parameter from |
||||
get_user_pages(). Adjust the code accordingly. |
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||
--- |
||||
drivers/media/pci/intel/ipu-psys.c | 4 ++++ |
||||
1 file changed, 4 insertions(+) |
||||
|
||||
diff --git a/drivers/media/pci/intel/ipu-psys.c b/drivers/media/pci/intel/ipu-psys.c |
||||
index 2e40849..f1a0ab4 100644 |
||||
--- a/drivers/media/pci/intel/ipu-psys.c |
||||
+++ b/drivers/media/pci/intel/ipu-psys.c |
||||
@@ -218,7 +218,11 @@ static int ipu_psys_get_userpages(struct ipu_dma_buf_attach *attach) |
||||
#else |
||||
FOLL_WRITE, |
||||
#endif |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0) |
||||
pages, NULL); |
||||
+#else |
||||
+ pages); |
||||
+#endif |
||||
if (nr < npages) |
||||
goto error_up_read; |
||||
} |
||||
-- |
||||
2.41.0 |
||||
|
@ -0,0 +1,363 @@
@@ -0,0 +1,363 @@
|
||||
From 6d44fd57f373ea12f4f8d47883be29f749ab1704 Mon Sep 17 00:00:00 2001 |
||||
From: Hans de Goede <hdegoede@redhat.com> |
||||
Date: Mon, 28 Aug 2023 17:05:16 +0200 |
||||
Subject: [PATCH] ipu6: Fix compilation with kernels >= 6.6.0 |
||||
|
||||
Kernel 6.6 has made some significant changes to how v4l2-async |
||||
(sub)dev registration works. Adjust the code accordingly. |
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||
--- |
||||
drivers/media/i2c/gc5035.c | 4 + |
||||
drivers/media/i2c/hi556.c | 4 + |
||||
drivers/media/i2c/hm11b1.c | 4 + |
||||
drivers/media/i2c/hm2170.c | 4 + |
||||
drivers/media/i2c/ov01a10.c | 4 + |
||||
drivers/media/i2c/ov01a1s.c | 4 + |
||||
drivers/media/i2c/ov02c10.c | 4 + |
||||
drivers/media/i2c/ov2740.c | 4 + |
||||
drivers/media/i2c/ov8856.c | 4 + |
||||
drivers/media/pci/intel/ipu-isys.c | 78 +++++++++++++++++++- |
||||
drivers/media/pci/intel/ipu6/ipu6-isys-phy.c | 14 +++- |
||||
include/media/ipu-isys.h | 5 ++ |
||||
12 files changed, 130 insertions(+), 3 deletions(-) |
||||
|
||||
diff --git a/drivers/media/i2c/gc5035.c b/drivers/media/i2c/gc5035.c |
||||
index b46fd5474..25f08ccf4 100644 |
||||
--- a/drivers/media/i2c/gc5035.c |
||||
+++ b/drivers/media/i2c/gc5035.c |
||||
@@ -2188,7 +2188,11 @@ static struct i2c_driver gc5035_i2c_driver = { |
||||
.acpi_match_table = ACPI_PTR(gc5035_acpi_ids), |
||||
.of_match_table = gc5035_of_match, |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = gc5035_probe, |
||||
+#else |
||||
+ .probe = gc5035_probe, |
||||
+#endif |
||||
.remove = gc5035_remove, |
||||
}; |
||||
module_i2c_driver(gc5035_i2c_driver); |
||||
diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c |
||||
index 574eb3f14..658a8aab8 100644 |
||||
--- a/drivers/media/i2c/hi556.c |
||||
+++ b/drivers/media/i2c/hi556.c |
||||
@@ -1220,7 +1220,11 @@ static struct i2c_driver hi556_i2c_driver = { |
||||
.pm = &hi556_pm_ops, |
||||
.acpi_match_table = ACPI_PTR(hi556_acpi_ids), |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = hi556_probe, |
||||
+#else |
||||
+ .probe = hi556_probe, |
||||
+#endif |
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0) |
||||
.remove = hi556_remove_bp, |
||||
#else |
||||
diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c |
||||
index 071cb0607..9bfc51d69 100644 |
||||
--- a/drivers/media/i2c/hm11b1.c |
||||
+++ b/drivers/media/i2c/hm11b1.c |
||||
@@ -1228,7 +1228,11 @@ static struct i2c_driver hm11b1_i2c_driver = { |
||||
.pm = &hm11b1_pm_ops, |
||||
.acpi_match_table = ACPI_PTR(hm11b1_acpi_ids), |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = hm11b1_probe, |
||||
+#else |
||||
+ .probe = hm11b1_probe, |
||||
+#endif |
||||
.remove = hm11b1_remove, |
||||
}; |
||||
|
||||
diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c |
||||
index 0c55a78ae..3660d1bc0 100644 |
||||
--- a/drivers/media/i2c/hm2170.c |
||||
+++ b/drivers/media/i2c/hm2170.c |
||||
@@ -1307,7 +1307,11 @@ static struct i2c_driver hm2170_i2c_driver = { |
||||
.pm = &hm2170_pm_ops, |
||||
.acpi_match_table = hm2170_acpi_ids, |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = hm2170_probe, |
||||
+#else |
||||
+ .probe = hm2170_probe, |
||||
+#endif |
||||
.remove = hm2170_remove, |
||||
}; |
||||
|
||||
diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c |
||||
index 9b12fbc2e..ddd36d9f4 100644 |
||||
--- a/drivers/media/i2c/ov01a10.c |
||||
+++ b/drivers/media/i2c/ov01a10.c |
||||
@@ -989,7 +989,11 @@ static struct i2c_driver ov01a10_i2c_driver = { |
||||
.pm = &ov01a10_pm_ops, |
||||
.acpi_match_table = ACPI_PTR(ov01a10_acpi_ids), |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = ov01a10_probe, |
||||
+#else |
||||
+ .probe = ov01a10_probe, |
||||
+#endif |
||||
.remove = ov01a10_remove, |
||||
}; |
||||
|
||||
diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c |
||||
index d46f895a5..15481b572 100644 |
||||
--- a/drivers/media/i2c/ov01a1s.c |
||||
+++ b/drivers/media/i2c/ov01a1s.c |
||||
@@ -1131,7 +1131,11 @@ static struct i2c_driver ov01a1s_i2c_driver = { |
||||
.pm = &ov01a1s_pm_ops, |
||||
.acpi_match_table = ACPI_PTR(ov01a1s_acpi_ids), |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = ov01a1s_probe, |
||||
+#else |
||||
+ .probe = ov01a1s_probe, |
||||
+#endif |
||||
.remove = ov01a1s_remove, |
||||
}; |
||||
|
||||
diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c |
||||
index 9fe5e9127..da31e4104 100644 |
||||
--- a/drivers/media/i2c/ov02c10.c |
||||
+++ b/drivers/media/i2c/ov02c10.c |
||||
@@ -1405,7 +1405,11 @@ static struct i2c_driver ov02c10_i2c_driver = { |
||||
.pm = &ov02c10_pm_ops, |
||||
.acpi_match_table = ACPI_PTR(ov02c10_acpi_ids), |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = ov02c10_probe, |
||||
+#else |
||||
+ .probe = ov02c10_probe, |
||||
+#endif |
||||
.remove = ov02c10_remove, |
||||
}; |
||||
|
||||
diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c |
||||
index 293c1b693..8d22688ff 100644 |
||||
--- a/drivers/media/i2c/ov2740.c |
||||
+++ b/drivers/media/i2c/ov2740.c |
||||
@@ -1583,7 +1583,11 @@ static struct i2c_driver ov2740_i2c_driver = { |
||||
.pm = &ov2740_pm_ops, |
||||
.acpi_match_table = ov2740_acpi_ids, |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = ov2740_probe, |
||||
+#else |
||||
+ .probe = ov2740_probe, |
||||
+#endif |
||||
.remove = ov2740_remove, |
||||
}; |
||||
|
||||
diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c |
||||
index 07b4d16e7..b1e938e67 100644 |
||||
--- a/drivers/media/i2c/ov8856.c |
||||
+++ b/drivers/media/i2c/ov8856.c |
||||
@@ -1308,7 +1308,11 @@ static struct i2c_driver ov8856_i2c_driver = { |
||||
.pm = &ov8856_pm_ops, |
||||
.acpi_match_table = ACPI_PTR(ov8856_acpi_ids), |
||||
}, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
.probe_new = ov8856_probe, |
||||
+#else |
||||
+ .probe = ov8856_probe, |
||||
+#endif |
||||
.remove = ov8856_remove, |
||||
.id_table = ov8856_id_table, |
||||
}; |
||||
diff --git a/drivers/media/pci/intel/ipu-isys.c b/drivers/media/pci/intel/ipu-isys.c |
||||
index d4a76f0f4..4089141ad 100644 |
||||
--- a/drivers/media/pci/intel/ipu-isys.c |
||||
+++ b/drivers/media/pci/intel/ipu-isys.c |
||||
@@ -720,7 +720,11 @@ static int isys_iwake_watermark_cleanup(struct ipu_isys *isys) |
||||
/* The .bound() notifier callback when a match is found */ |
||||
static int isys_notifier_bound(struct v4l2_async_notifier *notifier, |
||||
struct v4l2_subdev *sd, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
struct v4l2_async_subdev *asd) |
||||
+#else |
||||
+ struct v4l2_async_connection *asd) |
||||
+#endif |
||||
{ |
||||
struct ipu_isys *isys = container_of(notifier, |
||||
struct ipu_isys, notifier); |
||||
@@ -736,7 +740,11 @@ static int isys_notifier_bound(struct v4l2_async_notifier *notifier, |
||||
|
||||
static void isys_notifier_unbind(struct v4l2_async_notifier *notifier, |
||||
struct v4l2_subdev *sd, |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
struct v4l2_async_subdev *asd) |
||||
+#else |
||||
+ struct v4l2_async_connection *asd) |
||||
+#endif |
||||
{ |
||||
struct ipu_isys *isys = container_of(notifier, |
||||
struct ipu_isys, notifier); |
||||
@@ -760,6 +768,7 @@ static const struct v4l2_async_notifier_operations isys_async_ops = { |
||||
.complete = isys_notifier_complete, |
||||
}; |
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
static int isys_fwnode_parse(struct device *dev, |
||||
struct v4l2_fwnode_endpoint *vep, |
||||
struct v4l2_async_subdev *asd) |
||||
@@ -772,6 +781,7 @@ static int isys_fwnode_parse(struct device *dev, |
||||
|
||||
return 0; |
||||
} |
||||
+#endif |
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && LINUX_VERSION_CODE != KERNEL_VERSION(5, 15, 71) |
||||
static int isys_notifier_init(struct ipu_isys *isys) |
||||
@@ -814,7 +824,7 @@ static void isys_notifier_cleanup(struct ipu_isys *isys) |
||||
v4l2_async_notifier_unregister(&isys->notifier); |
||||
v4l2_async_notifier_cleanup(&isys->notifier); |
||||
} |
||||
-#else |
||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
static int isys_notifier_init(struct ipu_isys *isys) |
||||
{ |
||||
struct ipu_device *isp = isys->adev->isp; |
||||
@@ -847,7 +857,73 @@ static int isys_notifier_init(struct ipu_isys *isys) |
||||
|
||||
return ret; |
||||
} |
||||
+#else |
||||
+static int isys_notifier_init(struct ipu_isys *isys) |
||||
+{ |
||||
+ const struct ipu_isys_internal_csi2_pdata *csi2 = |
||||
+ &isys->pdata->ipdata->csi2; |
||||
+ struct ipu_device *isp = isys->adev->isp; |
||||
+ struct device *dev = &isp->pdev->dev; |
||||
+ unsigned int i; |
||||
+ int ret; |
||||
+ |
||||
+ v4l2_async_nf_init(&isys->notifier, &isys->v4l2_dev); |
||||
+ |
||||
+ for (i = 0; i < csi2->nports; i++) { |
||||
+ struct v4l2_fwnode_endpoint vep = { |
||||
+ .bus_type = V4L2_MBUS_CSI2_DPHY |
||||
+ }; |
||||
+ struct sensor_async_subdev *s_asd; |
||||
+ struct fwnode_handle *ep; |
||||
+ |
||||
+ ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(dev), i, 0, |
||||
+ FWNODE_GRAPH_ENDPOINT_NEXT); |
||||
+ if (!ep) |
||||
+ continue; |
||||
+ |
||||
+ ret = v4l2_fwnode_endpoint_parse(ep, &vep); |
||||
+ if (ret) |
||||
+ goto err_parse; |
||||
+ |
||||
+ s_asd = v4l2_async_nf_add_fwnode_remote(&isys->notifier, ep, |
||||
+ struct |
||||
+ sensor_async_subdev); |
||||
+ if (IS_ERR(s_asd)) { |
||||
+ ret = PTR_ERR(s_asd); |
||||
+ goto err_parse; |
||||
+ } |
||||
+ |
||||
+ s_asd->csi2.port = vep.base.port; |
||||
+ s_asd->csi2.nlanes = vep.bus.mipi_csi2.num_data_lanes; |
||||
+ |
||||
+ fwnode_handle_put(ep); |
||||
+ |
||||
+ continue; |
||||
+ |
||||
+err_parse: |
||||
+ fwnode_handle_put(ep); |
||||
+ return ret; |
||||
+ } |
||||
+ |
||||
+ if (list_empty(&isys->notifier.waiting_list)) { |
||||
+ /* isys probe could continue with async subdevs missing */ |
||||
+ dev_warn(&isys->adev->dev, "no subdev found in graph\n"); |
||||
+ return 0; |
||||
+ } |
||||
+ |
||||
+ isys->notifier.ops = &isys_async_ops; |
||||
+ ret = v4l2_async_nf_register(&isys->notifier); |
||||
+ if (ret) { |
||||
+ dev_err(&isys->adev->dev, |
||||
+ "failed to register async notifier : %d\n", ret); |
||||
+ v4l2_async_nf_cleanup(&isys->notifier); |
||||
+ } |
||||
+ |
||||
+ return ret; |
||||
+} |
||||
+#endif |
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) || LINUX_VERSION_CODE == KERNEL_VERSION(5, 15, 71) |
||||
static void isys_notifier_cleanup(struct ipu_isys *isys) |
||||
{ |
||||
v4l2_async_nf_unregister(&isys->notifier); |
||||
diff --git a/drivers/media/pci/intel/ipu6/ipu6-isys-phy.c b/drivers/media/pci/intel/ipu6/ipu6-isys-phy.c |
||||
index c26780106..d2f4f74b6 100644 |
||||
--- a/drivers/media/pci/intel/ipu6/ipu6-isys-phy.c |
||||
+++ b/drivers/media/pci/intel/ipu6/ipu6-isys-phy.c |
||||
@@ -504,11 +504,16 @@ int ipu6_isys_phy_common_init(struct ipu_isys *isys) |
||||
struct ipu_bus_device *adev = to_ipu_bus_device(&isys->adev->dev); |
||||
struct ipu_device *isp = adev->isp; |
||||
void __iomem *isp_base = isp->base; |
||||
- struct v4l2_async_subdev *asd; |
||||
struct sensor_async_subdev *s_asd; |
||||
unsigned int i; |
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
+ struct v4l2_async_subdev *asd; |
||||
list_for_each_entry(asd, &isys->notifier.asd_list, asd_list) { |
||||
+#else |
||||
+ struct v4l2_async_connection *asd; |
||||
+ list_for_each_entry(asd, &isys->notifier.done_list, asc_entry) { |
||||
+#endif |
||||
s_asd = container_of(asd, struct sensor_async_subdev, asd); |
||||
phy_id = s_asd->csi2.port / 4; |
||||
phy_base = isp_base + IPU6_ISYS_PHY_BASE(phy_id); |
||||
@@ -562,12 +567,17 @@ int ipu6_isys_phy_config(struct ipu_isys *isys) |
||||
struct ipu_device *isp = adev->isp; |
||||
void __iomem *isp_base = isp->base; |
||||
const struct phy_reg **phy_config_regs; |
||||
- struct v4l2_async_subdev *asd; |
||||
struct sensor_async_subdev *s_asd; |
||||
struct ipu_isys_csi2_config cfg; |
||||
int i; |
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
+ struct v4l2_async_subdev *asd; |
||||
list_for_each_entry(asd, &isys->notifier.asd_list, asd_list) { |
||||
+#else |
||||
+ struct v4l2_async_connection *asd; |
||||
+ list_for_each_entry(asd, &isys->notifier.done_list, asc_entry) { |
||||
+#endif |
||||
s_asd = container_of(asd, struct sensor_async_subdev, asd); |
||||
cfg.port = s_asd->csi2.port; |
||||
cfg.nlanes = s_asd->csi2.nlanes; |
||||
diff --git a/include/media/ipu-isys.h b/include/media/ipu-isys.h |
||||
index b75febf80..0b0caab1b 100644 |
||||
--- a/include/media/ipu-isys.h |
||||
+++ b/include/media/ipu-isys.h |
||||
@@ -6,6 +6,7 @@ |
||||
|
||||
#include <linux/i2c.h> |
||||
#include <linux/clkdev.h> |
||||
+#include <linux/version.h> |
||||
#include <media/v4l2-async.h> |
||||
|
||||
#define IPU_ISYS_MAX_CSI2_LANES 4 |
||||
@@ -37,7 +38,11 @@ struct ipu_isys_subdev_pdata { |
||||
}; |
||||
|
||||
struct sensor_async_subdev { |
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) |
||||
struct v4l2_async_subdev asd; |
||||
+#else |
||||
+ struct v4l2_async_connection asd; |
||||
+#endif |
||||
struct ipu_isys_csi2_config csi2; |
||||
}; |
||||
|
||||
-- |
||||
2.40.1 |
||||
|
@ -0,0 +1,40 @@
@@ -0,0 +1,40 @@
|
||||
From 02c2eb5c3a1f25edd80f36f64b1eb8564421a762 Mon Sep 17 00:00:00 2001 |
||||
From: Hans de Goede <hdegoede@redhat.com> |
||||
Date: Thu, 2 Nov 2023 13:15:17 +0100 |
||||
Subject: [PATCH] spi-vsc: Call acpi_dev_clear_dependencies() |
||||
|
||||
Since mainline kernel commit 7f6fd06d34f4 ("ACPI: scan: Defer enumeration |
||||
of devices with a _DEP pointing to IVSC device") the i2c-client for |
||||
sensors with an ACPI _DEP on the iVSC will no longer get instantiated |
||||
until acpi_dev_clear_dependencies() is called for that _DEP. |
||||
|
||||
Make get_sensor_name() which already looks-up a reference to |
||||
the correct adev call acpi_dev_clear_dependencies(). For the out of |
||||
tree version of the iVSC drivers when acpi_dev_clear_dependencies() |
||||
is called exactly does not matter since sensor drivers explicitly |
||||
call vsc_acquire_camera_sensor() before probing. |
||||
|
||||
Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
||||
--- |
||||
drivers/misc/mei/spi-vsc.c | 5 +++++ |
||||
1 file changed, 5 insertions(+) |
||||
|
||||
diff --git a/drivers/misc/mei/spi-vsc.c b/drivers/misc/mei/spi-vsc.c |
||||
index fb2c310..459125e 100644 |
||||
--- a/drivers/misc/mei/spi-vsc.c |
||||
+++ b/drivers/misc/mei/spi-vsc.c |
||||
@@ -123,6 +123,11 @@ static int get_sensor_name(struct mei_device *dev) |
||||
*c = tolower(*c); |
||||
|
||||
ACPI_FREE(buffer.pointer); |
||||
+ |
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) |
||||
+ acpi_dev_clear_dependencies(adev); |
||||
+#endif |
||||
+ |
||||
return 0; |
||||
} |
||||
|
||||
-- |
||||
2.41.0 |
||||
|
@ -0,0 +1,127 @@
@@ -0,0 +1,127 @@
|
||||
%global buildforkernels akmod |
||||
%global debug_package %{nil} |
||||
%global ipu6_commit 8e410803b5d31c2c5bf32961f786d205ba6acc5d |
||||
%global ipu6_commitdate 20230622 |
||||
%global ipu6_shortcommit %(c=%{ipu6_commit}; echo ${c:0:7}) |
||||
%global ivsc_commit e8ea8b825217091fa91c9b3cb68cee4101d416e2 |
||||
%global ivsc_commitdate 20231009 |
||||
%global ivsc_shortcommit %(c=%{ivsc_commit}; echo ${c:0:7}) |
||||
%global prjname intel-ipu6 |
||||
|
||||
Name: %{prjname}-kmod |
||||
Summary: Kernel module (kmod) for %{prjname} |
||||
Version: 0.0 |
||||
Release: 10.%{ipu6_commitdate}git%{ipu6_shortcommit}%{?dist} |
||||
License: GPLv2+ |
||||
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 |
||||
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 |
||||
BuildRequires: gcc |
||||
BuildRequires: elfutils-libelf-devel |
||||
BuildRequires: kmodtool |
||||
%{!?kernels:BuildRequires: buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu} } |
||||
# kmodtool does its magic here |
||||
%{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}. |
||||
|
||||
|
||||
%prep |
||||
# error out if there was something wrong with kmodtool |
||||
%{?kmodtool_check} |
||||
# print kmodtool output for debugging purposes: |
||||
kmodtool --target %{_target_cpu} --repo rpmfusion --kmodname %{prjname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null |
||||
%setup -q -c -a 1 |
||||
(cd ipu6-drivers-%{ipu6_commit} |
||||
%patch10 -p1 |
||||
%patch11 -p1 |
||||
) |
||||
(cd ivsc-driver-%{ivsc_commit} |
||||
%patch12 -p1 |
||||
) |
||||
cp -Rp ivsc-driver-%{ivsc_commit}/backport-include ipu6-drivers-%{ipu6_commit}/ |
||||
cp -Rp ivsc-driver-%{ivsc_commit}/drivers ipu6-drivers-%{ipu6_commit}/ |
||||
cp -Rp ivsc-driver-%{ivsc_commit}/include ipu6-drivers-%{ipu6_commit}/ |
||||
for kernel_version in %{?kernel_versions} ; do |
||||
cp -a ipu6-drivers-%{ipu6_commit}/ _kmod_build_${kernel_version%%___*} |
||||
done |
||||
|
||||
|
||||
%build |
||||
for kernel_version in %{?kernel_versions} ; do |
||||
make -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} modules |
||||
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%%___*}/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 |
||||
chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko |
||||
done |
||||
%{?akmod_install} |
||||
|
||||
|
||||
%changelog |
||||
* Sat Nov 4 2023 Hans de Goede <hdegoede@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 |
||||
|
||||
* Tue Oct 10 2023 Hans de Goede <hdegoede@redhat.com> - 0.0-9.20230622git8e41080 |
||||
- Updated ivsc-driver to commit e8ea8b825217091fa91c9b3cb68cee4101d416e2 |
||||
- This fixes the camera not working on some Dell laptops |
||||
- Update patch to fix building against 6.6 kernels |
||||
|
||||
* Thu Aug 31 2023 Kate Hsuan <hpa@redhat.com> - 0.0-8.20230622git8e41080 |
||||
- Support for 6.6 kernel |
||||
|
||||
* Tue Aug 29 2023 Kate Hsuan <hpa@redhat.com> - 0.0-7.20230622git8e41080 |
||||
- Support for 6.5 kernel |
||||
|
||||
* Mon Aug 7 2023 Kate Hsuan <hpa@redhat.com> - 0.0-6.20230622git8e41080 |
||||
- Updated ipu6-driver to commit 8e410803b5d31c2c5bf32961f786d205ba6acc5d |
||||
- Updated ivsc-driver to commit cce4377f1539f3e7e8d8b45fbe23e87828ed1deb |
||||
|
||||
* Thu Aug 03 2023 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 0.0-5.20230220gitdfedab0 |
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild |
||||
|
||||
* Wed May 10 2023 Kate Hsuan <hpa@redhat.com> - 0.0-4.20230220gitdfedab0 |
||||
- Updated ipu6-driver commit to dfedab03f3856010d37968cb384696038c73c984 |
||||
- Updated ivsc-driver commit to c8db12b907e2e455d4d5586e5812d1ae0eebd571 |
||||
|
||||
* Tue Mar 28 2023 Kate Hsuan <hpa@redhat.com> - 0.0-3.20230117gitf83b074 |
||||
- Fix typo |
||||
|
||||
* Mon Feb 6 2023 Kate Hsuan <hpa@redhat.com> - 0.0-2.20230117gitf83b074 |
||||
- Update ipu6 and ivsc driver |
||||
|
||||
* Wed Oct 26 2022 Kate Hsuan <hpa@redhat.com> - 0.0.1 |
||||
- First release |
Loading…
Reference in new issue