drm/tinydrm: Use drm_gem_cma_print_info()
authorNoralf Trønnes <noralf@tronnes.org>
Tue, 7 Nov 2017 19:13:47 +0000 (20:13 +0100)
committerNoralf Trønnes <noralf@tronnes.org>
Sat, 11 Nov 2017 10:24:44 +0000 (11:24 +0100)
There is a new core debugfs file that prints fb/gem info:
<debugfs>/dri/<n>/framebuffer

Use drm_gem_cma_print_info() to provide info to that output instead
of using drm_fb_cma_debugfs_show().

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171107191348.17555-12-noralf@tronnes.org
drivers/gpu/drm/tinydrm/mipi-dbi.c
include/drm/tinydrm/tinydrm.h

index d43e992ab432f0cf1978426c589605ebf0eeaaea..347f9b226f26764dac1d6739c961700dfbffce4b 100644 (file)
@@ -961,10 +961,6 @@ static const struct file_operations mipi_dbi_debugfs_command_fops = {
        .write = mipi_dbi_debugfs_command_write,
 };
 
-static const struct drm_info_list mipi_dbi_debugfs_list[] = {
-       { "fb",   drm_fb_cma_debugfs_show, 0 },
-};
-
 /**
  * mipi_dbi_debugfs_init - Create debugfs entries
  * @minor: DRM minor
@@ -987,9 +983,7 @@ int mipi_dbi_debugfs_init(struct drm_minor *minor)
        debugfs_create_file("command", mode, minor->debugfs_root, mipi,
                            &mipi_dbi_debugfs_command_fops);
 
-       return drm_debugfs_create_files(mipi_dbi_debugfs_list,
-                                       ARRAY_SIZE(mipi_dbi_debugfs_list),
-                                       minor->debugfs_root, minor);
+       return 0;
 }
 EXPORT_SYMBOL(mipi_dbi_debugfs_init);
 
index 4774fe3d427393ef7e1809b1512d7b8c3ada6870..423828922e5ab637d0395b261c319ed986b7ed5b 100644 (file)
@@ -46,6 +46,7 @@ pipe_to_tinydrm(struct drm_simple_display_pipe *pipe)
  */
 #define TINYDRM_GEM_DRIVER_OPS \
        .gem_free_object        = tinydrm_gem_cma_free_object, \
+       .gem_print_info         = drm_gem_cma_print_info, \
        .gem_vm_ops             = &drm_gem_cma_vm_ops, \
        .prime_handle_to_fd     = drm_gem_prime_handle_to_fd, \
        .prime_fd_to_handle     = drm_gem_prime_fd_to_handle, \