drm/amdgpu: Read clock counter via MMIO to reduce delay (v5)
authorYuBiao Wang <YuBiao.Wang@amd.com>
Tue, 29 Jun 2021 03:21:25 +0000 (11:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 8 Jul 2021 19:12:36 +0000 (15:12 -0400)
commit5af4438f1e830d090183c5f329d2ddbb09f3a5ee
treeb1511e9888a6a1bebaa4137423ae95e0d9c62d2d
parent51627f03804173a64d23828bc9e4d8474451814f
drm/amdgpu: Read clock counter via MMIO to reduce delay (v5)

[Why]
GPU timing counters are read via KIQ under sriov, which will introduce
a delay.

[How]
It could be directly read by MMIO.

v2: Add additional check to prevent carryover issue.
v3: Only check for carryover for once to prevent performance issue.
v4: Add comments of the rough frequency where carryover happens.
v5: Remove mutex and gfxoff ctrl unused with current timing registers.

Signed-off-by: YuBiao Wang <YuBiao.Wang@amd.com>
Acked-by: Horace Chen <horace.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.co>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c