Mesa (main): freedreno: use new tc util for setting bytes_mapped_limit

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 20 14:06:54 UTC 2021


Module: Mesa
Branch: main
Commit: 1132df843cc71dd0773d3180e218a73230674367
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1132df843cc71dd0773d3180e218a73230674367

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed Jul 14 13:46:42 2021 -0400

freedreno: use new tc util for setting bytes_mapped_limit

Acked-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853>

---

 src/gallium/drivers/freedreno/freedreno_context.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 1df71550efa..79a2299a461 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -706,10 +706,8 @@ fd_context_init_tc(struct pipe_context *pctx, unsigned flags)
       false,
       &ctx->tc);
 
-   uint64_t total_ram;
-   if (tc && tc != pctx && os_get_total_physical_memory(&total_ram)) {
-      ((struct threaded_context *)tc)->bytes_mapped_limit = total_ram / 16;
-   }
+   if (tc && tc != pctx)
+      threaded_context_init_bytes_mapped_limit((struct threaded_context *)tc, 16);
 
    return tc;
 }



More information about the mesa-commit mailing list