-
Notifications
You must be signed in to change notification settings - Fork 299
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
Remove libdrm_amdgpu and other unnecessary code #703
Conversation
There is no such file in-tree and never was. Signed-off-by: Emil Velikov <[email protected]>
Drop the ifdef and simplify the .cpp file. Signed-off-by: Emil Velikov <[email protected]>
Currently we pipeline a bunch of commands alike cat | grep | sed, there we can do all that job with a single sed invocation - use that. Signed-off-by: Emil Velikov <[email protected]>
The code was added back in 2020 and seemingly never built. Just drop it - if needed it can be git reverted at some point. Signed-off-by: Emil Velikov <[email protected]>
There are two alternatives - hwmon entries and gpu_metrics sysfs file. Signed-off-by: Emil Velikov <[email protected]>
Currently it can give you a regular file, block/char device, fifo or a socket. Signed-off-by: Emil Velikov <[email protected]>
Makes the code much easier to read. Signed-off-by: Emil Velikov <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Been using this for a few days without issues. Just some 600+ loc removed @flightlessmango @jackun any takers? |
I gave it a quick try on my RX 580, so far no issues at the first glance, I'll keep on running with that to see if I encounter any issues down the road. |
It looks good to me, I would just like @jackun to sign off as well |
Do Vega APUs support |
AFAICT the standalone nodes - gpu_busy_percent, temp1_input and others, are present on all GPUs. So even if the composite That said, looks like I've forgot a check - currently the |
Can be trivially replaced with ls() v2: Move break where it's supposed to. Signed-off-by: Emil Velikov <[email protected]>
We have already enforced that a few lines above just after parsing the vendor node. Signed-off-by: Emil Velikov <[email protected]>
Currently we can get the load and temp stats either from the standalone nodes or from the gpu_metrics (binary) sysfs node. Fix the next to handle that. Signed-off-by: Emil Velikov <[email protected]>
Currently we open the standalone busy, temp, gpu/memory clock and power_usage nodes, even if gpu_metrics is present. At the same time, we correctly ignore them when doing the read-only. So just avoid opening them all together. Signed-off-by: Emil Velikov <[email protected]>
No longer applicable, since the libdrm path is gone and hwmon is required - either partially or in full. Signed-off-by: Emil Velikov <[email protected]>
IIRC |
Sounds like something which should be reported and fixed in the amdgpu driver. Adding/maintaining a complete code-path for such a bug that does not sound palatable IMHO. |
Fixed, see below |
Above all, we really don't need the gpu_busy_percent node, if the GPU exposes a gpu_metrics node, Although looking closer, the gpu_busy_percent check is meant for something else - to distinguish between the card node (cardX) and the card output node (cardX-output-foo). To top it all up, the check at the very end implies that we can get a case where gpu_metrics and gpu_busy_perfect is missing ... that's not possible. So instead, drop the early gpu_busy_perfect check and properly mandate it later on. Signed-off-by: Emil Velikov <[email protected]>
The |
More of a is using |
Fwiw there's another dozen or so patches series sitting on top of this work - #707 |
This series removes the a bunch of dead or no longer needed code. In particular:
The vendor/device handling is still a bit iffy - I might be sorting that out next.
Note: this has been only lightly tested, so please give it a spin on your end and report issues.