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, 6 Jul 2020 09:09:48 +0000 (18:09 +0900)
commit1bc22260ed1dee26eaa638b335e44ea871a50b65
treeed7fb61a737b974635cbb1f6f49ecba0d4da4d78
parent643514a67dabcf292a1932a0a99c4f11760f3568
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