linux/drivers/accel/qaic
Pranjal Ramajor Asha Kanojiya 3b511278b6 accel/qaic: Support for 0 resize slice execution in BO
Add support to partially execute a slice which is resized to zero.
Executing a zero size slice in a BO should mean that there is no DMA
transfers involved but you should still configure doorbell and semaphores.

For example consider a BO of size 18K and it is sliced into 3 6K slices
and user calls partial execute ioctl with resize as 10K.
slice 0 - size is 6k and offset is 0, so resize of 10K will not cut short
          this slice hence we send the entire slice for execution.
slice 1 - size is 6k and offset is 6k, so resize of 10K will cut short this
          slice and only the first 4k should be DMA along with configuring
          doorbell and semaphores.
slice 2 - size is 6k and offset is 12k, so resize of 10k will cut short
          this slice and no DMA transfer would be involved but we should
          would configure doorbell and semaphores.

This change begs to change the behavior of 0 resize. Currently, 0 resize
partial execute ioctl behaves exactly like execute ioctl i.e. no resize.
After this patch all the slice in BO should behave exactly like slice 2 in
above example.

Refactor copy_partial_exec_reqs() to make it more readable and less
complex.

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/20231027164330.11978-1-quic_jhugo@quicinc.com
2023-11-03 09:03:01 -06:00
..
Kconfig accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00
Makefile accel/qaic: Add support for periodic timesync 2023-10-27 10:05:42 -06:00
mhi_controller.c accel/qaic: Support MHI QAIC_TIMESYNC channel 2023-10-27 10:06:34 -06:00
mhi_controller.h accel/qaic: Enable 1 MSI fallback mode 2023-10-27 09:39:39 -06:00
qaic_control.c accel/qaic: Quiet array bounds check on DMA abort message 2023-11-03 08:55:44 -06:00
qaic_data.c accel/qaic: Support for 0 resize slice execution in BO 2023-11-03 09:03:01 -06:00
qaic_drv.c accel/qaic: Support MHI QAIC_TIMESYNC channel 2023-10-27 10:06:34 -06:00
qaic_timesync.c accel/qaic: Support MHI QAIC_TIMESYNC channel 2023-10-27 10:06:34 -06:00
qaic_timesync.h accel/qaic: Add support for periodic timesync 2023-10-27 10:05:42 -06:00
qaic.h accel/qaic: Support MHI QAIC_TIMESYNC channel 2023-10-27 10:06:34 -06:00