i965: Pass the EGL/DRI context priority through to the kernel
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Apr 2017 14:24:54 +0000 (15:24 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 20 Oct 2017 10:28:17 +0000 (11:28 +0100)
commit1617fca6d12e418e02d18733dd0d1964c7ecbda9
tree48bc5b88e5b04381af4b63ceef67b5e4f7a92a01
parent21023954f898bf871696e6e0eae2848e019fb2f9
i965: Pass the EGL/DRI context priority through to the kernel

Decode the EGL/DRI priority enum into the [-1023, 1023] range as
interpreted by the kernel and call DRM_I915_GEM_CONTEXT_SETPARAM to
adjust the priority. We use 0 as the default medium priority (also the
kernel default) and so only need adjust up or down. By only doing the
adjustment if not setting to medium, we can faithfully report any error
whilst setting without worrying about kernel version.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_bufmgr.c
src/mesa/drivers/dri/i965/brw_bufmgr.h
src/mesa/drivers/dri/i965/brw_context.c