drm/amdgpu: Expose more GPU sensor queries
Subsystems (3)
PATCH 1/2 drm/amdgpu: Expose more GPU sensor queries
Add sub-queries for stable pstate shader/memory clock.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 18 ++++++++++++++++++ include/uapi/drm/amdgpu_drm.h | 4 ++++ 2 files changed, 22 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +18 -0
@@ -758,6 +758,24 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_filereturn -EINVAL ; }break ; +case AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK : +/* get sclk in Mhz */ +if (amdgpu_dpm_read_sensor (adev, +AMDGPU_PP_SENSOR_STABLE_PSTATE_SCLK , + (void *)&ui32, &ui32_size)) { +return -EINVAL ; + } + ui32 /=100 ; +break ; +case AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK : +/* get mclk in Mhz */ +if (amdgpu_dpm_read_sensor (adev, +AMDGPU_PP_SENSOR_STABLE_PSTATE_MCLK , + (void *)&ui32, &ui32_size)) { +return -EINVAL ; + } + ui32 /=100 ; +break ;default :DRM_DEBUG_KMS ("Invalid request %d\n" , info->sensor_info.type);
include/uapi/drm/amdgpu_drm.h +4 -0
@@ -667,6 +667,10 @@ struct drm_amdgpu_cs_chunk_data {#define AMDGPU_INFO_SENSOR_VDDNB 0x6/* Subquery id: Query graphics voltage */ #define AMDGPU_INFO_SENSOR_VDDGFX 0x7 +/* Subquery id: Query GPU stable pstate shader clock */ +#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8 +/* Subquery id: Query GPU stable pstate memory clock */ +#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9/* Number of VRAM page faults on CPU access. */ #define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E#define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1516245123-12823-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
PATCH 2/2 drm/amdgpu: Bump driver version for sensor pstate clk
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
@@ -74,9 +74,10 @@* - 3.22.0 - Add DRM_AMDGPU_SCHED ioctl * - 3.23.0 - Add query for VRAM lost counter * - 3.24.0 - Add high priority compute support for gfx9 +* - 3.25.0 - Add support for sensor query info (stable pstate sclk/mclk). */ #define KMS_DRIVER_MAJOR 3 -#define KMS_DRIVER_MINOR 24 +#define KMS_DRIVER_MINOR 25#define KMS_DRIVER_PATCHLEVEL 0int amdgpu_vram_limit =0 ;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1516245123-12823-2-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-byRe: [PATCH 2/2] drm/amdgpu: Bump driver version for sensor pstate clk
Series is:
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Wednesday, January 17, 2018 10:12:03 PM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH 2/2] drm/amdgpu: Bump driver version for sensor pstate clk
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -1
@@ -74,9 +74,10 @@* - 3.22.0 - Add DRM_AMDGPU_SCHED ioctl * - 3.23.0 - Add query for VRAM lost counter * - 3.24.0 - Add high priority compute support for gfx9 +* - 3.25.0 - Add support for sensor query info (stable pstate sclk/mclk). */ #define KMS_DRIVER_MAJOR 3 -#define KMS_DRIVER_MINOR 24 +#define KMS_DRIVER_MINOR 25#define KMS_DRIVER_PATCHLEVEL 0int amdgpu_vram_limit =0 ;
--
1.9.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx