Skip to content

Commit 2e0904e

Browse files
Pranjal Ramajor Asha Kanojiyaquic-jhugo
authored andcommitted
accel/qaic: Validate if BO is sliced before slicing
QAIC_ATTACH_SLICE_BO attaches slicing configuration to a BO. Validate if given BO is already sliced. An already sliced BO cannot be sliced again. Fixes: ff13be8 ("accel/qaic: Add datapath") Signed-off-by: Pranjal Ramajor Asha Kanojiya <[email protected]> Reviewed-by: Carl Vanderlip <[email protected]> Reviewed-by: Jeffrey Hugo <[email protected]> Signed-off-by: Jeffrey Hugo <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d3b277b commit 2e0904e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/accel/qaic/qaic_data.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,11 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
10011001

10021002
bo = to_qaic_bo(obj);
10031003

1004+
if (bo->sliced) {
1005+
ret = -EINVAL;
1006+
goto put_bo;
1007+
}
1008+
10041009
ret = qaic_prepare_bo(qdev, bo, &args->hdr);
10051010
if (ret)
10061011
goto put_bo;

0 commit comments

Comments
 (0)