Skip to content

Commit 5e269dd

Browse files
Add support for the PNY Epic-X ARGB 5070, 5080, and 5090 variants
1 parent 476f81d commit 5e269dd

File tree

5 files changed

+120
-50
lines changed

5 files changed

+120
-50
lines changed

Controllers/PNYARGBEpicXGPUController/PNYARGBEpicXGPUController.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212

1313
#include "PNYARGBEpicXGPUController.h"
1414

15-
PNYARGBEpicXGPUController::PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name)
15+
PNYARGBEpicXGPUController::PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name, bool large_variant)
1616
{
17-
this->bus = bus;
18-
this->i2c_addr = init_i2c_addr;
19-
this->name = name;
17+
this->bus = bus;
18+
this->i2c_addr = init_i2c_addr;
19+
this->name = name;
20+
this->large_variant = large_variant;
2021
}
2122

2223
PNYARGBEpicXGPUController::~PNYARGBEpicXGPUController()
@@ -39,9 +40,14 @@ std::string PNYARGBEpicXGPUController::GetDeviceName()
3940
return(name);
4041
}
4142

43+
bool PNYARGBEpicXGPUController::IsLargeVariant()
44+
{
45+
return(large_variant);
46+
}
47+
4248
void PNYARGBEpicXGPUController::SetZoneMode(unsigned char zone, unsigned char mode, unsigned char speed, unsigned char brightness, unsigned char subcmd, RGBColor color)
4349
{
44-
unsigned char data[7] =
50+
unsigned char data[7] =
4551
{
4652
mode,
4753
brightness,
@@ -69,4 +75,4 @@ void PNYARGBEpicXGPUController::SetLEDDirect(unsigned char zone, unsigned char l
6975
};
7076

7177
bus->i2c_smbus_write_i2c_block_data(i2c_addr, zone, sizeof(data), data);
72-
}
78+
}

Controllers/PNYARGBEpicXGPUController/PNYARGBEpicXGPUController.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,20 @@ enum
4545
class PNYARGBEpicXGPUController
4646
{
4747
public:
48-
PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name);
48+
PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name, bool large_variant);
4949
~PNYARGBEpicXGPUController();
5050

5151
std::string GetDeviceLocation();
5252
std::string GetDeviceName();
53-
53+
54+
bool IsLargeVariant();
55+
5456
void SetZoneMode(unsigned char zone, unsigned char mode, unsigned char speed, unsigned char brightness, unsigned char subcmd, RGBColor color);
5557
void SetLEDDirect(unsigned char zone, unsigned char led, unsigned char mode, RGBColor color);
5658

5759
private:
5860
i2c_smbus_interface* bus;
5961
unsigned char i2c_addr;
6062
std::string name;
63+
bool large_variant;
6164
};

Controllers/PNYARGBEpicXGPUController/PNYARGBEpicXGPUControllerDetect.cpp

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,35 @@
1111
\*---------------------------------------------------------*/
1212

1313
#include "Detector.h"
14+
#include "i2c_smbus.h"
1415
#include "LogManager.h"
16+
#include "pci_ids.h"
1517
#include "PNYARGBEpicXGPUController.h"
1618
#include "RGBController_PNYARGBEpicXGPU.h"
17-
#include "i2c_smbus.h"
18-
#include "pci_ids.h"
1919

20-
/*-----------------------------------------------------------------------------------------*\
21-
| DetectPNYARGBEpicXGPUControllers |
22-
| |
23-
| Detect PNY ARGB Epic X GPU controllers on the enumerated I2C busses at address 0x60. |
24-
| |
25-
| bus - pointer to i2c_smbus_interface where PNY GPU device is connected |
26-
| dev - I2C address of PNY GPU device |
27-
\*-----------------------------------------------------------------------------------------*/
20+
void DetectPNYARGBEpicXGPUSmallControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
21+
{
22+
if(bus->port_id == 1)
23+
{
24+
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name, false);
25+
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
26+
27+
ResourceManager::get()->RegisterRGBController(rgb_controller);
28+
}
29+
}
2830

29-
void DetectPNYARGBEpicXGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
31+
void DetectPNYARGBEpicXGPULargeControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
3032
{
31-
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name);
32-
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
33+
if(bus->port_id == 1)
34+
{
35+
PNYARGBEpicXGPUController* controller = new PNYARGBEpicXGPUController(bus, i2c_addr, name, true);
36+
RGBController_PNYARGBEpicXGPU* rgb_controller = new RGBController_PNYARGBEpicXGPU(controller);
3337

34-
ResourceManager::get()->RegisterRGBController(rgb_controller);
35-
} /* DetectPNYARGBEpicXGPUControllers() */
38+
ResourceManager::get()->RegisterRGBController(rgb_controller);
39+
}
40+
}
3641

37-
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);
38-
//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);
39-
//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);
42+
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);
43+
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);
44+
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);
45+
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);

Controllers/PNYARGBEpicXGPUController/RGBController_PNYARGBEpicXGPU.cpp

Lines changed: 78 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,39 @@ RGBController_PNYARGBEpicXGPU::~RGBController_PNYARGBEpicXGPU()
5959
void RGBController_PNYARGBEpicXGPU::SetupZones()
6060
{
6161
/*-----------------------------------------------------*\
62-
| The logo zone has 4 LEDs, but they are part of the |
63-
| FRONT register zone |
62+
| The side logo zone has 4 LEDs, but they are part of |
63+
| the FRONT register zone |
64+
| |
65+
| This card has two variants, large and small. Large |
66+
| is used on the 5080 and 5090 and has an extra logo |
67+
| zone on the rear of the card as well as additional |
68+
| LEDs in the arrow zone. The small variant is used on |
69+
| the 5070 Ti and lower cards. |
6470
\*-----------------------------------------------------*/
65-
zone logo;
66-
logo.name = "Logo";
67-
logo.type = ZONE_TYPE_LINEAR;
68-
logo.leds_min = 4;
69-
logo.leds_max = 4;
70-
logo.leds_count = 4;
71-
logo.matrix_map = NULL;
72-
zones.push_back(logo);
73-
74-
for(std::size_t led_idx = 0; led_idx < logo.leds_count; led_idx++)
71+
zone side_logo;
72+
73+
if(controller->IsLargeVariant())
74+
{
75+
side_logo.name = "Side Logo";
76+
}
77+
else
7578
{
76-
led logo_led;
79+
side_logo.name = "Logo";
80+
}
7781

78-
logo_led.name = "Logo LED " + std::to_string(led_idx);
79-
logo_led.value = PNY_GPU_REG_ZONE_FRONT;
82+
side_logo.type = ZONE_TYPE_LINEAR;
83+
side_logo.leds_min = 4;
84+
side_logo.leds_max = 4;
85+
side_logo.leds_count = 4;
86+
side_logo.matrix_map = NULL;
87+
zones.push_back(side_logo);
8088

81-
leds.push_back(logo_led);
89+
for(std::size_t led_idx = 0; led_idx < side_logo.leds_count; led_idx++)
90+
{
91+
led side_logo_led;
92+
side_logo_led.name = side_logo.name + " LED " + std::to_string(led_idx);
93+
side_logo_led.value = PNY_GPU_REG_ZONE_FRONT;
94+
leds.push_back(side_logo_led);
8295
zone_led_idx.push_back((unsigned char)(led_idx + 20));
8396
}
8497

@@ -98,37 +111,67 @@ void RGBController_PNYARGBEpicXGPU::SetupZones()
98111
for(std::size_t led_idx = 0; led_idx < front.leds_count; led_idx++)
99112
{
100113
led front_led;
101-
102114
front_led.name = "Front LED " + std::to_string(led_idx);
103115
front_led.value = PNY_GPU_REG_ZONE_FRONT;
104-
105116
leds.push_back(front_led);
106117
zone_led_idx.push_back((unsigned char)led_idx);
107118
}
108119

109120
/*-----------------------------------------------------*\
110-
| The arrow zone has 17 LEDs |
121+
| The arrow zone has 17 LEDs on the small variant, 19 |
122+
| LEDs on the large variant |
111123
\*-----------------------------------------------------*/
124+
unsigned int arrow_led_count;
125+
126+
if(controller->IsLargeVariant())
127+
{
128+
arrow_led_count = 19;
129+
}
130+
else
131+
{
132+
arrow_led_count = 17;
133+
}
134+
112135
zone arrow;
113136
arrow.name = "Arrow";
114137
arrow.type = ZONE_TYPE_LINEAR;
115-
arrow.leds_min = 17;
116-
arrow.leds_max = 17;
117-
arrow.leds_count = 17;
138+
arrow.leds_min = arrow_led_count;
139+
arrow.leds_max = arrow_led_count;
140+
arrow.leds_count = arrow_led_count;
118141
arrow.matrix_map = NULL;
119142
zones.push_back(arrow);
120143

121144
for(std::size_t led_idx = 0; led_idx < arrow.leds_count; led_idx++)
122145
{
123146
led arrow_led;
124-
125147
arrow_led.name = "Arrow LED " + std::to_string(led_idx);
126148
arrow_led.value = PNY_GPU_REG_ZONE_ARROW;
127-
128149
leds.push_back(arrow_led);
129150
zone_led_idx.push_back((unsigned char)led_idx);
130151
}
131152

153+
/*-----------------------------------------------------*\
154+
| The rear logo zone is only present on the large |
155+
| variant |
156+
\*-----------------------------------------------------*/
157+
if(controller->IsLargeVariant())
158+
{
159+
zone rear_logo;
160+
rear_logo.name = "Rear Logo";
161+
rear_logo.type = ZONE_TYPE_SINGLE;
162+
rear_logo.leds_min = 1;
163+
rear_logo.leds_max = 1;
164+
rear_logo.leds_count = 1;
165+
rear_logo.matrix_map = NULL;
166+
zones.push_back(rear_logo);
167+
168+
led rear_logo_led;
169+
rear_logo_led.name = "Rear Logo LED";
170+
rear_logo_led.value = PNY_GPU_REG_ZONE_LOGO;
171+
leds.push_back(rear_logo_led);
172+
zone_led_idx.push_back(0);
173+
}
174+
132175
SetupColors();
133176
}
134177

@@ -166,11 +209,22 @@ void RGBController_PNYARGBEpicXGPU::DeviceUpdateMode()
166209
{
167210
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]);
168211
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]);
212+
213+
if(controller->IsLargeVariant())
214+
{
215+
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]);
216+
}
169217
}
170218
else if(modes[active_mode].color_mode == MODE_COLORS_PER_LED)
171219
{
172220
controller->SetZoneMode(PNY_GPU_REG_ZONE_FRONT, modes[active_mode].value, 0, 0xFF, 0, 0);
173221
controller->SetZoneMode(PNY_GPU_REG_ZONE_ARROW, modes[active_mode].value, 0, 0xFF, 0, 0);
222+
223+
if(controller->IsLargeVariant())
224+
{
225+
controller->SetZoneMode(PNY_GPU_REG_ZONE_LOGO, modes[active_mode].value, 0, 0xFF, 0, 0);
226+
}
227+
174228
DeviceUpdateLEDs();
175229
}
176230
}

pci_ids/pci_ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@
862862
#define PNY_RTX_4090_XLR8_VERTO_SUB_DEV 0x13AE
863863
#define PNY_RTX_4090_VERTO_EPIC_X_SUB_DEV 0x13D8
864864
#define PNY_RTX_4090_VERTO_EPIC_X_OC_SUB_DEV 0x13D9
865+
#define PNY_RTX_5070_ARGB_EPIC_X_OC_SUB_DEV 0x1439
865866
#define PNY_RTX_5070TI_ARGB_EPIC_X_OC_SUB_DEV 0x143A
866867
#define PNY_RTX_5080_ARGB_EPIC_X_OC_SUB_DEV 0x1435
867868
#define PNY_RTX_5090_ARGB_EPIC_X_OC_SUB_DEV 0x1446

0 commit comments

Comments
 (0)