Mesa (main): iris: Map with WC on non-LLC platforms.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 24 16:52:04 UTC 2021


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

Author: Rafael Antognolli <rafael.antognolli at intel.com>
Date:   Fri Jan  3 10:42:10 2020 -0800

iris: Map with WC on non-LLC platforms.

Reworks:
 * Jordan: Required rework following
   f62724ccacf ("iris: Pick a single mmap mode (WB/WC) at BO allocation time")

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5599>

---

 src/gallium/drivers/iris/iris_bufmgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 3076ced1686..7cdb4474d98 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -595,9 +595,9 @@ iris_bo_alloc(struct iris_bufmgr *bufmgr,
    uint64_t bo_size =
       bucket ? bucket->size : MAX2(ALIGN(size, page_size), page_size);
 
+   bool is_coherent = bufmgr->has_llc || (flags & BO_ALLOC_COHERENT);
    enum iris_mmap_mode desired_mmap_mode =
-      (bufmgr->has_llc || (flags & BO_ALLOC_COHERENT)) ? IRIS_MMAP_WB
-                                                       : IRIS_MMAP_WC;
+      !local && is_coherent ? IRIS_MMAP_WB : IRIS_MMAP_WC;
 
    mtx_lock(&bufmgr->lock);
 



More information about the mesa-commit mailing list