aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-05-08 11:28:14 -0700
committerMarge Bot <[email protected]>2020-05-12 16:30:57 +0000
commitb2c23b1e48f043edee1a6aaa3c132c13edba032e (patch)
tree54c49588a68b25c35a353dd1d44e25c0f6b9968b /src
parent554b959df0d5b1117fb42d3d7d1e715ea318f079 (diff)
freedreno: Mark all ringbuffer BOs as to be dumped on crash.
We can avoid passing these flags around in the DRM backends by just marking ring BOs up front. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4967>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/drm/freedreno_bo.c6
-rw-r--r--src/freedreno/drm/msm_ringbuffer_sp.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/freedreno/drm/freedreno_bo.c b/src/freedreno/drm/freedreno_bo.c
index 794f0bc3b60..a4218cd8ffb 100644
--- a/src/freedreno/drm/freedreno_bo.c
+++ b/src/freedreno/drm/freedreno_bo.c
@@ -132,9 +132,11 @@ fd_bo_new_ring(struct fd_device *dev, uint32_t size)
{
uint32_t flags = DRM_FREEDRENO_GEM_GPUREADONLY;
struct fd_bo *bo = bo_new(dev, size, flags, &dev->ring_cache);
- if (bo)
+ if (bo) {
bo->bo_reuse = RING_CACHE;
- fd_bo_set_name(bo, "cmdstream");
+ bo->flags |= FD_RELOC_DUMP;
+ fd_bo_set_name(bo, "cmdstream");
+ }
return bo;
}
diff --git a/src/freedreno/drm/msm_ringbuffer_sp.c b/src/freedreno/drm/msm_ringbuffer_sp.c
index ef16ccd18e2..65bfb2bde80 100644
--- a/src/freedreno/drm/msm_ringbuffer_sp.c
+++ b/src/freedreno/drm/msm_ringbuffer_sp.c
@@ -259,7 +259,7 @@ msm_submit_sp_flush(struct fd_submit *submit, int in_fence_fd,
for (unsigned i = 0; i < primary->u.nr_cmds; i++) {
cmds[i].type = MSM_SUBMIT_CMD_BUF;
cmds[i].submit_idx = msm_submit_append_bo(msm_submit,
- primary->u.cmds[i].ring_bo, FD_RELOC_DUMP);
+ primary->u.cmds[i].ring_bo, 0);
cmds[i].submit_offset = primary->offset;
cmds[i].size = primary->u.cmds[i].size;
cmds[i].pad = 0;
@@ -453,7 +453,6 @@ msm_ringbuffer_sp_emit_reloc_ring(struct fd_ringbuffer *ring,
msm_ringbuffer_sp_emit_reloc(ring, &(struct fd_reloc){
.bo = bo,
- .flags = FD_RELOC_DUMP,
.offset = msm_target->offset,
});