From a6d9a5f55a77e154a47e198728a3ac94b8932fc2 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 15 Apr 2021 13:16:30 -0700 Subject: [PATCH] freedreno: Rename internal resource_busy So I can re-use the name fd_resource_busy. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_resource.c | 4 ++-- src/gallium/drivers/freedreno/freedreno_resource.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 80a2d6e..3fdb3c3 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -707,7 +707,7 @@ invalidate_resource(struct fd_resource *rsc, unsigned usage) assert_dt bool needs_flush = pending(rsc, !!(usage & PIPE_MAP_WRITE)); unsigned op = translate_usage(usage); - if (needs_flush || fd_resource_busy(rsc, op)) { + if (needs_flush || resource_busy(rsc, op)) { rebind_resource(rsc); realloc_bo(rsc, fd_bo_size(rsc->bo)); } else { @@ -811,7 +811,7 @@ resource_transfer_map(struct pipe_context *pctx, struct pipe_resource *prsc, /* If the GPU is writing to the resource, or if it is reading from the * resource and we're trying to write to it, flush the renders. */ - bool busy = needs_flush || fd_resource_busy(rsc, op); + bool busy = needs_flush || resource_busy(rsc, op); /* if we need to flush/stall, see if we can make a shadow buffer * to avoid this: diff --git a/src/gallium/drivers/freedreno/freedreno_resource.h b/src/gallium/drivers/freedreno/freedreno_resource.h index b68f358..2e1eca4 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.h +++ b/src/gallium/drivers/freedreno/freedreno_resource.h @@ -209,7 +209,7 @@ pending(struct fd_resource *rsc, bool write) } static inline bool -fd_resource_busy(struct fd_resource *rsc, unsigned op) +resource_busy(struct fd_resource *rsc, unsigned op) { return fd_bo_cpu_prep(rsc->bo, NULL, op | FD_BO_PREP_NOSYNC) != 0; } -- 2.7.4