basic power management for radeon

Andriy Gapon avg at FreeBSD.org
Tue Mar 8 11:23:50 UTC 2016


https://people.freebsd.org/~avg/radeon-pm-profile.diff

This patch adds support for manually setting a power profile on supported Radeon
cards via a sysctl. Also, it adds reporting of some power management information
and a temperature reading.

Sample output:
hw.dri.0.modesetting: 1
hw.dri.0.busid: pci:0000:01:00.0
hw.dri.0.temperature: 51.6C
hw.dri.0.pm_info: default engine clock: 775000 kHz
current engine clock: 99990 kHz
default memory clock: 1000000 kHz
current memory clock: 1000000 kHz
voltage: 950 mV

hw.dri.0.power_method: profile

hw.dri.0.power_profile: low
hw.dri.0.vblank:
crtc ref count    last     enabled inmodeset
  00  00 01090494 00061323 01      00
  01  00 01090932 00061344 01      00
  02  01 00000001 00000000 01      03
  03  01 00000001 00000000 01      03
  04  01 00000001 00000000 01      03
  05  01 00000001 00000000 01      03
hw.dri.0.bufs:
hw.dri.0.clients:
a dev            pid   uid      magic     ioctls
y dri/card0     3028  1001          5     526990
y dri/card0     2121  1001          2    2012279
y dri/card0     1943     0          0     139848
y dri/card0     1919     0          0   20086433

hw.dri.0.vm:
slot offset             size       type flags address            mtrr

hw.dri.0.name: radeon 0x39 pci:0000:01:00.0

Only 'profile' method is supported (i.e. 'dynpm' is not) and 'auto' profile is
not supported.  So, the control is completely manual, which is not as good as
the automatic / dynamic control but is better than nothing.

The patch is generated against a somewhat old head tree, so it might not apply
cleanly on a more recent head or other branches.  The patch is somewhat
inconsistent in dealing with the Linux specific code, in some cases it is
converted to FreeBSD specific code, in others it's "forked".
The patch is rather trivial and it could use some cleaning up.

Hope that you find it useful.

-- 
Andriy Gapon


More information about the freebsd-x11 mailing list