@@ -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
@@ -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 */
@@ -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
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@collabora.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(+)