freedreno/drm: handle ancient kernels
authorRob Clark <robdclark@chromium.org>
Sun, 17 May 2020 23:16:43 +0000 (16:16 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 18 May 2020 19:00:47 +0000 (19:00 +0000)
commita6184eae3123840b1ff3d78e24454610e3013013
tree836289b7bc3b9a9d39acd3e15aafa597c35cfcd5
parent106c2a65dbd6b523a1a68f8b0e913294edc7bbd6
freedreno/drm: handle ancient kernels

Older kernels did not support `MSM_INFO_GET_IOVA`.  But this is only
required for (a) clover (ie. `fd_set_global_binding()`) and drm paths
that are limited to newer kernels.  So move the location of the assert
to fix new userspace on old kernels.

Fixes: c9e8df61dc8 ("freedreno: Initialize the bo's iova at creation time.")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Ilia Mirkin <imirkin@alum.mit.edu>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5081>
src/freedreno/drm/freedreno_bo.c
src/freedreno/drm/msm_bo.c