@@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
pl111_drm-y += pl111_display.o \
pl111_versatile.o \
- pl111_drv.o
+ pl111_drv.o \
+ pl111_debugfs.o
pl111_drm-$(CONFIG_ARCH_NOMADIK) += pl111_nomadik.o
-pl111_drm-$(CONFIG_DEBUG_FS) += pl111_debugfs.o
obj-$(CONFIG_DRM_PL111) += pl111_drm.o
@@ -30,10 +30,10 @@ static const struct {
REGDEF(CLCD_PL111_LCUR),
};
-static int pl111_debugfs_regs(struct seq_file *m, void *unused)
+static int __maybe_unused pl111_debugfs_regs(struct seq_file *m, void *unused)
{
- struct drm_info_node *node = (struct drm_info_node *)m->private;
- struct drm_device *dev = node->minor->dev;
+ struct drm_debugfs_entry *entry = m->private;
+ struct drm_device *dev = entry->dev;
struct pl111_drm_dev_private *priv = dev->dev_private;
int i;
@@ -46,14 +46,7 @@ static int pl111_debugfs_regs(struct seq_file *m, void *unused)
return 0;
}
-static const struct drm_info_list pl111_debugfs_list[] = {
- {"regs", pl111_debugfs_regs, 0},
-};
-
-void
-pl111_debugfs_init(struct drm_minor *minor)
+void pl111_debugfs_init(struct drm_device *drm)
{
- drm_debugfs_create_files(pl111_debugfs_list,
- ARRAY_SIZE(pl111_debugfs_list),
- minor->debugfs_root, minor);
+ drm_debugfs_add_file(drm, "regs", pl111_debugfs_regs, NULL);
}
@@ -157,6 +157,6 @@ struct pl111_drm_dev_private {
int pl111_display_init(struct drm_device *dev);
irqreturn_t pl111_irq(int irq, void *data);
-void pl111_debugfs_init(struct drm_minor *minor);
+void pl111_debugfs_init(struct drm_device *drm);
#endif /* _PL111_DRM_H_ */
@@ -228,10 +228,6 @@ static const struct drm_driver pl111_drm_driver = {
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_import_sg_table = pl111_gem_import_sg_table,
.gem_prime_mmap = drm_gem_prime_mmap,
-
-#if defined(CONFIG_DEBUG_FS)
- .debugfs_init = pl111_debugfs_init,
-#endif
};
static int pl111_amba_probe(struct amba_device *amba_dev,
@@ -304,6 +300,8 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
if (ret != 0)
goto dev_put;
+ pl111_debugfs_init(drm);
+
ret = drm_dev_register(drm, 0);
if (ret < 0)
goto dev_put;