Skip to content

Commit 7ec1e8d

Browse files
gozzardaCalcProgrammer1
authored andcommitted
PowerColor GPU: Accept V1 magic from V2 controller.
1 parent 880dc14 commit 7ec1e8d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Controllers/PowerColorGPUController/PowerColorGPUControllerDetect.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ static const unsigned char magic_v2[3] = {0x01, 0x32, 0x00};
2424
| The controller reports a unique identifier for V1 and V2. |
2525
| Unfortunately they are on different addresses. Read it |
2626
| for good measure anyways. |
27+
| N.B: Some V2 controllers report the V1 magic. |
2728
\*---------------------------------------------------------*/
2829

2930
void DetectPowerColorRedDevilGPUControllersV1(i2c_smbus_interface* bus, uint8_t i2c_addr, const std::string& name)
@@ -54,7 +55,7 @@ void DetectPowerColorRedDevilGPUControllersV2(i2c_smbus_interface* bus, uint8_t
5455

5556
unsigned char data[3];
5657
int ret = bus->i2c_smbus_read_i2c_block_data(i2c_addr, RED_DEVIL_V2_READ_REG_MAGIC, 3, data);
57-
if(ret == 3 && memcmp(data, magic_v2, 3) == 0)
58+
if(ret == 3 && (memcmp(data, magic_v1, 3) == 0 || memcmp(data, magic_v2, 3) == 0))
5859
{
5960
PowerColorRedDevilV2Controller* controller = new PowerColorRedDevilV2Controller(bus, i2c_addr, name);
6061
RGBController_PowerColorRedDevilV2* rgb_controller = new RGBController_PowerColorRedDevilV2(controller);

0 commit comments

Comments
 (0)