[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240813210555.607641-5-daniel.almeida@collabora.com>
Date: Tue, 13 Aug 2024 18:05:46 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: liviu.dudau@....com,
steven.price@....com,
carsten.haitzler@....com,
boris.brezillon@...labora.com,
robh@...nel.org,
faith.ekstrand@...labora.com
Cc: Daniel Almeida <daniel.almeida@...labora.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/5] drm: panthor: add debugfs support in panthor_sched
In preparation for future patches, add support for debugfs in
panthor_sched.c.
Follow-up patches will make use of debugfs files to control aspects of
the dumping process.
Signed-off-by: Daniel Almeida <daniel.almeida@...labora.com>
---
drivers/gpu/drm/panthor/panthor_drv.c | 1 +
drivers/gpu/drm/panthor/panthor_sched.c | 9 +++++++++
drivers/gpu/drm/panthor/panthor_sched.h | 7 +++++++
3 files changed, 17 insertions(+)
diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c
index fb30e119d9bf..bb759baa98bd 100644
--- a/drivers/gpu/drm/panthor/panthor_drv.c
+++ b/drivers/gpu/drm/panthor/panthor_drv.c
@@ -1374,6 +1374,7 @@ static const struct file_operations panthor_drm_driver_fops = {
static void panthor_debugfs_init(struct drm_minor *minor)
{
panthor_mmu_debugfs_init(minor);
+ panthor_sched_debugfs_init(minor);
}
#endif
diff --git a/drivers/gpu/drm/panthor/panthor_sched.c b/drivers/gpu/drm/panthor/panthor_sched.c
index 59c30b311ee9..afd644c7d9f1 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.c
+++ b/drivers/gpu/drm/panthor/panthor_sched.c
@@ -3602,3 +3602,12 @@ int panthor_sched_init(struct panthor_device *ptdev)
ptdev->scheduler = sched;
return 0;
}
+
+#ifdef CONFIG_DEBUG_FS
+void panthor_sched_debugfs_init(struct drm_minor *minor)
+{
+ struct panthor_device *ptdev =
+ container_of(minor->dev, struct panthor_device, base);
+ struct panthor_scheduler *sched = ptdev->scheduler;
+}
+#endif /* CONFIG_DEBUG_FS */
diff --git a/drivers/gpu/drm/panthor/panthor_sched.h b/drivers/gpu/drm/panthor/panthor_sched.h
index 9a5b53498dcc..88871f38c1ab 100644
--- a/drivers/gpu/drm/panthor/panthor_sched.h
+++ b/drivers/gpu/drm/panthor/panthor_sched.h
@@ -8,6 +8,7 @@ struct drm_exec;
struct dma_fence;
struct drm_file;
struct drm_gem_object;
+struct drm_minor;
struct drm_sched_job;
struct drm_panthor_group_create;
struct drm_panthor_queue_create;
@@ -57,4 +58,10 @@ void panthor_sched_resume(struct panthor_device *ptdev);
void panthor_sched_report_mmu_fault(struct panthor_device *ptdev);
void panthor_sched_report_fw_events(struct panthor_device *ptdev, u32 events);
+#ifdef CONFIG_DEBUG_FS
+void panthor_sched_debugfs_init(struct drm_minor *minor);
+#else
+static inline void panthor_sched_debugfs_init(struct drm_minor *minor) {}
+#endif /* CONFIG_DEBUG_FS */
+
#endif
--
2.45.2
Powered by blists - more mailing lists