Add support for the PNY Epic-X ARGB 5070, 5080, and 5090 variants

master
Adam Honse 3 months ago
parent 476f81d5e8
commit 5e269dd089

@ -12,11 +12,12 @@
#include "PNYARGBEpicXGPUController.h"
PNYARGBEpicXGPUController::PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name)
PNYARGBEpicXGPUController::PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name, bool large_variant)
{
this->bus = bus;
this->i2c_addr = init_i2c_addr;
this->name = name;
this->bus = bus;
this->i2c_addr = init_i2c_addr;
this->name = name;
this->large_variant = large_variant;
}
PNYARGBEpicXGPUController::~PNYARGBEpicXGPUController()
@ -39,9 +40,14 @@ std::string PNYARGBEpicXGPUController::GetDeviceName()
return(name);
}
bool PNYARGBEpicXGPUController::IsLargeVariant()
{
return(large_variant);
}
void PNYARGBEpicXGPUController::SetZoneMode(unsigned char zone, unsigned char mode, unsigned char speed, unsigned char brightness, unsigned char subcmd, RGBColor color)
{
unsigned char data[7] =
unsigned char data[7] =
{
mode,
brightness,
@ -69,4 +75,4 @@ void PNYARGBEpicXGPUController::SetLEDDirect(unsigned char zone, unsigned char l
};
bus->i2c_smbus_write_i2c_block_data(i2c_addr, zone, sizeof(data), data);
}
}

@ -45,12 +45,14 @@ enum
class PNYARGBEpicXGPUController
{
public:
PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name);
PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name, bool large_variant);
~PNYARGBEpicXGPUController();
std::string GetDeviceLocation();
std::string GetDeviceName();
bool IsLargeVariant();
void SetZoneMode(unsigned char zone, unsigned char mode, unsigned char speed, unsigned char brightness, unsigned char subcmd, RGBColor color);
void SetLEDDirect(unsigned char zone, unsigned char led, unsigned char mode, RGBColor color);
@ -58,4 +60,5 @@ private:
i2c_smbus_interface* bus;
unsigned char i2c_addr;
std::string name;
bool large_variant;
};

@ -11,29 +11,35 @@
\*---------------------------------------------------------*/
#include "Detector.h"
#include "i2c_smbus.h"
#include "LogManager.h"
#include "pci_ids.h"
#include "PNYARGBEpicXGPUController.h"
#include "RGBController_PNYARGBEpicXGPU.h"
#include "i2c_smbus.h"
#include "pci_ids.h"
/*-----------------------------------------------------------------------------------------*\
| DetectPNYARGBEpicXGPUControllers |
| |
| Detect PNY ARGB Epic X GPU controllers on the enumerated I2C busses at address 0x60. |
| |
| bus - pointer to i2c_smbus_interface where PNY GPU device is connected |
| dev - I2C address of PNY GPU device |
\*-----------------------------------------------------------------------------------------*/
void DetectPNYARGBEpicXGPUSmallControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
{
if(bus->port_id == 1)
{
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name, false);
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
void DetectPNYARGBEpicXGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
void DetectPNYARGBEpicXGPULargeControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
{
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name);
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
if(bus->port_id == 1)
{
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name, true);
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
} /* DetectPNYARGBEpicXGPUControllers() */
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5070Ti ARGB Epic-X OC", DetectPNYARGBEpicXGPUControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PNY_SUB_VEN, PNY_RTX_5070TI_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
//REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5080 ARGB Epic-X OC", DetectPNYARGBEpicXGPUControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PNY_SUB_VEN, PNY_RTX_5080_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
//REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5090 ARGB Epic-X OC", DetectPNYARGBEpicXGPUControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, PNY_SUB_VEN, PNY_RTX_5090_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5070 ARGB Epic-X OC", DetectPNYARGBEpicXGPUSmallControllers, NVIDIA_VEN, NVIDIA_RTX5070_DEV, PNY_SUB_VEN, PNY_RTX_5070_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5070Ti ARGB Epic-X OC", DetectPNYARGBEpicXGPUSmallControllers, NVIDIA_VEN, NVIDIA_RTX5070TI_DEV, PNY_SUB_VEN, PNY_RTX_5070TI_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5080 ARGB Epic-X OC", DetectPNYARGBEpicXGPULargeControllers, NVIDIA_VEN, NVIDIA_RTX5080_DEV, PNY_SUB_VEN, PNY_RTX_5080_ARGB_EPIC_X_OC_SUB_DEV, 0x60);
REGISTER_I2C_PCI_DETECTOR("PNY GeForce RTX 5090 ARGB Epic-X OC", DetectPNYARGBEpicXGPULargeControllers, NVIDIA_VEN, NVIDIA_RTX5090_DEV, PNY_SUB_VEN, PNY_RTX_5090_ARGB_EPIC_X_OC_SUB_DEV, 0x60);

@ -59,26 +59,39 @@ RGBController_PNYARGBEpicXGPU::~RGBController_PNYARGBEpicXGPU()
void RGBController_PNYARGBEpicXGPU::SetupZones()
{
/*-----------------------------------------------------*\
| The logo zone has 4 LEDs, but they are part of the |
| FRONT register zone |
| The side logo zone has 4 LEDs, but they are part of |
| the FRONT register zone |
| |
| This card has two variants, large and small. Large |
| is used on the 5080 and 5090 and has an extra logo |
| zone on the rear of the card as well as additional |
| LEDs in the arrow zone. The small variant is used on |
| the 5070 Ti and lower cards. |
\*-----------------------------------------------------*/
zone logo;
logo.name = "Logo";
logo.type = ZONE_TYPE_LINEAR;
logo.leds_min = 4;
logo.leds_max = 4;
logo.leds_count = 4;
logo.matrix_map = NULL;
zones.push_back(logo);
for(std::size_t led_idx = 0; led_idx < logo.leds_count; led_idx++)
zone side_logo;
if(controller->IsLargeVariant())
{
side_logo.name = "Side Logo";
}
else
{
led logo_led;
side_logo.name = "Logo";
}
logo_led.name = "Logo LED " + std::to_string(led_idx);
logo_led.value = PNY_GPU_REG_ZONE_FRONT;
side_logo.type = ZONE_TYPE_LINEAR;
side_logo.leds_min = 4;
side_logo.leds_max = 4;
side_logo.leds_count = 4;
side_logo.matrix_map = NULL;
zones.push_back(side_logo);
leds.push_back(logo_led);
for(std::size_t led_idx = 0; led_idx < side_logo.leds_count; led_idx++)
{
led side_logo_led;
side_logo_led.name = side_logo.name + " LED " + std::to_string(led_idx);
side_logo_led.value = PNY_GPU_REG_ZONE_FRONT;
leds.push_back(side_logo_led);
zone_led_idx.push_back((unsigned char)(led_idx + 20));
}
@ -98,37 +111,67 @@ void RGBController_PNYARGBEpicXGPU::SetupZones()
for(std::size_t led_idx = 0; led_idx < front.leds_count; led_idx++)
{
led front_led;
front_led.name = "Front LED " + std::to_string(led_idx);
front_led.value = PNY_GPU_REG_ZONE_FRONT;
leds.push_back(front_led);
zone_led_idx.push_back((unsigned char)led_idx);
}
/*-----------------------------------------------------*\
| The arrow zone has 17 LEDs |
| The arrow zone has 17 LEDs on the small variant, 19 |
| LEDs on the large variant |
\*-----------------------------------------------------*/
unsigned int arrow_led_count;
if(controller->IsLargeVariant())
{
arrow_led_count = 19;
}
else
{
arrow_led_count = 17;
}
zone arrow;
arrow.name = "Arrow";
arrow.type = ZONE_TYPE_LINEAR;
arrow.leds_min = 17;
arrow.leds_max = 17;
arrow.leds_count = 17;
arrow.leds_min = arrow_led_count;
arrow.leds_max = arrow_led_count;
arrow.leds_count = arrow_led_count;
arrow.matrix_map = NULL;
zones.push_back(arrow);
for(std::size_t led_idx = 0; led_idx < arrow.leds_count; led_idx++)
{
led arrow_led;
arrow_led.name = "Arrow LED " + std::to_string(led_idx);
arrow_led.value = PNY_GPU_REG_ZONE_ARROW;
leds.push_back(arrow_led);
zone_led_idx.push_back((unsigned char)led_idx);
}
/*-----------------------------------------------------*\
| The rear logo zone is only present on the large |
| variant |
\*-----------------------------------------------------*/
if(controller->IsLargeVariant())
{
zone rear_logo;
rear_logo.name = "Rear Logo";
rear_logo.type = ZONE_TYPE_SINGLE;
rear_logo.leds_min = 1;
rear_logo.leds_max = 1;
rear_logo.leds_count = 1;
rear_logo.matrix_map = NULL;
zones.push_back(rear_logo);
led rear_logo_led;
rear_logo_led.name = "Rear Logo LED";
rear_logo_led.value = PNY_GPU_REG_ZONE_LOGO;
leds.push_back(rear_logo_led);
zone_led_idx.push_back(0);
}
SetupColors();
}
@ -166,11 +209,22 @@ void RGBController_PNYARGBEpicXGPU::DeviceUpdateMode()
{
controller->SetZoneMode(PNY_GPU_REG_ZONE_FRONT, modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, 0, modes[active_mode].colors[0]);
controller->SetZoneMode(PNY_GPU_REG_ZONE_ARROW, modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, 0, modes[active_mode].colors[0]);
if(controller->IsLargeVariant())
{
controller->SetZoneMode(PNY_GPU_REG_ZONE_LOGO, modes[active_mode].value, modes[active_mode].speed, modes[active_mode].brightness, 0, modes[active_mode].colors[0]);
}
}
else if(modes[active_mode].color_mode == MODE_COLORS_PER_LED)
{
controller->SetZoneMode(PNY_GPU_REG_ZONE_FRONT, modes[active_mode].value, 0, 0xFF, 0, 0);
controller->SetZoneMode(PNY_GPU_REG_ZONE_ARROW, modes[active_mode].value, 0, 0xFF, 0, 0);
if(controller->IsLargeVariant())
{
controller->SetZoneMode(PNY_GPU_REG_ZONE_LOGO, modes[active_mode].value, 0, 0xFF, 0, 0);
}
DeviceUpdateLEDs();
}
}

@ -862,6 +862,7 @@
#define PNY_RTX_4090_XLR8_VERTO_SUB_DEV 0x13AE
#define PNY_RTX_4090_VERTO_EPIC_X_SUB_DEV 0x13D8
#define PNY_RTX_4090_VERTO_EPIC_X_OC_SUB_DEV 0x13D9
#define PNY_RTX_5070_ARGB_EPIC_X_OC_SUB_DEV 0x1439
#define PNY_RTX_5070TI_ARGB_EPIC_X_OC_SUB_DEV 0x143A
#define PNY_RTX_5080_ARGB_EPIC_X_OC_SUB_DEV 0x1435
#define PNY_RTX_5090_ARGB_EPIC_X_OC_SUB_DEV 0x1446

Loading…
Cancel
Save