Mesa (master): intel/dump_gpu: mark bo as unmapped if its address changes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 15 11:46:24 UTC 2021


Module: Mesa
Branch: master
Commit: 65d52aef82dc8bd616c017bcda3b0cfcb1a296b7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=65d52aef82dc8bd616c017bcda3b0cfcb1a296b7

Author: Marcin Ślusarz <marcin.slusarz at intel.com>
Date:   Fri Feb 12 12:44:03 2021 +0100

intel/dump_gpu: mark bo as unmapped if its address changes

Fixes crash in ppgtt_lookup when the same bo is used twice
with different offsets.

It's possible to hit this with i965 and always_flush_batch=true.

Signed-off-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9008>

---

 src/intel/tools/intel_dump_gpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c
index a0d60e39965..bc91639fd34 100644
--- a/src/intel/tools/intel_dump_gpu.c
+++ b/src/intel/tools/intel_dump_gpu.c
@@ -251,6 +251,8 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)
       }
 
       if (obj->flags & EXEC_OBJECT_PINNED) {
+         if (bo->offset != obj->offset)
+            bo->gtt_mapped = false;
          bo->offset = obj->offset;
       } else {
          if (obj->alignment != 0)



More information about the mesa-commit mailing list