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)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Tue, 11 Jun 2019 00:35:50 +0000 (09:35 +0900)
commit3029fcd04ed8fd30bdf23cce18c93551537051a5
tree2d23e0961021e1b3209a85d624f6096debec3506
parentfca84bf1b7e1b81891656998c8f471dae2a0190e
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