Browse Source

Update GPU deivce logging to use common string

merge-requests/918/head
TheRogueZeta 2 months ago
committed by Adam Honse
parent
commit
f1c2a1eb3f
  1. 1
      Controllers/AsusAuraGPUController/AsusAuraGPUControllerDetect.cpp
  2. 4
      Controllers/EVGAGPUController/EVGAGPUCommon.h
  3. 8
      Controllers/EVGAGPUController/EVGAGPUControllerDetect.cpp
  4. 3
      Controllers/GainwardGPUController/GainwardGPUControllerDetect.cpp
  5. 2
      Controllers/GalaxGPUController/GalaxGPUControllerDetect.cpp
  6. 3
      Controllers/GigabyteRGBFusion2GPUController/GigabyteRGBFusion2GPUControllerDetect.cpp
  7. 1
      Controllers/GigabyteRGBFusionGPUController/GigabyteRGBFusionGPUControllerDetect.cpp
  8. 3
      Controllers/MSIGPUController/MSIGPUControllerDetect.cpp
  9. 2
      Controllers/PNYGPUController/PNYGPUControllerDetect.cpp
  10. 2
      LogManager.h

1
Controllers/AsusAuraGPUController/AsusAuraGPUControllerDetect.cpp

@ -118,6 +118,7 @@ void DetectAsusAuraGPUControllers(std::vector<i2c_smbus_interface*> &busses)
busses[bus]->pci_subsystem_vendor == device_list[dev_idx].pci_subsystem_vendor &&
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
{
LOG_DEBUG(GPU_DETECT_MESSAGE, ASUSGPU_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
if (TestForAsusAuraGPUController(busses[bus], device_list[dev_idx].controller_address))
{
new_aura_gpu = new AuraGPUController(busses[bus], device_list[dev_idx].controller_address);

4
Controllers/EVGAGPUController/EVGAGPUCommon.h

@ -16,6 +16,4 @@ union u16_to_u8
uint8_t LSB;
uint8_t MSB;
};
};
#define EVGA_DETECT_MESSAGE "[%s] Found a device match at Bus %02d for Device %04x and SubDevice %04x: %s"
};

8
Controllers/EVGAGPUController/EVGAGPUControllerDetect.cpp

@ -139,7 +139,7 @@ void DetectEVGAGPUControllers(std::vector<i2c_smbus_interface*>& busses)
{
case EVGA_RGB_V1:
{
LOG_DEBUG(EVGA_DETECT_MESSAGE, EVGAGPUV1_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
LOG_DEBUG(GPU_DETECT_MESSAGE, EVGAGPUV1_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
EVGAGPUv1Controller* new_controller;
RGBController_EVGAGPUv1* new_rgbcontroller;
@ -152,7 +152,7 @@ void DetectEVGAGPUControllers(std::vector<i2c_smbus_interface*>& busses)
case EVGA_RGB_V2:
{
LOG_DEBUG(EVGA_DETECT_MESSAGE, EVGAGPUV2_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
LOG_DEBUG(GPU_DETECT_MESSAGE, EVGAGPUV2_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
EVGAGPUv2Controller* new_controller;
RGBController_EVGAGPUv2* new_rgbcontroller;
@ -165,7 +165,7 @@ void DetectEVGAGPUControllers(std::vector<i2c_smbus_interface*>& busses)
case EVGA_RGB_V3:
{
LOG_DEBUG(EVGA_DETECT_MESSAGE, EVGAGPUV3_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
LOG_DEBUG(GPU_DETECT_MESSAGE, EVGAGPUV3_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
EVGAGPUv3Controller* new_controller;
RGBController_EVGAGPUv3* new_rgbcontroller;
@ -187,7 +187,7 @@ void DetectEVGAGPUControllers(std::vector<i2c_smbus_interface*>& busses)
break;
case EVGA_RGB_GP102:
{
LOG_DEBUG(EVGA_DETECT_MESSAGE, EVGA_GP102_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
LOG_DEBUG(GPU_DETECT_MESSAGE, EVGA_GP102_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
RGBController_EVGAGP102* new_rgbcontroller;
std::vector<EVGAGP102Controller*> controllers;

3
Controllers/GainwardGPUController/GainwardGPUControllerDetect.cpp

@ -9,6 +9,7 @@
#include "Detector.h"
#include "GainwardGPUv1Controller.h"
#include "GainwardGPUv2Controller.h"
#include "LogManager.h"
#include "RGBController.h"
#include "RGBController_GainwardGPUv1.h"
#include "RGBController_GainwardGPUv2.h"
@ -109,6 +110,7 @@ void DetectGainwardGPUControllers(std::vector<i2c_smbus_interface*> &busses)
{
case RGB_V1:
{
LOG_DEBUG(GPU_DETECT_MESSAGE, "Gainward v1", bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
GainwardGPUv1Controller* new_GainwardGPU;
RGBController_GainwardGPUv1* new_controller;
@ -121,6 +123,7 @@ void DetectGainwardGPUControllers(std::vector<i2c_smbus_interface*> &busses)
case RGB_V2:
{
LOG_DEBUG(GPU_DETECT_MESSAGE, "Gainward v2", bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
GainwardGPUv2Controller* new_GainwardGPU;
RGBController_GainwardGPUv2* new_controller;

2
Controllers/GalaxGPUController/GalaxGPUControllerDetect.cpp

@ -8,6 +8,7 @@
#include "Detector.h"
#include "GalaxGPUController.h"
#include "LogManager.h"
#include "RGBController.h"
#include "RGBController_GalaxGPU.h"
#include "i2c_smbus.h"
@ -82,6 +83,7 @@ void DetectGalaxGPUControllers(std::vector<i2c_smbus_interface*> &busses)
busses[bus]->pci_subsystem_vendor == device_list[dev_idx].pci_subsystem_vendor &&
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
{
LOG_DEBUG(GPU_DETECT_MESSAGE, "Galax GPU", bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
if (TestForGalaxGPUController(busses[bus], 0x23))
{
new_GalaxGPU = new GalaxGPUController(busses[bus], 0x23);

3
Controllers/GigabyteRGBFusion2GPUController/GigabyteRGBFusion2GPUControllerDetect.cpp

@ -19,7 +19,6 @@ typedef struct
const char * name;
} gpu_pci_device;
#define GIGABYTEGPU_DETECT_MESSAGE "[%s] Found a device match at Bus %02d for Device %04x and SubDevice %04x: %s"
#define GIGABYTEGPU_CONTROLLER_NAME2 "Gigabyte RGB Fusion2 GPU"
#define GPU_NUM_DEVICES (sizeof(device_list) / sizeof(device_list[ 0 ]))
@ -98,7 +97,7 @@ void DetectGigabyteRGBFusion2GPUControllers(std::vector<i2c_smbus_interface*>& b
busses[bus]->pci_subsystem_vendor == device_list[dev_idx].pci_subsystem_vendor &&
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
{
LOG_DEBUG(GIGABYTEGPU_DETECT_MESSAGE, GIGABYTEGPU_CONTROLLER_NAME2, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
LOG_DEBUG(GPU_DETECT_MESSAGE, GIGABYTEGPU_CONTROLLER_NAME2, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
// Check for RGB Fusion2 controller
if(TestForGigabyteRGBFusion2GPUController(busses[bus], device_list[dev_idx].controller_address))
{

1
Controllers/GigabyteRGBFusionGPUController/GigabyteRGBFusionGPUControllerDetect.cpp

@ -160,6 +160,7 @@ void DetectGigabyteRGBFusionGPUControllers(std::vector<i2c_smbus_interface*>& bu
busses[bus]->pci_subsystem_vendor == device_list[dev_idx].pci_subsystem_vendor &&
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
{
LOG_DEBUG(GPU_DETECT_MESSAGE, GIGABYTEGPU_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
// Check for RGB Fusion controller
if (TestForGigabyteRGBFusionGPUController(busses[bus], device_list[dev_idx].controller_address))
{

3
Controllers/MSIGPUController/MSIGPUControllerDetect.cpp

@ -7,6 +7,7 @@
#include "Detector.h"
#include "MSIGPUController.h"
#include "LogManager.h"
#include "RGBController.h"
#include "RGBController_MSIGPU.h"
#include "i2c_smbus.h"
@ -25,6 +26,7 @@ typedef struct
} msi_gpu_pci_device;
#define MSI_GPU_NUM_DEVICES (sizeof(device_list) / sizeof(device_list[ 0 ]))
#define MSI_CONTROLLER_NAME "MSI GPU"
static const msi_gpu_pci_device device_list[] =
{
@ -99,6 +101,7 @@ void DetectMSIGPUControllers(std::vector<i2c_smbus_interface*> &busses)
busses[bus]->pci_subsystem_vendor == device_list[dev_idx].pci_subsystem_vendor &&
busses[bus]->pci_subsystem_device == device_list[dev_idx].pci_subsystem_device)
{
LOG_DEBUG(GPU_DETECT_MESSAGE, MSI_CONTROLLER_NAME, bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
new_msi_gpu = new MSIGPUController(busses[bus]);
new_controller = new RGBController_MSIGPU(new_msi_gpu);
new_controller->name = device_list[dev_idx].name;

2
Controllers/PNYGPUController/PNYGPUControllerDetect.cpp

@ -1,4 +1,5 @@
#include "Detector.h"
#include "LogManager.h"
#include "PNYGPUController.h"
#include "RGBController.h"
#include "RGBController_PNYGPU.h"
@ -80,6 +81,7 @@ void DetectPNYGPUControllers(std::vector<i2c_smbus_interface*>& busses)
{
case PNY_RGB:
{
LOG_DEBUG(GPU_DETECT_MESSAGE, "PNY GPU", bus, device_list[dev_idx].pci_device, device_list[dev_idx].pci_subsystem_device, device_list[dev_idx].name );
PNYGPUController* new_controller;
RGBController_PNYGPU* new_rgbcontroller;

2
LogManager.h

@ -15,6 +15,8 @@
#define SMBUS_CHECK_DEVICE_MESSAGE_EN "[%s] Bus %02d is a motherboard and the subvendor matches the one for %s, looking for a device at %02X"
#define SMBUS_CHECK_DEVICE_FAILURE_EN "[%s] Bus %02d is not a motherboard or the subvendor does not match the one for %s, skipping detection"
#define GPU_DETECT_MESSAGE "[%s] Found a device match at Bus %02d for Device %04x and SubDevice %04x: %s"
using json = nlohmann::json;
enum

Loading…
Cancel
Save