summaryrefslogtreecommitdiff
path: root/drivers/accel/qaic/qaic.h
diff options
context:
space:
mode:
authorPranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>2023-09-01 20:22:47 +0300
committerJeffrey Hugo <quic_jhugo@quicinc.com>2023-09-22 18:58:49 +0300
commit217b812364d360e1933d8485f063400e5dda7d66 (patch)
treed02c292f695af31e07c2f3306bf675eb220e6188 /drivers/accel/qaic/qaic.h
parentb2576f6cf6da6adde5c698aa281c883f2376b876 (diff)
downloadlinux-217b812364d360e1933d8485f063400e5dda7d66.tar.xz
accel/qaic: Add QAIC_DETACH_SLICE_BO IOCTL
Once a BO is attached with slicing configuration that BO can only be used for that particular setting. With this new feature user can detach slicing configuration off an already sliced BO and attach new slicing configuration using QAIC_ATTACH_SLICE_BO. This will support BO recycling. detach_slice_bo() detaches slicing configuration from a BO. This new helper function can also be used in release_dbc() as we are doing the exact same thing. Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> [jhugo: add documentation for new ioctl] 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-8-quic_jhugo@quicinc.com
Diffstat (limited to 'drivers/accel/qaic/qaic.h')
-rw-r--r--drivers/accel/qaic/qaic.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/accel/qaic/qaic.h b/drivers/accel/qaic/qaic.h
index 983dcdff2cfe..e3f4c30f3ffd 100644
--- a/drivers/accel/qaic/qaic.h
+++ b/drivers/accel/qaic/qaic.h
@@ -222,7 +222,8 @@ struct qaic_bo {
*/
u32 queue_level_before;
} perf_stats;
-
+ /* Synchronizes BO operations */
+ struct mutex lock;
};
struct bo_slice {
@@ -278,6 +279,7 @@ int qaic_execute_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *f
int qaic_partial_execute_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
int qaic_wait_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
int qaic_perf_stats_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
+int qaic_detach_slice_bo_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);
void irq_polling_work(struct work_struct *work);
#endif /* _QAIC_H_ */