This patchset adds a debugfs file that prints info about the framebuffers. I have followed the style of drm_state_info(). This means that the added drm_framebuffer_print_info() could also be used in drm_atomic_plane_print_state(). In order to do that I had to add a way to vary indentation to fit both use cases. Changes in this version is turning drm_printf_indent() into a macro and converting the rest of the cma helper drivers. This is how it looks: $ sudo cat /sys/kernel/debug/dri/0/framebuffer framebuffer[33]: refcount=3 format=RG16 little-endian (0x36314752) modifier=0x0 size=320x240 layers: size[0]=320x240 pitch[0]=640 offset[0]=0 obj[0]: name=0 refcount=1 start=00010000 size=155648 imported=no paddr=0x17c80000 vaddr=d7c80000 $ sudo cat /sys/kernel/debug/dri/0/state plane[28]: plane-0 crtc=crtc-0 fb=33 refcount=3 format=RG16 little-endian (0x36314752) modifier=0x0 size=320x240 layers: size[0]=320x240 pitch[0]=640 offset[0]=0 obj[0]: name=0 refcount=1 start=00010000 size=155648 imported=no paddr=0x17c80000 vaddr=d7c80000 crtc-pos=320x240+0+0 src-pos=320.000000x240.000000+0.000000+0.000000 rotation=1 crtc[29]: crtc-0 <snip> Changes since version 3: - Applied patch: drm/gem: Remove trailing whitespace - Turn drm_printf_indent() into a macro (Ville) - drm_printf_indent() add overflow marker (Jani) - Converted arc, hdlcd, tilcdc and removed drm_fb_cma_debugfs_show() Noralf Trønnes (11): drm/vma-manager: drm_vma_node_start() constify argument drm/framebuffer: drm_framebuffer_read_refcount() constify argument drm/print: Add drm_printf_indent() drm/framebuffer: Add framebuffer debugfs file drm/atomic: Use drm_framebuffer_print_info() drm/cma-helper: Add drm_gem_cma_print_info() drm/arc: Use drm_gem_cma_print_info() drm/arm/hdlcd: Use drm_gem_cma_print_info() drm/tilcdc: Use drm_gem_cma_print_info() drm/tinydrm: Use drm_gem_cma_print_info() drm/cma-helper: Remove drm_fb_cma_debugfs_show() drivers/gpu/drm/arc/arcpgu_drv.c | 2 +- drivers/gpu/drm/arm/hdlcd_drv.c | 2 +- drivers/gpu/drm/drm_atomic.c | 18 ++--------- drivers/gpu/drm/drm_debugfs.c | 6 ++++ drivers/gpu/drm/drm_fb_cma_helper.c | 37 ---------------------- drivers/gpu/drm/drm_framebuffer.c | 59 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_gem.c | 17 +++++++++++ drivers/gpu/drm/drm_gem_cma_helper.c | 31 ++++++++----------- drivers/gpu/drm/drm_internal.h | 7 +++++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 2 +- drivers/gpu/drm/tinydrm/mipi-dbi.c | 8 +---- include/drm/drm_drv.h | 11 +++++++ include/drm/drm_fb_cma_helper.h | 6 ---- include/drm/drm_framebuffer.h | 2 +- include/drm/drm_gem_cma_helper.h | 7 ++--- include/drm/drm_print.h | 8 +++++ include/drm/drm_vma_manager.h | 2 +- include/drm/tinydrm/tinydrm.h | 1 + 18 files changed, 133 insertions(+), 93 deletions(-) -- 2.14.2 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel