summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
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/gallium/drivers/freedreno
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/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_context.c6
-rw-r--r--src/gallium/drivers/freedreno/a3xx/fd3_gmem.c2
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_context.c6
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_gmem.c2
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_context.c4
-rw-r--r--src/gallium/drivers/freedreno/a5xx/fd5_gmem.c2
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_context.c6
-rw-r--r--src/gallium/drivers/freedreno/freedreno_resource.c8
8 files changed, 19 insertions, 17 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_context.c b/src/gallium/drivers/freedreno/a3xx/fd3_context.c
index 9927191ea4f..59dcaa4bf6b 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_context.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_context.c
@@ -101,13 +101,13 @@ fd3_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
fd_hw_query_init(pctx);
fd3_ctx->vs_pvt_mem = fd_bo_new(screen->dev, 0x2000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vs_pvt");
fd3_ctx->fs_pvt_mem = fd_bo_new(screen->dev, 0x2000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "fs_pvt");
fd3_ctx->vsc_size_mem = fd_bo_new(screen->dev, 0x1000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_size");
fd_context_setup_common_vbos(&fd3_ctx->base);
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
index d01b656b0a2..7de0a92cdc1 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c
@@ -785,7 +785,7 @@ update_vsc_pipe(struct fd_batch *batch)
if (!pipe->bo) {
pipe->bo = fd_bo_new(ctx->dev, 0x40000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_pipe[%u]", i);
}
OUT_PKT0(ring, REG_A3XX_VSC_PIPE(i), 3);
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_context.c b/src/gallium/drivers/freedreno/a4xx/fd4_context.c
index fc9aad610c0..e9730e9c209 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_context.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_context.c
@@ -101,13 +101,13 @@ fd4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
fd_hw_query_init(pctx);
fd4_ctx->vs_pvt_mem = fd_bo_new(screen->dev, 0x2000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vs_pvt");
fd4_ctx->fs_pvt_mem = fd_bo_new(screen->dev, 0x2000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "fs_pvt");
fd4_ctx->vsc_size_mem = fd_bo_new(screen->dev, 0x1000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_size");
fd_context_setup_common_vbos(&fd4_ctx->base);
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c b/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
index aa6cb81e2f7..d061c8ac70f 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_gmem.c
@@ -582,7 +582,7 @@ update_vsc_pipe(struct fd_batch *batch)
struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
if (!pipe->bo) {
pipe->bo = fd_bo_new(ctx->dev, 0x40000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_pipe[%u]", i);
}
OUT_RELOCW(ring, pipe->bo, 0, 0, 0); /* VSC_PIPE_DATA_ADDRESS[i] */
}
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_context.c b/src/gallium/drivers/freedreno/a5xx/fd5_context.c
index 985face47ab..37e02c61b1f 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_context.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_context.c
@@ -104,10 +104,10 @@ fd5_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
util_blitter_set_texture_multisample(fd5_ctx->base.blitter, true);
fd5_ctx->vsc_size_mem = fd_bo_new(screen->dev, 0x1000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_size");
fd5_ctx->blit_mem = fd_bo_new(screen->dev, 0x1000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "blit");
fd_context_setup_common_vbos(&fd5_ctx->base);
diff --git a/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c b/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
index 9d7ebced31d..d72d36dde3e 100644
--- a/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
+++ b/src/gallium/drivers/freedreno/a5xx/fd5_gmem.c
@@ -290,7 +290,7 @@ update_vsc_pipe(struct fd_batch *batch)
struct fd_vsc_pipe *pipe = &ctx->vsc_pipe[i];
if (!pipe->bo) {
pipe->bo = fd_bo_new(ctx->dev, 0x20000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_pipe[%u]", i);
}
OUT_RELOCW(ring, pipe->bo, 0, 0, 0); /* VSC_PIPE_DATA_ADDRESS[i].LO/HI */
}
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_context.c b/src/gallium/drivers/freedreno/a6xx/fd6_context.c
index 08318082625..b8939b1449c 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_context.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_context.c
@@ -111,14 +111,14 @@ fd6_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
fd6_ctx->vsc_data = fd_bo_new(screen->dev,
(A6XX_VSC_DATA_PITCH * 32) + 0x100,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_data");
fd6_ctx->vsc_data2 = fd_bo_new(screen->dev,
A6XX_VSC_DATA2_PITCH * 32,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "vsc_data2");
fd6_ctx->blit_mem = fd_bo_new(screen->dev, 0x1000,
- DRM_FREEDRENO_GEM_TYPE_KMEM);
+ DRM_FREEDRENO_GEM_TYPE_KMEM, "blit");
fd_context_setup_common_vbos(&fd6_ctx->base);
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 85bbbe271f9..e59dc96ce35 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -97,10 +97,11 @@ rebind_resource(struct fd_context *ctx, struct pipe_resource *prsc)
static void
realloc_bo(struct fd_resource *rsc, uint32_t size)
{
+ struct pipe_resource *prsc = &rsc->base;
struct fd_screen *screen = fd_screen(rsc->base.screen);
uint32_t flags = DRM_FREEDRENO_GEM_CACHE_WCOMBINE |
DRM_FREEDRENO_GEM_TYPE_KMEM |
- COND(rsc->base.bind & PIPE_BIND_SCANOUT, DRM_FREEDRENO_GEM_SCANOUT);
+ COND(prsc->bind & PIPE_BIND_SCANOUT, DRM_FREEDRENO_GEM_SCANOUT);
/* TODO other flags? */
/* if we start using things other than write-combine,
@@ -110,7 +111,8 @@ realloc_bo(struct fd_resource *rsc, uint32_t size)
if (rsc->bo)
fd_bo_del(rsc->bo);
- rsc->bo = fd_bo_new(screen->dev, size, flags);
+ rsc->bo = fd_bo_new(screen->dev, size, flags, "%ux%ux%u@%u:%x",
+ prsc->width0, prsc->height0, prsc->depth0, rsc->cpp, prsc->bind);
rsc->seqno = p_atomic_inc_return(&screen->rsc_seqno);
util_range_set_empty(&rsc->valid_buffer_range);
fd_bc_invalidate_resource(rsc, true);
@@ -869,7 +871,7 @@ fd_resource_create(struct pipe_screen *pscreen,
rsc->lrz_height = lrz_height;
rsc->lrz_width = lrz_pitch;
rsc->lrz_pitch = lrz_pitch;
- rsc->lrz = fd_bo_new(screen->dev, size, flags);
+ rsc->lrz = fd_bo_new(screen->dev, size, flags, "lrz");
}
size = screen->setup_slices(rsc);