[PATCH v3 0/8] drm/framebuffer: Add framebuffer debugfs file

Noralf Trønnes noralf at tronnes.org
Thu Oct 26 16:57:23 UTC 2017


This patchset adds a debugfs file that prints info about the
framebuffers.

This version has a lot of changes since the previous version. The
previous version was inspired by drm_fb_cma_debugfs_show(), but this one
strictly follows 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.

I've also converted the cma helper so I could add the driver callback.
If this approach turns out to be the way to go, I'll convert hdlcd and
tilcdc as well in the next version so I can remove
drm_fb_cma_debugfs_show().

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
<...>


Noralf Trønnes (8):
  drm/vma-manager: drm_vma_node_start() constify argument
  drm/framebuffer: drm_framebuffer_read_refcount() constify argument
  drm/gem: Remove trailing whitespace
  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/tinydrm: Use drm_gem_cma_print_info()

 drivers/gpu/drm/drm_atomic.c         | 18 ++---------
 drivers/gpu/drm/drm_debugfs.c        |  6 ++++
 drivers/gpu/drm/drm_framebuffer.c    | 59 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_gem.c            | 21 +++++++++++--
 drivers/gpu/drm/drm_gem_cma_helper.c | 19 ++++++++++++
 drivers/gpu/drm/drm_internal.h       |  7 +++++
 drivers/gpu/drm/drm_print.c          | 21 +++++++++++++
 drivers/gpu/drm/tinydrm/mipi-dbi.c   |  8 +----
 include/drm/drm_drv.h                | 11 +++++++
 include/drm/drm_framebuffer.h        |  2 +-
 include/drm/drm_gem_cma_helper.h     |  5 ++-
 include/drm/drm_print.h              |  2 ++
 include/drm/drm_vma_manager.h        |  2 +-
 include/drm/tinydrm/tinydrm.h        |  1 +
 14 files changed, 155 insertions(+), 27 deletions(-)

--
2.14.2



More information about the dri-devel mailing list