intel: Clear virtual after failing to mmap_gtt.
Don't store the error return in bo_gem->gtt_virtual or else we will attempt to use that as a valid pointer in future mappings. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>main
parent
28eae30689
commit
08371bc290
|
@ -950,6 +950,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
|
|||
MAP_SHARED, bufmgr_gem->fd,
|
||||
mmap_arg.offset);
|
||||
if (bo_gem->gtt_virtual == MAP_FAILED) {
|
||||
bo_gem->gtt_virtual = NULL;
|
||||
ret = -errno;
|
||||
fprintf(stderr,
|
||||
"%s:%d: Error mapping buffer %d (%s): %s .\n",
|
||||
|
|
Loading…
Reference in New Issue