diff options
Diffstat (limited to 'kernel/gsp_rm_tu104.h')
| -rw-r--r-- | kernel/gsp_rm_tu104.h | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/kernel/gsp_rm_tu104.h b/kernel/gsp_rm_tu104.h index b5ee4d7..815da3b 100644 --- a/kernel/gsp_rm_tu104.h +++ b/kernel/gsp_rm_tu104.h @@ -735,6 +735,8 @@ static const struct tu104_internal_device_info tu104_internal_device_table[] = { #define TU104_CTRL_BUS_GET_PCI_BAR_INFO 0x20801803 #define TU104_CTRL_INTERNAL_DISPLAY_GET_STATIC_INFO 0x20800a01 #define TU104_CTRL_INTERNAL_DISPLAY_GET_IP_VERSION 0x20800a4b +#define TU104_CTRL_INTERNAL_DISPLAY_CHANNEL_PUSHBUFFER 0x20800a58 +#define TU104_CTRL_INTERNAL_DISPLAY_WRITE_INST_MEM 0x20800a49 #define TU104_CTRL_I2C_TRANSACTION 0x402c0105 #define TU104_CTRL_CE_GET_FAULT_METHOD_BUFFER_SIZE 0x20802a08 #define TU104_CTRL_CE_GET_PHYSICAL_CAPS 0x20802a07 @@ -754,7 +756,18 @@ static const struct tu104_internal_device_info tu104_internal_device_table[] = { TU104_CE_CAPS0_SYSMEM | \ TU104_CE_CAPS0_P2P | \ TU104_CE_CAPS0_BL_GT_64K) -#define TU104_CE_CAPS1 0x00 +/* + * Caps byte 1: the 2D/3D copy path requires a CE that supports the + * blocklinear access modes (hardware bug 200288104): the X driver's + * nvCEChooseEngine skips every CE without CE_SUPPORTS_NONPIPELINED_BL + * (byte1 0x01; and PIPELINED_BL 0x02 for the preferred pass) and then + * fails with "Failed to find a suitable copy object" - the observed wall + * after the DMA pushbuffer test started passing. Turing's CEs are fully + * capable (pipelined + non-pipelined BL + pitchlinear): byte1 = 0x03. + * (Reference: ctrl2080ce.h NV2080_CTRL_CE_CAPS_CE_SUPPORTS_*_BL 1:0x01/ + * 1:0x02.) + */ +#define TU104_CE_CAPS1 0x03 /* ENGINE_TYPE_COPY0 = 0x9, COPY(i) = COPY0 + i (cl2080_notification.h) */ #define TU104_ENGINE_TYPE_COPY0 0x00000009 @@ -934,6 +947,17 @@ struct tu104_bus_get_info_v2_params { #define TU104_BUS_INFO_IDX_PCIE_DOWNSTREAM_LINK_CTRL 0x0a #define TU104_BUS_INFO_IDX_PCIE_GEN_INFO 0x2d #define TU104_BUS_INFO_IDX_SYSMEM_CONNECTION_TYPE 0x33 +/* + * SESSION 155 CONT 26: GPU GART size / DMA flags. The GL client's buffer + * allocator reads GPU_GART_SIZE and the GPUGART/CTXDMA capability flags + * from BUS_GET_INFO_V2 at context init; a zero reply makes gpuGartSize=0, + * the heap limits 0, and every glBufferData(data)/glMapBufferRange fail + * GL_OUT_OF_MEMORY (the GZDoom GL crash). + */ +#define TU104_BUS_INFO_IDX_GPU_GART_SIZE 0x0d +#define TU104_BUS_INFO_IDX_GPU_GART_SIZE_ALT 0x32 +#define TU104_BUS_INFO_IDX_GPU_GART_DMA_FLAGS_0 0x0b +#define TU104_BUS_INFO_IDX_GPU_GART_DMA_FLAGS_1 0x0c #define TU104_BUS_INFO_TYPE_PCI_EXPRESS 0x03 #define TU104_BUS_INFO_SYSMEM_CONN_PCIE 0x00 @@ -962,7 +986,11 @@ struct tu104_gr_static_info { /* infoList indices we populate (ctrl0080gr.h) */ #define TU104_GR_INFO_IDX_SHADER_PIPE_COUNT 0x07 +#define TU104_GR_INFO_IDX_THREAD_STACK_SCALING_FACTOR 0x08 #define TU104_GR_INFO_IDX_SHADER_PIPE_SUB_COUNT 0x09 +#define TU104_GR_INFO_IDX_SM_VERSION 0x0c +#define TU104_GR_INFO_IDX_MAX_WARPS_PER_SM 0x0d +#define TU104_GR_INFO_IDX_MAX_THREADS_PER_WARP 0x0e #define TU104_GR_INFO_IDX_LITTER_NUM_GPCS 0x14 #define TU104_GR_INFO_IDX_LITTER_NUM_TPC_PER_GPC 0x17 #define TU104_GR_INFO_IDX_GPU_CORE_COUNT 0x1d @@ -987,6 +1015,20 @@ struct tu104_gr_static_info { /* TU104 max subcontexts (NV_PGRAPH_PRI_FE_CHIP_DEF_INFO_MAX_VEID_COUNT_INIT) */ #define TU104_MAX_SUBCONTEXT_COUNT 64 +/* + * GR identity values the nvidia-3d library reads through GR_GET_INFO. + * SM_VERSION must be NV2080_CTRL_GR_INFO_SM_VERSION_7_5 (0x705): the 3D + * device allocation maps the SM version through a table and returns FALSE + * when it reads SM_VERSION_NONE (0). On the guest that surfaces as + * nvHsAllocDevice -> nvHs3dAllocDevice failing silently, and nvidia-drm + * reports "Failed to allocate NvKmsKapiDevice" (r1626 gdb: after_hs + * rax=0x0, hs_hs3d_fail_block). Warps/threads are the TU104 limits. + */ +#define TU104_GR_INFO_SM_VERSION_7_5 0x00000705 +#define TU104_MAX_WARPS_PER_SM 64 +#define TU104_MAX_THREADS_PER_WARP 32 +#define TU104_THREAD_STACK_SCALING_FACTOR 1 + /* NV2080_CTRL_INTERNAL_STATIC_GR_FLOORSWEEPING_MASKS (ctrl2080internal.h) * + STATIC_KGR_GET_FLOORSWEEPING_MASKS cmd = 0x20800a26. * Driver computes numGpcs from floorsweepingMasks.gpcMask - zero kills |
