gallium/hud: Add power sensor support
authorSteven Toth <stoth@kernellabs.com>
Thu, 29 Sep 2016 14:11:00 +0000 (08:11 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 29 Sep 2016 23:51:15 +0000 (17:51 -0600)
commit1d466b9b04662d41a403ea8fd617a5365750b1de
tree80c131f35a5c2a06e4541eeb995e77924df9380a
parent3abe68b8282496688186157b51da5600ac540906
gallium/hud: Add power sensor support

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.

Signed-off-by: Steven Toth <stoth@kernellabs.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/auxiliary/hud/hud_context.c
src/gallium/auxiliary/hud/hud_private.h
src/gallium/auxiliary/hud/hud_sensors_temp.c
src/gallium/include/pipe/p_defines.h