-
Notifications
You must be signed in to change notification settings - Fork 40
feat: [GPU] Add logic to show GPU info. #491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [GPU] Add logic to show GPU info. #491
Conversation
Reviewer's GuideThis PR adds support for retrieving GPU and monitor information via a configurable external command and EDID parsing by extending CommonTools utilities, D-Bus interfaces, device classes, and introducing a CustomGenerator plus a standalone helper binary. Sequence diagram for custom GPU info retrieval processsequenceDiagram
participant CustomGenerator
participant CommonTools
participant DBusInterface
participant DeviceInterface
participant customgpuinfo
CustomGenerator->>CommonTools: getGpuInfoCommandFromDConfig()
CustomGenerator->>DBusInterface: getGpuInfoByCustom(cmd, args, gpuInfo)
DBusInterface->>DeviceInterface: D-Bus call getGpuInfoByCustom(cmd, args)
DeviceInterface->>customgpuinfo: Execute customgpuinfo helper
customgpuinfo-->>DeviceInterface: Return GPU info
DeviceInterface-->>DBusInterface: Return GPU info
DBusInterface-->>CustomGenerator: Return GPU info
CustomGenerator->>DeviceGpu: setGpuInfoByCustom(mapInfo)
Class diagram for new and updated GPU info retrieval classesclassDiagram
class CommonTools {
+static void parseEDID(QStringList allEDIDS, QString input)
+static QString getGpuInfoCommandFromDConfig()
}
class DeviceGpu {
+void setGpuInfoByCustom(QMap<QString, QString> mapInfo)
}
class DBusInterface {
+bool getGpuInfoByCustom(QString cmd, QStringList arguments, QString &gpuInfo)
}
class DeviceInterface {
+QString getGpuInfoByCustom(QString cmd, QStringList arguments)
}
class DeviceFactory {
+DeviceGenerator* getDeviceGenerator()
}
class CustomGenerator {
+void generatorGpuDevice()
+void generatorMonitorDevice()
}
class DeviceGenerator {
+virtual void generatorGpuDevice()
+virtual void generatorMonitorDevice()
}
CustomGenerator --|> DeviceGenerator
DeviceFactory --> CustomGenerator
CommonTools --> EDIDParser
CommonTools --> DeviceMonitor
CustomGenerator --> CommonTools
CustomGenerator --> DBusInterface
CustomGenerator --> DeviceGpu
DeviceGpu --> DeviceBaseInfo
DBusInterface --> DeviceInterface
DeviceInterface --> QProcess
DeviceInterface --> QProcessEnvironment
Class diagram for the new customgpuinfo helper binaryclassDiagram
class customgpuinfo {
+main(int argc, char* argv[])
+getGpuBaseInfo(QMap<QString, QString> &mapInfo)
+getGpuMemInfoForFTDTM(QMap<QString, QString> &mapInfo)
}
customgpuinfo --> QProcess
customgpuinfo --> QFile
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
-- In some special computer, the GPU info not show. -- Add logic to show GPU info. Log: add feature for GPU. Task: https://pms.uniontech.com/task-view-378987.html
87f43e9 to
6a70dee
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/forcemerge |


-- In some special computer, the GPU info not show. -- Add logic to show GPU info.
Log: add feature for GPU.
Task: https://pms.uniontech.com/task-view-378987.html
Summary by Sourcery
Provide enhanced GPU information support by adding configurable command-based retrieval, EDID parsing for monitors, and integration via a new CustomGenerator and D-Bus method.
New Features:
Enhancements:
Build: