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@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9008>
This commit is contained in:
Marcin Ślusarz 2021-02-12 12:44:03 +01:00 committed by Marge Bot
parent 5da10cefe2
commit 65d52aef82

View file

@ -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)