[PATCH 0/2] drm/etnaviv: Implement drm_gem_object_funcs::print_info()

Sui Jingfeng sui.jingfeng at linux.dev
Sun Aug 25 21:19:27 UTC 2024


It will be called by drm_gem_print_info() if have implemented, and this can
provide more information about the framebuffer objects. In order to make
the newly implemented etnaviv_gem_object_funcs::print_info() get in use,
we make the drm_gem_print_info() exported, then we re-implement the
etnaviv_gem_describe() base on it.

Sample Testing Information:

[root at fedora 0]# ls
clients  DPI-1	    encoder-1	 gem_names	   mm	 ring
crtc-0	 DPI-2	    framebuffer  gpu		   mmu	 state
crtc-1	 encoder-0  gem		 internal_clients  name
[root at fedora 0]# cat framebuffer 
framebuffer[49]:
	allocated by = Xorg
	refcount=1
	format=AR24 little-endian (0x34325241)
	modifier=0x0
	size=32x32
	layers:
		size[0]=32x32
		pitch[0]=128
		offset[0]=0
		obj[0]:
			name=0
			refcount=3
			start=00040096
			size=16384
			imported=no
			caching mode=write-combine
			active=no
			vaddr=0000000000000000
framebuffer[47]:
	allocated by = Xorg
	refcount=2
	format=XR24 little-endian (0x34325258)
	modifier=0x0
	size=1024x600
	layers:
		size[0]=1024x600
		pitch[0]=4096
		offset[0]=0
		obj[0]:
			name=0
			refcount=3
			start=00040000
			size=2457600
			imported=no
			caching mode=write-combine
			active=no
			vaddr=0000000000000000
			
[root at fedora 0]# cat gem
obj[0]:
	name=0
	refcount=3
	start=00040000
	size=2457600
	imported=no
	caching mode=write-combine
	active=no
	vaddr=0000000000000000
obj[1]:
	name=0
	refcount=3
	start=00040096
	size=16384
	imported=no
	caching mode=write-combine
	active=no
	vaddr=0000000000000000
obj[2]:
	name=0
	refcount=2
	start=00040097
	size=16384
	imported=no
	caching mode=write-combine
	active=no
	vaddr=0000000000000000
Total 3 objects, 2490368 bytes

Sui Jingfeng (2):
  drm/etnaviv: Implement drm_gem_object_funcs::print_info()
  drm/etnaviv: Export drm_gem_print_info() and use it

 drivers/gpu/drm/drm_gem.c             |  1 +
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 43 ++++++++++++++++++++++-----
 drivers/gpu/drm/etnaviv/etnaviv_gem.h |  2 +-
 include/drm/drm_gem.h                 |  2 ++
 4 files changed, 40 insertions(+), 8 deletions(-)

-- 
2.34.1



More information about the dri-devel mailing list