projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2403170
)
iris: Add an assert to iris_bo_gem_mmap_legacy()
author
Jason Ekstrand
<jason@jlekstrand.net>
Fri, 16 Jul 2021 14:39:56 +0000
(09:39 -0500)
committer
Marge Bot
<eric+marge@anholt.net>
Thu, 12 Aug 2021 19:29:59 +0000
(19:29 +0000)
It only supports two caching modes so we should assert that the only
mode we ever see is one of them.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
src/gallium/drivers/iris/iris_bufmgr.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/iris/iris_bufmgr.c
b/src/gallium/drivers/iris/iris_bufmgr.c
index
dbe11e4
..
7dfb2cc
100644
(file)
--- a/
src/gallium/drivers/iris/iris_bufmgr.c
+++ b/
src/gallium/drivers/iris/iris_bufmgr.c
@@
-1017,6
+1017,9
@@
iris_bo_gem_mmap_legacy(struct pipe_debug_callback *dbg, struct iris_bo *bo)
{
struct iris_bufmgr *bufmgr = bo->bufmgr;
+ assert(bufmgr->vram.size == 0);
+ assert(bo->mmap_mode == IRIS_MMAP_WB || bo->mmap_mode == IRIS_MMAP_WC);
+
struct drm_i915_gem_mmap mmap_arg = {
.handle = bo->gem_handle,
.size = bo->size,