Message ID | 20221226155029.244355-5-mcanal@igalia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Convert drivers to the new debugfs device-centered functions | expand |
Hi Maíra, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on drm-intel/for-linux-next drm-intel/for-linux-next-fixes drm-tip/drm-tip linus/master v6.2-rc2 next-20230105] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Ma-ra-Canal/drm-etnaviv-use-new-debugfs-device-centered-functions/20221226-235457 base: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next patch link: https://lore.kernel.org/r/20221226155029.244355-5-mcanal%40igalia.com patch subject: [PATCH 4/9] drm/pl111: use new debugfs device-centered functions config: arm-buildonly-randconfig-r004-20230101 compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 8d9828ef5aa9688500657d36cd2aefbe12bbd162) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://github.com/intel-lab-lkp/linux/commit/9df6e851a016b03f144896a5a05b461402f3770b git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Ma-ra-Canal/drm-etnaviv-use-new-debugfs-device-centered-functions/20221226-235457 git checkout 9df6e851a016b03f144896a5a05b461402f3770b # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> All errors (new ones prefixed by >>): >> ld.lld: error: undefined symbol: pl111_debugfs_init >>> referenced by pl111_drv.c >>> drivers/gpu/drm/pl111/pl111_drv.o:(pl111_amba_probe) in archive vmlinux.a
diff --git a/drivers/gpu/drm/pl111/pl111_debugfs.c b/drivers/gpu/drm/pl111/pl111_debugfs.c index 6744fa16f464..458f69e5435e 100644 --- a/drivers/gpu/drm/pl111/pl111_debugfs.c +++ b/drivers/gpu/drm/pl111/pl111_debugfs.c @@ -32,8 +32,8 @@ static const struct { static int 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); } diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h index 2a46b5bd8576..7fe74be917f1 100644 --- a/drivers/gpu/drm/pl111/pl111_drm.h +++ b/drivers/gpu/drm/pl111/pl111_drm.h @@ -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_ */ diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 00deba0b7271..c031eb4abc0d 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -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;
Replace the use of drm_debugfs_create_files() with the new drm_debugfs_add_file() function, which center the debugfs files management on the drm_device instead of drm_minor. Moreover, remove the debugfs_init hook and add the debugfs files directly on pl111_amba_probe(), before drm_dev_register(). Signed-off-by: Maíra Canal <mcanal@igalia.com> --- drivers/gpu/drm/pl111/pl111_debugfs.c | 15 ++++----------- drivers/gpu/drm/pl111/pl111_drm.h | 2 +- drivers/gpu/drm/pl111/pl111_drv.c | 6 ++---- 3 files changed, 7 insertions(+), 16 deletions(-)