gallium/hud: Add power sensor support

Graphics / Mesa 3D Graphics Library / Mesa - Steven Toth [kernellabs.com] - 29 September 2016 18:51 UTC

Implement support for power based sensors, reporting units in milli-watts and watts.

Also, minor cleanup - change the related if block to a switch.

Tested with two different power sensors, including the nouveau 'power1' sensors on a GTX950 card.

1d466b9 gallium/hud: Add power sensor support
src/gallium/auxiliary/hud/hud_context.c | 10 +++++++
src/gallium/auxiliary/hud/hud_private.h | 1 +
src/gallium/auxiliary/hud/hud_sensors_temp.c | 38 ++++++++++++++++++++++----
src/gallium/include/pipe/p_defines.h | 1 +
4 files changed, 45 insertions(+), 5 deletions(-)

Upstream: cgit.freedesktop.org


  • Share