habanalabs: use queue pi/ci in order to determine queue occupancy
authorOfir Bitton <obitton@habana.ai>
Wed, 24 Jun 2020 11:49:43 +0000 (14:49 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Fri, 24 Jul 2020 17:31:36 +0000 (20:31 +0300)
commit79b1894c419468607ce547855e8636d42b456149
treeaaeff3bde56e4f1ad531f4c0ab9abd732ce914b9
parent3abc99bb7dcbc0704972dae6c6ba92fbb1fbf191
habanalabs: use queue pi/ci in order to determine queue occupancy

Instead of using the free slots amount on the compute CQ to determine
whether we can submit work to queues, use the queues pi/ci.

This is needed in future ASICs where we don't have CQ per queue.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/device.c
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hw_queue.c
drivers/misc/habanalabs/irq.c