Bug 73047 - radeon_pm_info should be in sysfs instead of debugfs
Summary: radeon_pm_info should be in sysfs instead of debugfs
Status: RESOLVED MOVED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Radeon (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-26 14:25 UTC by almos
Modified: 2019-11-19 08:41 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description almos 2013-12-26 14:25:12 UTC
Debugfs is only accessible for root, and it's not advised to use it for other than debugging (as its name suggests).
Comment 1 Alex Deucher 2013-12-26 17:58:57 UTC
radeon_pm_info is for debugging.
Comment 2 almos 2013-12-26 18:01:44 UTC
OK, then how can I get information about the clock speeds of the GPU when not debugging?
Comment 3 almos 2014-01-02 15:22:23 UTC
I guess the same thing applies to vgaswitcheroo. I'm not a kernel developer, but I'm quite sure these are not just for debugging.
Comment 4 Christian König 2014-01-02 16:37:56 UTC
We had the discussion a couple of times now. The power management infos radeon_pm_info provides are definitely only for debugging.
Comment 5 almos 2014-01-03 23:29:29 UTC
(In reply to comment #4)
> We had the discussion a couple of times now. The power management infos
> radeon_pm_info provides are definitely only for debugging.

Are the minutes of those discussions available somewhere? I'm curious about the arguments.

BTW have you considered moving /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq to debugfs for consistency's sake? How about removing lm-sensors support? These are definitely for debugging only.
Comment 6 Christian König 2014-01-05 15:21:22 UTC
(In reply to comment #5)
> Are the minutes of those discussions available somewhere? I'm curious about
> the arguments.

radeon_pm_info is not the real hardware state, but rather the state the kernel driver thinks the hardware is in.

So it's actually not very useful to an end user, except if you want to debug the different states the kernel driver can be into (UVD/performance/battery etc...)

I agree that we need a proper sysfs interface to make certain PM functions and informations available to userspace, but it's definitely not what's inside radeon_pm_info.
Comment 7 Alexandre Demers 2014-09-26 22:14:03 UTC
I'm about to close this bug since, as Christian said, there should be a way to expose some PM functions to the user, but not through radeon_pm_info.

But before, I'd like to know if there is something coming this way to expose these functionality?
Comment 8 Marek Olšák 2014-09-29 10:41:48 UTC
I'd like the RADEON_INFO ioctl to be able to return the clocks.
Comment 9 Christian König 2014-09-29 11:06:41 UTC
(In reply to comment #8)
> I'd like the RADEON_INFO ioctl to be able to return the clocks.

That sounds like a pretty good idea to me and we should actually query the hardware for the clocks and return that instead of the software state.
Comment 10 Marek Olšák 2014-09-29 12:22:14 UTC
I'd like to have RADEON_INFO support for these:
- engine and memory clocks
- temperatures
- status regs (for radeontop without root and Gallium HUD)
Comment 11 Alex Deucher 2014-10-01 15:47:52 UTC
Just send out a patch set to implement this:
http://lists.freedesktop.org/archives/dri-devel/2014-October/069410.html
Comment 12 Martin Peres 2019-11-19 08:41:21 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/420.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.