Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jritter
Copy link

@jritter jritter commented Jul 15, 2024

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.


// DrmCard contains info from files in /sys/class/drm for a
// single DRM Card device.
type DrmCard struct {
Copy link
Member

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

type DrmCardPort struct {
Name string
Status string
Dpms string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same -> DPMS

@@ -0,0 +1,128 @@
// Copyright 2018 The Prometheus Authors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update Year (same below)

@jritter
Copy link
Author

jritter commented Jul 23, 2024

Hi @discordianfish, thanks for your feedback. I've integrated your suggestions into the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants