]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
accel/ivpu: Correct MMU queue size checking functions
authorWachowski, Karol <karol.wachowski@intel.com>
Fri, 26 Jan 2024 12:27:59 +0000 (13:27 +0100)
committerJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Tue, 6 Feb 2024 12:36:33 +0000 (13:36 +0100)
commitb039f1c4d3727c3e44a7e89ff79e7e8533e1beec
tree7abd86b0b4ff853aa898d071ca871555a33d17b2
parentc9da9a1f17bf4fa96b115950fd389c917b583c1c
accel/ivpu: Correct MMU queue size checking functions

Do not use kernel CIRC_SPACE and CIRC_CNT that
incorrectly return space of a queue when wrap bit was set.
Use correct implementation that compares producer, consumer and
wrap bit values.

Without this fix it was possible to lose events in case when event
queue was full.

Signed-off-by: Wachowski, Karol <karol.wachowski@intel.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240126122804.2169129-3-jacek.lawrynowicz@linux.intel.com
drivers/accel/ivpu/ivpu_mmu.c