1b7019ac5SIlia Mirkin /* SPDX-License-Identifier: MIT */ 2923bc416SBen Skeggs #ifndef __NVIF_CL0080_H__ 3923bc416SBen Skeggs #define __NVIF_CL0080_H__ 4923bc416SBen Skeggs 5923bc416SBen Skeggs struct nv_device_v0 { 6923bc416SBen Skeggs __u8 version; 7148a8653SBen Skeggs __u8 priv; 8148a8653SBen Skeggs __u8 pad02[6]; 9923bc416SBen Skeggs __u64 device; /* device identifier, ~0 for client default */ 10923bc416SBen Skeggs }; 11923bc416SBen Skeggs 12923bc416SBen Skeggs #define NV_DEVICE_V0_INFO 0x00 13923bc416SBen Skeggs #define NV_DEVICE_V0_TIME 0x01 14923bc416SBen Skeggs 15923bc416SBen Skeggs struct nv_device_info_v0 { 16923bc416SBen Skeggs __u8 version; 17923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_IGP 0x00 18923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_PCI 0x01 19923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_AGP 0x02 20923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_PCIE 0x03 21923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_SOC 0x04 22923bc416SBen Skeggs __u8 platform; 23923bc416SBen Skeggs __u16 chipset; /* from NV_PMC_BOOT_0 */ 24923bc416SBen Skeggs __u8 revision; /* from NV_PMC_BOOT_0 */ 25923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_TNT 0x01 26923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_CELSIUS 0x02 27923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_KELVIN 0x03 28923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_RANKINE 0x04 29923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_CURIE 0x05 30923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_TESLA 0x06 31923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_FERMI 0x07 32923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_KEPLER 0x08 33923bc416SBen Skeggs #define NV_DEVICE_INFO_V0_MAXWELL 0x09 347f53abdbSBen Skeggs #define NV_DEVICE_INFO_V0_PASCAL 0x0a 35c1f856bbSBen Skeggs #define NV_DEVICE_INFO_V0_VOLTA 0x0b 36344d9c8fSBen Skeggs #define NV_DEVICE_INFO_V0_TURING 0x0c 373b050680SBen Skeggs #define NV_DEVICE_INFO_V0_AMPERE 0x0d 38923bc416SBen Skeggs __u8 family; 39923bc416SBen Skeggs __u8 pad06[2]; 40923bc416SBen Skeggs __u64 ram_size; 41923bc416SBen Skeggs __u64 ram_user; 42923bc416SBen Skeggs char chip[16]; 43923bc416SBen Skeggs char name[64]; 44923bc416SBen Skeggs }; 45923bc416SBen Skeggs 46c5c9127bSBen Skeggs struct nv_device_info_v1 { 47c5c9127bSBen Skeggs __u8 version; 48c5c9127bSBen Skeggs __u8 count; 49c5c9127bSBen Skeggs __u8 pad02[6]; 50c5c9127bSBen Skeggs struct nv_device_info_v1_data { 51c5c9127bSBen Skeggs __u64 mthd; /* NV_DEVICE_INFO_* (see below). */ 52c5c9127bSBen Skeggs __u64 data; 53c5c9127bSBen Skeggs } data[]; 54c5c9127bSBen Skeggs }; 55c5c9127bSBen Skeggs 56923bc416SBen Skeggs struct nv_device_time_v0 { 57923bc416SBen Skeggs __u8 version; 58923bc416SBen Skeggs __u8 pad01[7]; 59923bc416SBen Skeggs __u64 time; 60923bc416SBen Skeggs }; 61c5c9127bSBen Skeggs 62c5c9127bSBen Skeggs #define NV_DEVICE_INFO_UNIT (0xffffffffULL << 32) 63c5c9127bSBen Skeggs #define NV_DEVICE_INFO(n) ((n) | (0x00000000ULL << 32)) 64f8fabd31SBen Skeggs #define NV_DEVICE_HOST(n) ((n) | (0x00000001ULL << 32)) 65c5c9127bSBen Skeggs 66f8fabd31SBen Skeggs /* This will be returned in the mthd field for unsupported queries. */ 67c5c9127bSBen Skeggs #define NV_DEVICE_INFO_INVALID ~0ULL 686eb01aa8SBen Skeggs 69f8fabd31SBen Skeggs /* Returns the number of available runlists. */ 70f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLISTS NV_DEVICE_HOST(0x00000000) 71*eb39c613SBen Skeggs /* Returns the number of available channels (0 if per-runlist). */ 72f8fabd31SBen Skeggs #define NV_DEVICE_HOST_CHANNELS NV_DEVICE_HOST(0x00000001) 73cc362050SBen Skeggs 74f8fabd31SBen Skeggs /* Returns a mask of available engine types on runlist(data). */ 75f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES NV_DEVICE_HOST(0x00000100) 76f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_SW 0x00000001 77f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_GR 0x00000002 78f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_MPEG 0x00000004 79f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_ME 0x00000008 80f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_CIPHER 0x00000010 81f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_BSP 0x00000020 82f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_VP 0x00000040 83f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_CE 0x00000080 84f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_SEC 0x00000100 85f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_MSVLD 0x00000200 86f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_MSPDEC 0x00000400 87f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_MSPPP 0x00000800 88f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_MSENC 0x00001000 89f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_VIC 0x00002000 90f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_SEC2 0x00004000 91f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC 0x00008000 92f8fabd31SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_ENGINES_NVENC 0x00010000 93*eb39c613SBen Skeggs /* Returns the number of available channels on runlist(data). */ 94*eb39c613SBen Skeggs #define NV_DEVICE_HOST_RUNLIST_CHANNELS NV_DEVICE_HOST(0x00000101) 95923bc416SBen Skeggs #endif 96