freedreno/drm: Remove cpu_fini

It has been unused since nearly forever.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
This commit is contained in:
Rob Clark
2022-12-03 08:08:34 -08:00
committed by Marge Bot
parent 5c96dea638
commit 9372f11c81
9 changed files with 0 additions and 39 deletions
-9
View File
@@ -585,15 +585,6 @@ fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
return bo->funcs->cpu_prep(bo, pipe, op);
}
void
fd_bo_cpu_fini(struct fd_bo *bo)
{
// TODO until we have cached buffers, the kernel side ioctl does nothing,
// so just skip it. When we have cached buffers, we can make the
// ioctl conditional
// bo->funcs->cpu_fini(bo);
}
void
fd_bo_add_fence(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t fence)
{
-1
View File
@@ -290,7 +290,6 @@ void *fd_bo_map(struct fd_bo *bo);
void fd_bo_upload(struct fd_bo *bo, void *src, unsigned off, unsigned len);
bool fd_bo_prefer_upload(struct fd_bo *bo, unsigned len);
int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op);
void fd_bo_cpu_fini(struct fd_bo *bo);
bool fd_bo_is_cached(struct fd_bo *bo);
#ifdef __cplusplus
-1
View File
@@ -317,7 +317,6 @@ fd_dev_count_deferred_cmds(struct fd_device *dev)
struct fd_bo_funcs {
int (*offset)(struct fd_bo *bo, uint64_t *offset);
int (*cpu_prep)(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op);
void (*cpu_fini)(struct fd_bo *bo);
int (*madvise)(struct fd_bo *bo, int willneed);
uint64_t (*iova)(struct fd_bo *bo);
void (*set_name)(struct fd_bo *bo, const char *fmt, va_list ap);
-11
View File
@@ -78,16 +78,6 @@ msm_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
return drmCommandWrite(bo->dev->fd, DRM_MSM_GEM_CPU_PREP, &req, sizeof(req));
}
static void
msm_bo_cpu_fini(struct fd_bo *bo)
{
struct drm_msm_gem_cpu_fini req = {
.handle = bo->handle,
};
drmCommandWrite(bo->dev->fd, DRM_MSM_GEM_CPU_FINI, &req, sizeof(req));
}
static int
msm_bo_madvise(struct fd_bo *bo, int willneed)
{
@@ -156,7 +146,6 @@ msm_bo_destroy(struct fd_bo *bo)
static const struct fd_bo_funcs funcs = {
.offset = msm_bo_offset,
.cpu_prep = msm_bo_cpu_prep,
.cpu_fini = msm_bo_cpu_fini,
.madvise = msm_bo_madvise,
.iova = msm_bo_iova,
.set_name = msm_bo_set_name,
-7
View File
@@ -138,12 +138,6 @@ out:
return ret;
}
static void
virtio_bo_cpu_fini(struct fd_bo *bo)
{
/* no-op */
}
static int
virtio_bo_madvise(struct fd_bo *bo, int willneed)
{
@@ -288,7 +282,6 @@ virtio_bo_destroy(struct fd_bo *bo)
static const struct fd_bo_funcs funcs = {
.offset = virtio_bo_offset,
.cpu_prep = virtio_bo_cpu_prep,
.cpu_fini = virtio_bo_cpu_fini,
.madvise = virtio_bo_madvise,
.iova = virtio_bo_iova,
.set_name = virtio_bo_set_name,
@@ -180,10 +180,6 @@ fd_memory_barrier(struct pipe_context *pctx, unsigned flags)
return;
fd_context_flush(pctx, NULL, 0);
/* TODO do we need to check for persistently mapped buffers and
* fd_bo_cpu_prep()??
*/
}
static void
@@ -64,7 +64,6 @@ realloc_query_bo(struct fd_context *ctx, struct fd_acc_query *aq)
map = fd_bo_map(rsc->bo);
memset(map, 0, aq->size);
fd_bo_cpu_fini(rsc->bo);
}
static void
@@ -193,7 +192,6 @@ fd_acc_get_query_result(struct fd_context *ctx, struct fd_query *q, bool wait,
struct fd_acc_query_sample *s = fd_bo_map(rsc->bo);
p->result(aq, s, result);
fd_bo_cpu_fini(rsc->bo);
return true;
}
@@ -245,8 +245,6 @@ fd_hw_get_query_result(struct fd_context *ctx, struct fd_query *q, bool wait,
p->accumulate_result(ctx, sampptr(period->start, i, ptr),
sampptr(period->end, i, ptr), result);
}
fd_bo_cpu_fini(rsc->bo);
}
return true;
@@ -725,8 +725,6 @@ fd_resource_transfer_unmap(struct pipe_context *pctx,
if (trans->upload_ptr) {
fd_bo_upload(rsc->bo, trans->upload_ptr, ptrans->box.x, ptrans->box.width);
free(trans->upload_ptr);
} else if (!(ptrans->usage & PIPE_MAP_UNSYNCHRONIZED)) {
fd_bo_cpu_fini(rsc->bo);
}
util_range_add(&rsc->b.b, &rsc->valid_buffer_range, ptrans->box.x,