drm/vc4: Add gem_info node via debugfs
authorHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 4 Jun 2020 09:04:31 +0000 (18:04 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Mon, 7 Feb 2022 07:09:31 +0000 (16:09 +0900)
commitdea4ace78ec70271809431885e4b16d4cea777e3
treeaa57fac8728859512691834690b9866a05f6c09c
parentedd2f335ddae06fd0ef303f7f39118fd99a4ffaa
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 common helpers for
debugfs.

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.

This patch referenced [1] and a modified debugfs interface was applied.
  [1] f7a145cb5173 drm/vc4: add gem_info node via debugfs

Change-Id: Ifbbf4c94ad1c54a682083ed7d30555d8b57164eb
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h