drm/amdgpu/gfx11: use CP_MES_MTIME for GPU clock counter on GC 11.5.0+
Subsystems (2)
PATCH 1/1 drm/amdgpu/gfx11: use CP_MES_MTIME for GPU clock counter on GC 11.5.0+
From: BRahul <[email protected]>
Use CP_MES_MTIME registers to read GPU clock counter for GC IP version 11.5.0 and later, in addition to SR-IOV VF.
Signed-off-by BRahul <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +1 -1
@@ -5227,7 +5227,7 @@ static uint64_t gfx_v11_0_get_gpu_clock_counter(struct amdgpu_device *adev)uint64_t clock;uint64_t clock_counter_lo, clock_counter_hi_pre, clock_counter_hi_after; -if (amdgpu_sriov_vf (adev)) { +if ((amdgpu_sriov_vf (adev)) || (amdgpu_ip_version (adev,GC_HWIP ,0 ) >=IP_VERSION (11 ,5 ,0 ))) {amdgpu_gfx_off_ctrl (adev, false);mutex_lock (&adev->gfx.gpu_clock_mutex); clock_counter_hi_pre = (uint64_t )RREG32_SOC15 (GC ,0 , regCP_MES_MTIME_HI);
Signature · 1 line
2.43.0