drm/vc4: Add gem_info node via debugfs for vc5 81/285881/1
authorHoegeun Kwon <hoegeun.kwon@gmail.com>
Mon, 19 Dec 2022 06:57:39 +0000 (15:57 +0900)
committerHoegeun Kwon <hoegeun.kwon@samsung.com>
Thu, 22 Dec 2022 05:15:30 +0000 (14:15 +0900)
commitd10b9501cfb259a542dcc3e6350c282d4fad39c0
tree030b4597bf092842cc8892e94af43e25f5670ed1
parent9207775bc721220b6430b153a21cfe4a57d30c0d
drm/vc4: Add gem_info node via debugfs for vc5

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.

The prime fd created in vc4, but handled in v3d, modified to hanle
this in vc4.

Change-Id: Ideab3ecf282b77247f9b3706ee7e46747b2d0762
Signed-off-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
drivers/gpu/drm/vc4/vc4_debugfs.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h