diff options
author | Rob Clark <robdclark@chromium.org> | 2023-08-03 21:32:45 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-08-08 00:51:21 +0300 |
commit | 42854f8d2bff3f3a36f8f1c985c69618a13ed9ec (patch) | |
tree | ca8c4349e83bcd7fed960dcbad2e5023626ec682 /drivers/gpu/drm/msm/msm_gem_submit.c | |
parent | 3136a0f83519076edfbc14be65f286785434189a (diff) | |
download | linux-42854f8d2bff3f3a36f8f1c985c69618a13ed9ec.tar.xz |
drm/msm: Disallow relocs on a6xx+
Mesa stopped using these pretty early in a6xx bringup[1]. Take advantage
of this to disallow some legacy UABI.
[1] https://gitlab.freedesktop.org/mesa/mesa/-/commit/7ef722861b691ce99be3827ed05f8c0ddf2cd66e
Signed-off-by: Rob Clark <robdclark@chromium.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Patchwork: https://patchwork.freedesktop.org/patch/551175/
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem_submit.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem_submit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c index 63c96416e183..3b908f9f5493 100644 --- a/drivers/gpu/drm/msm/msm_gem_submit.c +++ b/drivers/gpu/drm/msm/msm_gem_submit.c @@ -882,6 +882,16 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data, if (submit->valid) continue; + if (!gpu->allow_relocs) { + if (submit->cmd[i].nr_relocs) { + DRM_ERROR("relocs not allowed\n"); + ret = -EINVAL; + goto out; + } + + continue; + } + ret = submit_reloc(submit, msm_obj, submit->cmd[i].offset * 4, submit->cmd[i].nr_relocs, submit->cmd[i].relocs); if (ret) |