iris/bufmgr: Check if iris_bo_gem_mmap failed
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Tue, 28 Apr 2020 11:51:26 +0000 (14:51 +0300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 29 Apr 2020 08:51:33 +0000 (08:51 +0000)
commit8f0d3874411ec3c0dcb1171cad5930db70fb48b4
tree581d14af1d494a463aa018684780c8c11932cec8
parent1a33358b274631e0b8b493b0d885091d839f9d13
iris/bufmgr: Check if iris_bo_gem_mmap failed

After refactoring of iris_bo_map_cpu and iris_bo_map_wc - immediate
return of NULL on failure to mmap a buffer was lost.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2855
Fixes: 5bc3f52dd8c2b5acaae959ccae2e1fb7c769bb22
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4786>
src/gallium/drivers/iris/iris_bufmgr.c