162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci#ifndef __NVIF_CL0080_H__ 362306a36Sopenharmony_ci#define __NVIF_CL0080_H__ 462306a36Sopenharmony_ci 562306a36Sopenharmony_cistruct nv_device_v0 { 662306a36Sopenharmony_ci __u8 version; 762306a36Sopenharmony_ci __u8 priv; 862306a36Sopenharmony_ci __u8 pad02[6]; 962306a36Sopenharmony_ci __u64 device; /* device identifier, ~0 for client default */ 1062306a36Sopenharmony_ci}; 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#define NV_DEVICE_V0_INFO 0x00 1362306a36Sopenharmony_ci#define NV_DEVICE_V0_TIME 0x01 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_cistruct nv_device_info_v0 { 1662306a36Sopenharmony_ci __u8 version; 1762306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_IGP 0x00 1862306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_PCI 0x01 1962306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_AGP 0x02 2062306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_PCIE 0x03 2162306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_SOC 0x04 2262306a36Sopenharmony_ci __u8 platform; 2362306a36Sopenharmony_ci __u16 chipset; /* from NV_PMC_BOOT_0 */ 2462306a36Sopenharmony_ci __u8 revision; /* from NV_PMC_BOOT_0 */ 2562306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_TNT 0x01 2662306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_CELSIUS 0x02 2762306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_KELVIN 0x03 2862306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_RANKINE 0x04 2962306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_CURIE 0x05 3062306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_TESLA 0x06 3162306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_FERMI 0x07 3262306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_KEPLER 0x08 3362306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_MAXWELL 0x09 3462306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_PASCAL 0x0a 3562306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_VOLTA 0x0b 3662306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_TURING 0x0c 3762306a36Sopenharmony_ci#define NV_DEVICE_INFO_V0_AMPERE 0x0d 3862306a36Sopenharmony_ci __u8 family; 3962306a36Sopenharmony_ci __u8 pad06[2]; 4062306a36Sopenharmony_ci __u64 ram_size; 4162306a36Sopenharmony_ci __u64 ram_user; 4262306a36Sopenharmony_ci char chip[16]; 4362306a36Sopenharmony_ci char name[64]; 4462306a36Sopenharmony_ci}; 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_cistruct nv_device_info_v1 { 4762306a36Sopenharmony_ci __u8 version; 4862306a36Sopenharmony_ci __u8 count; 4962306a36Sopenharmony_ci __u8 pad02[6]; 5062306a36Sopenharmony_ci struct nv_device_info_v1_data { 5162306a36Sopenharmony_ci __u64 mthd; /* NV_DEVICE_INFO_* (see below). */ 5262306a36Sopenharmony_ci __u64 data; 5362306a36Sopenharmony_ci } data[]; 5462306a36Sopenharmony_ci}; 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_cistruct nv_device_time_v0 { 5762306a36Sopenharmony_ci __u8 version; 5862306a36Sopenharmony_ci __u8 pad01[7]; 5962306a36Sopenharmony_ci __u64 time; 6062306a36Sopenharmony_ci}; 6162306a36Sopenharmony_ci 6262306a36Sopenharmony_ci#define NV_DEVICE_INFO_UNIT (0xffffffffULL << 32) 6362306a36Sopenharmony_ci#define NV_DEVICE_INFO(n) ((n) | (0x00000000ULL << 32)) 6462306a36Sopenharmony_ci#define NV_DEVICE_HOST(n) ((n) | (0x00000001ULL << 32)) 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ci/* This will be returned in the mthd field for unsupported queries. */ 6762306a36Sopenharmony_ci#define NV_DEVICE_INFO_INVALID ~0ULL 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci/* Returns the number of available runlists. */ 7062306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLISTS NV_DEVICE_HOST(0x00000000) 7162306a36Sopenharmony_ci/* Returns the number of available channels (0 if per-runlist). */ 7262306a36Sopenharmony_ci#define NV_DEVICE_HOST_CHANNELS NV_DEVICE_HOST(0x00000001) 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci/* Returns a mask of available engine types on runlist(data). */ 7562306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES NV_DEVICE_HOST(0x00000100) 7662306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_SW 0x00000001 7762306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_GR 0x00000002 7862306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_MPEG 0x00000004 7962306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_ME 0x00000008 8062306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_CIPHER 0x00000010 8162306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_BSP 0x00000020 8262306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_VP 0x00000040 8362306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_CE 0x00000080 8462306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_SEC 0x00000100 8562306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_MSVLD 0x00000200 8662306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_MSPDEC 0x00000400 8762306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_MSPPP 0x00000800 8862306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_MSENC 0x00001000 8962306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_VIC 0x00002000 9062306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_SEC2 0x00004000 9162306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_NVDEC 0x00008000 9262306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_ENGINES_NVENC 0x00010000 9362306a36Sopenharmony_ci/* Returns the number of available channels on runlist(data). */ 9462306a36Sopenharmony_ci#define NV_DEVICE_HOST_RUNLIST_CHANNELS NV_DEVICE_HOST(0x00000101) 9562306a36Sopenharmony_ci#endif 96