iris: fix error message on I915_GEM_[GS]ET_TILING failure
authorMarcin Ślusarz <marcin.slusarz@intel.com>
Mon, 14 Jun 2021 09:01:41 +0000 (11:01 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 15 Jun 2021 15:07:42 +0000 (15:07 +0000)
The first problem was noticed by Coverity (CID 1485970).

Fixes: ab49063f449 ("iris: Only use SET/GET_TILING when exporting/importing BOs")
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11357>

src/gallium/drivers/iris/iris_bufmgr.c

index 230df64..58a062d 100644 (file)
@@ -1124,7 +1124,7 @@ iris_gem_get_tiling(struct iris_bo *bo, uint32_t *tiling)
 
    if (ret) {
       DBG("gem_get_tiling failed for BO %u: %s\n",
-          bo->gem_handle, strerror(ret));
+          bo->gem_handle, strerror(errno));
    }
 
    *tiling = ti.tiling_mode;
@@ -1159,7 +1159,7 @@ iris_gem_set_tiling(struct iris_bo *bo, const struct isl_surf *surf)
 
    if (ret) {
       DBG("gem_set_tiling failed for BO %u: %s\n",
-          bo->gem_handle, strerror(ret));
+          bo->gem_handle, strerror(errno));
    }
 
    return ret;