Pull out card functions from evga-card
This commit is contained in:
+2
-23
@@ -1,6 +1,8 @@
|
||||
#ifndef EVGA_CARD_H
|
||||
#define EVGA_CARD_H
|
||||
|
||||
#include "card.h"
|
||||
|
||||
#define NVIDIA_VEN 0x10DE
|
||||
|
||||
#define NVIDIA_RTX3060_DEV 0x2503
|
||||
@@ -83,27 +85,6 @@
|
||||
#define EVGA_RTX3090TI_FTW3_GAMING_SUB_DEV 0x4983
|
||||
#define EVGA_RTX3090TI_FTW3_ULTRA_GAMING_SUB_DEV 0x4985
|
||||
|
||||
struct card_info {
|
||||
char *card_name; /* The 'nice' name of the card */
|
||||
char *pci_id; /* PCI bus address in domain:bus:device.function format. May be shortened (e.g. c:00.0) */
|
||||
unsigned short pci_device_id; /* The device ID of the card, i.e. corresponds to the NVIDIA model number */
|
||||
char *i2c_dev_path; /* Path to the i2c device file */
|
||||
int i2c_fd; /* File descriptor for the i2c device file, for re-use */
|
||||
int product_id; /* EVGA internal product ID, as reported by the iCX3 controller */
|
||||
unsigned int bar0; /* Address of the card's PCI base address register */
|
||||
void *nvml_device; /* Pointer to nvmlDevice_t for use in NVML calls */
|
||||
void *vram_addr; /* Memory mapping for GDDR6 temps */
|
||||
void *hotspot_addr; /* Memory mapping for hotspot temperature */
|
||||
};
|
||||
|
||||
struct gpu_pci_info {
|
||||
char *card_name;
|
||||
unsigned short vendor_id;
|
||||
unsigned short device_id;
|
||||
unsigned short subvendor_id;
|
||||
unsigned short subdevice_id;
|
||||
};
|
||||
|
||||
static struct gpu_pci_info evga_pci_ids[] =
|
||||
{
|
||||
{"EVGA GeForce RTX 3060 Ti FTW3 Gaming" , NVIDIA_VEN, NVIDIA_RTX3060TI_DEV, EVGA_SUB_VEN, EVGA_RTX3060TI_FTW3_GAMING_SUB_DEV },
|
||||
@@ -166,7 +147,5 @@ static struct gpu_pci_info evga_pci_ids[] =
|
||||
};
|
||||
|
||||
int find_evga_gpu_i2cs(struct card_info *infos, int max_gpus, int i2c_bus);
|
||||
unsigned short read_pci_id(char *device_path, char *field);
|
||||
char *read_nvidia_pci_address(char *device_path);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user