intel: Make gen12 URB space reservation dependent on compute engine presence
authorJosé Roberto de Souza <jose.souza@intel.com>
Tue, 31 Jan 2023 20:52:33 +0000 (12:52 -0800)
committerMarge Bot <emma+marge@anholt.net>
Thu, 23 Feb 2023 14:27:30 +0000 (14:27 +0000)
commita364f23a6cfa28e1843ef1e64dce56b4cef5a71e
treed4b5f6677afbadb328476ad47c6920b503958ca0
parent63278778c649bf373468d280742164b9a3c0a791
intel: Make gen12 URB space reservation dependent on compute engine presence

Tigerlake PRM: Volume 2c: Command Reference: Registers Part 2 - Registers M through Z
RCU_MODE :: Compute Engine Enable

   This bit indicates if Compute Engine (a.k.a Dual Context or Multi
   Context) is enabled or not. This bit must be treated as global
   control for enabling and disabling of compute engine. Hardware
   allocates required resources for the compute engine based on this
   bit.
   ....
   HW reserves 4KB of URB space...

Right now no gen12 platform has Dual Context enabled in kernel side,
exposing a compute engine but that can change, so here adding
has_compute_engine to intel_device_info and only reserving URB space
if compute engine is available.

While at it also fixing the error path when pb_slabs_init() fails.

Bspec: 46034
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21031>
src/gallium/drivers/iris/iris_bufmgr.c
src/intel/common/intel_urb_config.c
src/intel/dev/intel_device_info.h
src/intel/vulkan/anv_device.c