Similarly to the host path from drm_syncobj.c we would like to
disallow those operations to help applications figure where they using
the wrong kind of ioctl.

Signed-off-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 2e53feed40e2..d9bbc31e97d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1159,6 +1159,8 @@ static int amdgpu_cs_process_syncobj_out_dep(struct 
amdgpu_cs_parser *p,
                        drm_syncobj_find(p->filp, deps[i].handle);
                if (!p->post_deps[i].syncobj)
                        return -EINVAL;
+               if (p->post_deps[i].syncobj->is_timeline)
+                       return -EINVAL;
                p->post_deps[i].chain = NULL;
                p->post_deps[i].point = 0;
                p->num_post_deps++;
-- 
2.23.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to