Initial support for PNY ARGB EPIC X 5070Ti
Commits squashed, cleaned, and reworked for 5070Ti by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
parent
cb3f0fdcbd
commit
9bc2a6fa2b
6 changed files with 390 additions and 0 deletions
|
|
@ -0,0 +1,72 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| PNYARGBEpicXGPUController.cpp |
|
||||
| |
|
||||
| Driver for PNY ARGB Epic-X GPU |
|
||||
| |
|
||||
| Peter Berendi 27 Apr 2025 |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 01 Aug 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "PNYARGBEpicXGPUController.h"
|
||||
|
||||
PNYARGBEpicXGPUController::PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name)
|
||||
{
|
||||
this->bus = bus;
|
||||
this->i2c_addr = init_i2c_addr;
|
||||
this->name = name;
|
||||
}
|
||||
|
||||
PNYARGBEpicXGPUController::~PNYARGBEpicXGPUController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
std::string PNYARGBEpicXGPUController::GetDeviceLocation()
|
||||
{
|
||||
std::string return_string(bus->device_name);
|
||||
char addr[5];
|
||||
snprintf(addr, 5, "0x%02X", i2c_addr);
|
||||
return_string.append(", address ");
|
||||
return_string.append(addr);
|
||||
return("I2C: " + return_string);
|
||||
}
|
||||
|
||||
std::string PNYARGBEpicXGPUController::GetDeviceName()
|
||||
{
|
||||
return(name);
|
||||
}
|
||||
|
||||
void PNYARGBEpicXGPUController::SetZoneMode(unsigned char zone, unsigned char mode, unsigned char speed, unsigned char brightness, unsigned char subcmd, RGBColor color)
|
||||
{
|
||||
unsigned char data[7] =
|
||||
{
|
||||
mode,
|
||||
brightness,
|
||||
speed,
|
||||
subcmd,
|
||||
(unsigned char)RGBGetRValue(color),
|
||||
(unsigned char)RGBGetGValue(color),
|
||||
(unsigned char)RGBGetBValue(color)
|
||||
};
|
||||
|
||||
bus->i2c_smbus_write_i2c_block_data(i2c_addr, zone, sizeof(data), data);
|
||||
}
|
||||
|
||||
void PNYARGBEpicXGPUController::SetLEDDirect(unsigned char zone, unsigned char led, unsigned char mode, RGBColor color)
|
||||
{
|
||||
unsigned char data[7] =
|
||||
{
|
||||
mode,
|
||||
0xFF,
|
||||
led,
|
||||
0x00,
|
||||
(unsigned char)RGBGetRValue(color),
|
||||
(unsigned char)RGBGetGValue(color),
|
||||
(unsigned char)RGBGetBValue(color)
|
||||
};
|
||||
|
||||
bus->i2c_smbus_write_i2c_block_data(i2c_addr, zone, sizeof(data), data);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| PNYARGBEpicXGPUController.h |
|
||||
| |
|
||||
| Driver for PNY ARGB Epic-X GPU |
|
||||
| |
|
||||
| Peter Berendi 27 Apr 2025 |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 01 Aug 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "i2c_smbus.h"
|
||||
#include "RGBController.h"
|
||||
|
||||
enum
|
||||
{
|
||||
PNY_GPU_MODE_ARGB_OFF = 0x00,
|
||||
PNY_GPU_MODE_ARGB_BREATH = 0x0302,
|
||||
PNY_GPU_MODE_ARGB_CYCLE = 0x03,
|
||||
PNY_GPU_MODE_ARGB_NEON = 0x04,
|
||||
PNY_GPU_MODE_ARGB_EXPLOSION = 0x05,
|
||||
PNY_GPU_MODE_ARGB_SUPERNOVA = 0x06,
|
||||
PNY_GPU_MODE_ARGB_INFINITY = 0x07,
|
||||
PNY_GPU_MODE_ARGB_STREAMER = 0x08,
|
||||
PNY_GPU_MODE_ARGB_DIRECT = 0x09,
|
||||
PNY_GPU_MODE_ARGB_WAVE = 0x0A,
|
||||
};
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| The 5070Ti only uses FRONT and ARROW, the LOGO zone is |
|
||||
| used by the 5090 |
|
||||
\*---------------------------------------------------------*/
|
||||
enum
|
||||
{
|
||||
PNY_GPU_REG_ZONE_ARROW = 0x02,
|
||||
PNY_GPU_REG_ZONE_FRONT = 0x04,
|
||||
PNY_GPU_REG_ZONE_LOGO = 0x0F,
|
||||
PNY_GPU_REG_DETECT = 0x81,
|
||||
};
|
||||
|
||||
class PNYARGBEpicXGPUController
|
||||
{
|
||||
public:
|
||||
PNYARGBEpicXGPUController(i2c_smbus_interface* bus, unsigned char init_i2c_addr, std::string name);
|
||||
~PNYARGBEpicXGPUController();
|
||||
|
||||
std::string GetDeviceLocation();
|
||||
std::string GetDeviceName();
|
||||
|
||||
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);
|
||||
|
||||
private:
|
||||
i2c_smbus_interface* bus;
|
||||
unsigned char i2c_addr;
|
||||
std::string name;
|
||||
};
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| PNYARGBEpicXGPUControllerDetect.cpp |
|
||||
| |
|
||||
| Detector for PNY ARGB Epic-X GPU |
|
||||
| |
|
||||
| Peter Berendi 27 Apr 2025 |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 01 Aug 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "Detector.h"
|
||||
#include "LogManager.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 DetectPNYARGBEpicXGPUControllers(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);
|
||||
|
||||
ResourceManager::get()->RegisterRGBController(rgb_controller);
|
||||
} /* DetectPNYARGBEpicXGPUControllers() */
|
||||
|
||||
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);
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| RGBController_PNYARGBEpicXGPU.cpp |
|
||||
| |
|
||||
| RGBController for PNY ARGB Epic-X GPU |
|
||||
| |
|
||||
| Peter Berendi 27 Apr 2025 |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 01 Aug 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#include "pci_ids.h"
|
||||
#include "RGBController_PNYARGBEpicXGPU.h"
|
||||
|
||||
#define __ 0xFFFFFFFF
|
||||
|
||||
/**------------------------------------------------------------------*\
|
||||
@name PNY ARGB Epic-X GPU
|
||||
@category GPU
|
||||
@type I2C
|
||||
@save :x:
|
||||
@direct :white_check_mark:
|
||||
@effects :white_check_mark:
|
||||
@detectors DetectPNYARGBEpicXGPUControllers
|
||||
@comment
|
||||
\*-------------------------------------------------------------------*/
|
||||
|
||||
RGBController_PNYARGBEpicXGPU::RGBController_PNYARGBEpicXGPU(PNYARGBEpicXGPUController* controller_ptr)
|
||||
{
|
||||
controller = controller_ptr;
|
||||
|
||||
name = controller->GetDeviceName();
|
||||
vendor = "PNY";
|
||||
description = "PNY ARGB Epic-X GPU Device";
|
||||
location = controller->GetDeviceLocation();
|
||||
type = DEVICE_TYPE_GPU;
|
||||
|
||||
mode Direct;
|
||||
Direct.name = "Direct";
|
||||
Direct.value = PNY_GPU_MODE_ARGB_DIRECT;
|
||||
Direct.flags = MODE_FLAG_HAS_PER_LED_COLOR;
|
||||
Direct.color_mode = MODE_COLORS_PER_LED;
|
||||
Direct.brightness = 0xFF;
|
||||
Direct.brightness_min = 0;
|
||||
Direct.brightness_max = 0xFF;
|
||||
modes.push_back(Direct);
|
||||
|
||||
SetupZones();
|
||||
|
||||
active_mode = 0;
|
||||
}
|
||||
|
||||
RGBController_PNYARGBEpicXGPU::~RGBController_PNYARGBEpicXGPU()
|
||||
{
|
||||
delete controller;
|
||||
}
|
||||
|
||||
void RGBController_PNYARGBEpicXGPU::SetupZones()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| The logo zone has 4 LEDs, but they are part of the |
|
||||
| FRONT register zone |
|
||||
\*-----------------------------------------------------*/
|
||||
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++)
|
||||
{
|
||||
led logo_led;
|
||||
|
||||
logo_led.name = "Logo LED " + std::to_string(led_idx);
|
||||
logo_led.value = PNY_GPU_REG_ZONE_FRONT;
|
||||
|
||||
leds.push_back(logo_led);
|
||||
zone_led_idx.push_back((unsigned char)(led_idx + 20));
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| The front zone has 20 LEDs in a figure 8 pattern, the |
|
||||
| FRONT register has these 20 and then the 4 log LEDs |
|
||||
\*-----------------------------------------------------*/
|
||||
zone front;
|
||||
front.name = "Front";
|
||||
front.type = ZONE_TYPE_LINEAR;
|
||||
front.leds_min = 20;
|
||||
front.leds_max = 20;
|
||||
front.leds_count = 20;
|
||||
front.matrix_map = NULL;
|
||||
zones.push_back(front);
|
||||
|
||||
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 |
|
||||
\*-----------------------------------------------------*/
|
||||
zone arrow;
|
||||
arrow.name = "Arrow";
|
||||
arrow.type = ZONE_TYPE_LINEAR;
|
||||
arrow.leds_min = 17;
|
||||
arrow.leds_max = 17;
|
||||
arrow.leds_count = 17;
|
||||
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);
|
||||
}
|
||||
|
||||
SetupColors();
|
||||
}
|
||||
|
||||
void RGBController_PNYARGBEpicXGPU::ResizeZone(int /*zone*/, int /*new_size*/)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| This device does not support resizing zones |
|
||||
\*---------------------------------------------------------*/
|
||||
}
|
||||
|
||||
void RGBController_PNYARGBEpicXGPU::DeviceUpdateLEDs()
|
||||
{
|
||||
for(int i = 0; i < leds.size(); i++)
|
||||
{
|
||||
UpdateSingleLED(i);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PNYARGBEpicXGPU::UpdateZoneLEDs(int zone)
|
||||
{
|
||||
for(int i = 0; i < zones[zone].leds_count; i++)
|
||||
{
|
||||
UpdateSingleLED(zones[zone].start_idx + i);
|
||||
}
|
||||
}
|
||||
|
||||
void RGBController_PNYARGBEpicXGPU::UpdateSingleLED(int led)
|
||||
{
|
||||
controller->SetLEDDirect(leds[led].value, zone_led_idx[led], PNY_GPU_MODE_ARGB_DIRECT, colors[led]);
|
||||
}
|
||||
|
||||
void RGBController_PNYARGBEpicXGPU::DeviceUpdateMode()
|
||||
{
|
||||
if(modes[active_mode].color_mode == MODE_COLORS_MODE_SPECIFIC)
|
||||
{
|
||||
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]);
|
||||
}
|
||||
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);
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
/*---------------------------------------------------------*\
|
||||
| RGBController_PNYARGBEpicXGPU.h |
|
||||
| |
|
||||
| RGBController for PNY ARGB Epic-X GPU |
|
||||
| |
|
||||
| Peter Berendi 27 Apr 2025 |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 01 Aug 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-only |
|
||||
\*---------------------------------------------------------*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "RGBController.h"
|
||||
#include "PNYARGBEpicXGPUController.h"
|
||||
|
||||
class RGBController_PNYARGBEpicXGPU : public RGBController
|
||||
{
|
||||
public:
|
||||
RGBController_PNYARGBEpicXGPU(PNYARGBEpicXGPUController* controller_ptr);
|
||||
~RGBController_PNYARGBEpicXGPU();
|
||||
|
||||
void SetupZones();
|
||||
|
||||
void ResizeZone(int zone, int new_size);
|
||||
|
||||
void DeviceUpdateLEDs();
|
||||
void UpdateZoneLEDs(int zone);
|
||||
void UpdateSingleLED(int led);
|
||||
|
||||
void DeviceUpdateMode();
|
||||
|
||||
protected:
|
||||
PNYARGBEpicXGPUController* controller;
|
||||
std::vector<unsigned char> zone_led_idx;
|
||||
};
|
||||
|
|
@ -822,9 +822,13 @@
|
|||
#define PNY_RTX_4080_XLR8_VERTO_SUB_DEV 0x13BB
|
||||
#define PNY_RTX_4080_XLR8_VERTO_EPIC_X_SUB_DEV 0x13BC
|
||||
#define PNY_RTX_4080S_XLR8_VERTO_SUB_DEV 0x1418
|
||||
#define PNY_RTX_4090_XLR8_VERTO_EPIC_X_SUB_DEV 0x13AD
|
||||
#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_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
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Palit Sub-Device IDs |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue