-
Notifications
You must be signed in to change notification settings - Fork 320
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
Enhancement: Implement classes to read drm subsystem #654
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Juerg Ritter <[email protected]>
sysfs/class_drm_card.go
Outdated
|
||
// DrmCard contains info from files in /sys/class/drm for a | ||
// single DRM Card device. | ||
type DrmCard struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drm -> DRM as of golang naming standard
sysfs/class_drm_card.go
Outdated
type DrmCardPort struct { | ||
Name string | ||
Status string | ||
Dpms string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same -> DPMS
sysfs/class_drm_card.go
Outdated
@@ -0,0 +1,128 @@ | |||
// Copyright 2018 The Prometheus Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update Year (same below)
Signed-off-by: Juerg Ritter <[email protected]>
Hi @discordianfish, thanks for your feedback. I've integrated your suggestions into the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! And sorry for the delay
This Pull Request adds functionality to read DRM information from the DRM kernel subsystem. This can be useful to get information of GPUs and their ports. As per now, it is possible to get the GPUs with the driver name, and for each of their ports the connection state, enablement state and DPMS state. In the future, it could be enhanced with EDID information, and more GPU driver specific information.