anv: explicitly disable BT pool allocations at device init

The default state doesn't seem well defined (or kernel driver bug
maybe?). Let's just set it to disabled on platforms where we're not
using it.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Found-by: Chuansheng Liu <chuansheng.liu@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30841>
This commit is contained in:
Lionel Landwerlin 2024-08-26 10:00:33 +03:00 committed by Marge Bot
parent 749d7e96bf
commit 1f9c40a8d1

View file

@ -312,6 +312,18 @@ init_common_queue_state(struct anv_queue *queue, struct anv_batch *batch)
#endif
}
/* Disable the POOL_ALLOC mechanism in HW. We found that this state can get
* corrupted (likely due to leaking from another context), the default
* value should be disabled. It doesn't cost anything to set it once at
* device initialization.
*/
#if GFX_VER >= 11 && GFX_VERx10 < 125
anv_batch_emit(batch, GENX(3DSTATE_BINDING_TABLE_POOL_ALLOC), btpa) {
btpa.MOCS = mocs;
btpa.BindingTablePoolEnable = false;
}
#endif
struct mi_builder b;
mi_builder_init(&b, device->info, batch);