novueau/winsys: nv_device_info.has_transfer_queue

Add an option that signals if we can use transfer queues on the current
hardware and kernel or not.

Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36617>
This commit is contained in:
Mel Henning
2025-12-16 13:50:09 -05:00
committed by Marge Bot
parent c94f721b72
commit b71b6a03c2
2 changed files with 16 additions and 0 deletions
+2
View File
@@ -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;
+14
View File
@@ -17,6 +17,8 @@
#include <unistd.h>
#include <xf86drm.h>
#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);