tu: Clamp priority in DRM submitqueue creation
authorMark Collins <mark@igalia.com>
Fri, 2 Sep 2022 10:09:11 +0000 (10:09 +0000)
committerMarge Bot <emma+marge@anholt.net>
Thu, 8 Sep 2022 08:04:10 +0000 (08:04 +0000)
commitc82249aa6891e43398cc8d62d552869495292b31
treeed4d27471b92da03a2ad964c5617084c4cac0f52
parentc3f51a5dcf2d7f2987ee34e5c485f9fabfdddf61
tu: Clamp priority in DRM submitqueue creation

The kernel driver has a range of valid priority values that can
be supplied to it, submitting any priority value outside these
bounds will result in `-EINVAL`. To avoid this, the priority
value is now clamped to the range that the kernel supports.

Fixes: 0c6fbfca0c91ef012e8ab767a317c07f1f6dc5e6
Signed-off-by: Mark Collins <mark@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18389>
src/freedreno/vulkan/tu_drm.c