diff --git a/src/nouveau/headers/nv_device_info.h b/src/nouveau/headers/nv_device_info.h index ddbd9c4ed09..2344f7fd169 100644 --- a/src/nouveau/headers/nv_device_info.h +++ b/src/nouveau/headers/nv_device_info.h @@ -39,6 +39,8 @@ struct nv_device_info { uint8_t mp_per_tpc; uint8_t max_warps_per_mp; + bool has_transfer_queue; + /** Non-coherent memory map atom size */ uint16_t nc_atom_size_B; diff --git a/src/nouveau/winsys/nouveau_device.c b/src/nouveau/winsys/nouveau_device.c index 8cc4df61cca..617f20f9cf2 100644 --- a/src/nouveau/winsys/nouveau_device.c +++ b/src/nouveau/winsys/nouveau_device.c @@ -17,6 +17,8 @@ #include #include +#include "clc597.h" + static const char * name_for_chip(uint32_t dev_id, uint16_t subsystem_id, @@ -518,6 +520,18 @@ nouveau_ws_device_new(drmDevicePtr drm_device) device->info.max_warps_per_mp = max_warps_per_mp_for_sm(device->info.sm); device->info.mp_per_tpc = mp_per_tpc_for_chipset(device->info.chipset); + /* Transfer queues require two kernel fixes: + * 0ef5c4e4db ("nouveau: fix disabling the nonstall irq due to storm code") + * 2cb66ae604 ("nouveau: Membar before between semaphore writes and the interrupt") + * + * Any kernel with compression support should have these fixes and gsp + * by default. Turing may not be fixed without gsp, but that should be rare on + * gsp-by-default kernels. Note that older architectures have not been fixed, + * so they require additional kernel work before we can expose this. + */ + device->info.has_transfer_queue = device->nouveau_version >= 0x01000401 && + device->info.cls_eng3d >= TURING_A; + init_shared_mem_sizes(&device->info); nouveau_ws_context_destroy(tmp_ctx);