Skip to content

Commit 77f71e1

Browse files
Pranjal Ramajor Asha Kanojiyaquic-jhugo
authored andcommitted
accel/qaic: Declare BO 'sliced' after all the operations are complete
Once the BO is declared 'sliced' by setting bo->sliced to true we can perform DMA (QAIC_EXECUTE_BO) operation on that BO. Hence we should declare a BO sliced after completing all the operations. Adding BO to its respective DBC list in qaic_attach_slicing_bo() seems out of place as qaic_attach_slicing_bo() should just update BO with slicing configuration. Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230901172247.11410-4-quic_jhugo@quicinc.com
1 parent 76d42aa commit 77f71e1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

drivers/accel/qaic/qaic_data.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -911,9 +911,6 @@ static int qaic_attach_slicing_bo(struct qaic_device *qdev, struct qaic_bo *bo,
911911
return -ENOSPC;
912912
}
913913

914-
bo->sliced = true;
915-
list_add_tail(&bo->bo_list, &bo->dbc->bo_lists);
916-
917914
return 0;
918915
}
919916

@@ -1015,6 +1012,8 @@ int qaic_attach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_fi
10151012
if (args->hdr.dir == DMA_TO_DEVICE)
10161013
dma_sync_sgtable_for_cpu(&qdev->pdev->dev, bo->sgt, args->hdr.dir);
10171014

1015+
bo->sliced = true;
1016+
list_add_tail(&bo->bo_list, &bo->dbc->bo_lists);
10181017
srcu_read_unlock(&dbc->ch_lock, rcu_id);
10191018
drm_gem_object_put(obj);
10201019
srcu_read_unlock(&qdev->dev_lock, qdev_rcu_id);

0 commit comments

Comments
 (0)