drm/vc4: add gem_info node via debugfs
authorJoonyoung Shim <jy0922.shim@samsung.com>
Thu, 23 Mar 2017 06:11:01 +0000 (15:11 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 4 Nov 2019 09:00:55 +0000 (18:00 +0900)
commiteb13175b9a7c634937040fd53ab5d5dae5d76c7c
tree0eab38e2a7678f4eed5b8f0bd367d78550ea80d8
parent356b917b3fedc0e34446282fe8bfd3b98026e1f4
drm/vc4: add gem_info node via debugfs

The memps requires gem_info with gem_names to analyze graphics
shared memory, so this patch adds gem_info node via debugfs
interface.

Let's save pid/tgid in private file data only once when gem object is
created or prime_fd is imported and use them on gem_info. This is to
solve the wrong pid problem of gem_info created as different processes
share fd of drm device node.

Change-Id: Iaac2ccd63e124dd11a894f0e88ddbb533750f3d4
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
[sw0312.kim: fix wrong printing format in gem_info debugfs for 32bit arm build with %zx]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_debugfs.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h