[PATCH v3 8/8] drm/tinydrm: Use drm_gem_cma_print_info()

Daniel Vetter daniel at ffwll.ch
Mon Oct 30 10:31:51 UTC 2017


On Thu, Oct 26, 2017 at 06:57:31PM +0200, Noralf Trønnes wrote:
> Use drm_gem_cma_print_info() instead of drm_fb_cma_debugfs_show()
> to print framebuffer/gem info to debugfs. The debugfs file is now:
> <debugfs>/dri/<n>/framebuffer
> 
> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
> ---
>  drivers/gpu/drm/tinydrm/mipi-dbi.c | 8 +-------
>  include/drm/tinydrm/tinydrm.h      | 1 +
>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tinydrm/mipi-dbi.c b/drivers/gpu/drm/tinydrm/mipi-dbi.c
> index d43e992ab432..347f9b226f26 100644
> --- a/drivers/gpu/drm/tinydrm/mipi-dbi.c
> +++ b/drivers/gpu/drm/tinydrm/mipi-dbi.c
> @@ -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);
>  
> diff --git a/include/drm/tinydrm/tinydrm.h b/include/drm/tinydrm/tinydrm.h
> index 4774fe3d4273..423828922e5a 100644
> --- a/include/drm/tinydrm/tinydrm.h
> +++ b/include/drm/tinydrm/tinydrm.h
> @@ -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, \

I think a DRM_GEM_CMA_DRIVER_OPS like we have for FOPS might be nice
eventually. But probably better to go through with all the other
refactoring. For patches 4-8 (since Ville reviewed the first 3 already):

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> -- 
> 2.14.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list