diff options
author | Rob Clark <[email protected]> | 2020-05-17 16:16:43 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-18 19:00:47 +0000 |
commit | a6184eae3123840b1ff3d78e24454610e3013013 (patch) | |
tree | 836289b7bc3b9a9d39acd3e15aafa597c35cfcd5 /src/freedreno/drm/msm_bo.c | |
parent | 106c2a65dbd6b523a1a68f8b0e913294edc7bbd6 (diff) |
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 <[email protected]>
Tested-by: Ilia Mirkin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5081>
Diffstat (limited to 'src/freedreno/drm/msm_bo.c')
-rw-r--r-- | src/freedreno/drm/msm_bo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/freedreno/drm/msm_bo.c b/src/freedreno/drm/msm_bo.c index da2609903c1..7253a8cc7bd 100644 --- a/src/freedreno/drm/msm_bo.c +++ b/src/freedreno/drm/msm_bo.c @@ -112,7 +112,8 @@ static uint64_t msm_bo_iova(struct fd_bo *bo) int ret; ret = drmCommandWriteRead(bo->dev->fd, DRM_MSM_GEM_INFO, &req, sizeof(req)); - debug_assert(ret == 0); + if (ret) + return 0; return req.value; } |