1- From da41fbb54f5d8141ef93e2eaefb286c59fdca7db Mon Sep 17 00:00:00 2001
2- From: hepengpx <pengpengx.he @intel.com>
3- Date: Fri, 25 Apr 2025 09:44:01 +0800
1+ From 9be3f6b342f17152516e3e0f226e669df83bd7bd Mon Sep 17 00:00:00 2001
2+ From: linya14x <linx.yang @intel.com>
3+ Date: Mon, 13 Oct 2025 15:11:55 +0800
44Subject: [PATCH] Support IPU6 PSYS FW trace dump for upstream driver
5-
6- Signed-off-by: hepengpx <
[email protected] >
75---
86 drivers/media/pci/intel/ipu6/ipu6-trace.c | 6 +++
97 drivers/media/pci/intel/ipu6/ipu6-trace.h | 1 +
@@ -38,7 +36,7 @@ index f66d8898b1db..fe89d1b203b6 100644
3836+ bool is_ipu_trace_enable(void);
3937 #endif
4038diff --git a/drivers/media/pci/intel/ipu6/psys/ipu-psys.c b/drivers/media/pci/intel/ipu6/psys/ipu-psys.c
41- index 9f367496cbd0..e8638a918215 100644
39+ index d3422ea20e51..be71ba4518ad 100644
4240--- a/drivers/media/pci/intel/ipu6/psys/ipu-psys.c
4341+++ b/drivers/media/pci/intel/ipu6/psys/ipu-psys.c
4442@@ -31,6 +31,7 @@
@@ -49,7 +47,7 @@ index 9f367496cbd0..e8638a918215 100644
4947
5048 static bool async_fw_init;
5149 module_param(async_fw_init, bool, 0664);
52- @@ -1201 ,6 +1202 ,8 @@ static int ipu_psys_sched_cmd(void *ptr)
50+ @@ -1179 ,6 +1180 ,8 @@ static int ipu_psys_sched_cmd(void *ptr)
5351 return 0;
5452 }
5553
@@ -58,7 +56,7 @@ index 9f367496cbd0..e8638a918215 100644
5856 static void start_sp(struct ipu6_bus_device *adev)
5957 {
6058 struct ipu_psys *psys = ipu6_bus_get_drvdata(adev);
61- @@ -1211 ,7 +1214 ,7 @@ static void start_sp(struct ipu6_bus_device *adev)
59+ @@ -1189 ,7 +1192 ,7 @@ static void start_sp(struct ipu6_bus_device *adev)
6260 val |= IPU6_PSYS_SPC_STATUS_START |
6361 IPU6_PSYS_SPC_STATUS_RUN |
6462 IPU6_PSYS_SPC_STATUS_CTRL_ICACHE_INVALIDATE;
@@ -67,7 +65,7 @@ index 9f367496cbd0..e8638a918215 100644
6765 IPU6_PSYS_SPC_STATUS_ICACHE_PREFETCH : 0;
6866 writel(val, spc_regs_base + IPU6_PSYS_REG_SPC_STATUS_CTRL);
6967 }
70- @@ -1304 ,6 +1307 ,40 @@ static void run_fw_init_work(struct work_struct *work)
68+ @@ -1282 ,6 +1285 ,40 @@ static void run_fw_init_work(struct work_struct *work)
7169 }
7270 }
7371
@@ -108,7 +106,7 @@ index 9f367496cbd0..e8638a918215 100644
108106 static int ipu6_psys_probe(struct auxiliary_device *auxdev,
109107 const struct auxiliary_device_id *auxdev_id)
110108 {
111- @@ -1442 ,6 +1479 ,9 @@ static int ipu6_psys_probe(struct auxiliary_device *auxdev,
109+ @@ -1432 ,6 +1469 ,9 @@ static int ipu6_psys_probe(struct auxiliary_device *auxdev,
112110 strscpy(psys->caps.dev_model, IPU6_MEDIA_DEV_MODEL_NAME,
113111 sizeof(psys->caps.dev_model));
114112
@@ -118,15 +116,15 @@ index 9f367496cbd0..e8638a918215 100644
118116 mutex_unlock(&ipu_psys_mutex);
119117
120118 dev_info(dev, "psys probe minor: %d\n", minor);
121- @@ -1503,6 +1543,8 @@ static void ipu6_psys_remove(struct auxiliary_device *auxdev)
122-
119+ @@ -1500,6 +1540,8 @@ static void ipu6_psys_remove(struct auxiliary_device *auxdev)
123120 clear_bit(MINOR(psys->cdev.dev), ipu_psys_devices);
121+ cdev_del(&psys->cdev);
124122
125123+ ipu_trace_uninit(&auxdev->dev);
126124+
127125 mutex_unlock(&ipu_psys_mutex);
128126
129127 mutex_destroy(&psys->mutex);
130128- -
131- 2.34.1
129+ 2.43.0
132130
0 commit comments