iris: SMEM buffers on discrete platforms are coherent

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
This commit is contained in:
Jason Ekstrand 2021-07-23 12:03:32 -05:00 committed by Marge Bot
parent 512fa2f4da
commit c49041c9d7
1 changed files with 3 additions and 1 deletions

View File

@ -613,7 +613,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);
bool is_coherent = bufmgr->has_llc ||
(bufmgr->vram.size > 0 && !local) ||
(flags & BO_ALLOC_COHERENT);
enum iris_mmap_mode mmap_mode =
!local && is_coherent ? IRIS_MMAP_WB : IRIS_MMAP_WC;