freedreno: Rename internal resource_busy
authorRob Clark <robdclark@chromium.org>
Thu, 15 Apr 2021 20:16:30 +0000 (13:16 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 May 2021 16:34:11 +0000 (16:34 +0000)
So I can re-use the name fd_resource_busy.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10883>

src/gallium/drivers/freedreno/freedreno_resource.c
src/gallium/drivers/freedreno/freedreno_resource.h

index 80a2d6e..3fdb3c3 100644 (file)
@@ -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:
index b68f358..2e1eca4 100644 (file)
@@ -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;
 }