This will be used to expose the current GPU temperature, the shader clock and eventually the memory clock (for non-APUs). Signed-off-by: Samuel Pitoiset <samuel.pitoiset@xxxxxxxxx> --- include/drm/amdgpu_drm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index 2be8b8dc..cd9c8223 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgpu_drm.h @@ -534,6 +534,14 @@ struct drm_amdgpu_cs_chunk_data { #define AMDGPU_INFO_VBIOS_IMAGE 0x2 /* Query UVD handles */ #define AMDGPU_INFO_NUM_HANDLES 0x1C +/* Query GPU sensor related information */ +#define AMDGPU_INFO_GPU_SENSOR 0x1D + /* Query the current shader clock */ + #define AMDGPU_INFO_GPU_SENSOR_SCLK 0x1 + /* Query the current memory clock */ + #define AMDGPU_INFO_GPU_SENSOR_MCLK 0x2 + /* Query the current temperature */ + #define AMDGPU_INFO_GPU_SENSOR_TEMP 0x3 #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff @@ -597,6 +605,10 @@ struct drm_amdgpu_info { uint32_t type; uint32_t offset; } vbios_info; + + struct { + uint32_t type; + } gpu_sensor_info; }; }; -- 2.11.1 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel