aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/drm/freedreno_bo.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-11-30 08:29:51 -0500
committerRob Clark <[email protected]>2018-12-13 15:51:01 -0500
commit4cd016b5d6a8f3baeea8850deeb528d5febf4784 (patch)
tree47bf18bb1f67cd9c27e500549c6743649a17a8d7 /src/freedreno/drm/freedreno_bo.c
parent7ef722861b691ce99be3827ed05f8c0ddf2cd66e (diff)
freedreno: debug GEM obj names
With a recent enough kernel, set debug names for GEM BOs, which will show up in $debugfs/gem Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/drm/freedreno_bo.c')
-rw-r--r--src/freedreno/drm/freedreno_bo.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/freedreno/drm/freedreno_bo.c b/src/freedreno/drm/freedreno_bo.c
index ec46e16e9e9..7449160f137 100644
--- a/src/freedreno/drm/freedreno_bo.c
+++ b/src/freedreno/drm/freedreno_bo.c
@@ -105,7 +105,7 @@ bo_new(struct fd_device *dev, uint32_t size, uint32_t flags,
}
struct fd_bo *
-fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
+_fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
{
struct fd_bo *bo = bo_new(dev, size, flags, &dev->bo_cache);
if (bo)
@@ -113,6 +113,12 @@ fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
return bo;
}
+void
+_fd_bo_set_name(struct fd_bo *bo, const char *fmt, va_list ap)
+{
+ bo->funcs->set_name(bo, fmt, ap);
+}
+
/* internal function to allocate bo's that use the ringbuffer cache
* instead of the normal bo_cache. The purpose is, because cmdstream
* bo's get vmap'd on the kernel side, and that is expensive, we want
@@ -124,6 +130,7 @@ fd_bo_new_ring(struct fd_device *dev, uint32_t size, uint32_t flags)
struct fd_bo *bo = bo_new(dev, size, flags, &dev->ring_cache);
if (bo)
bo->bo_reuse = RING_CACHE;
+ fd_bo_set_name(bo, "cmdstream");
return bo;
}