* [PATCH 1/2] drm/amdgpu/gfx9: disable gfxoff when reading rlc clock
@ 2020-02-12 13:53 Alex Deucher
2020-02-12 13:53 ` [PATCH 2/2] drm/amdgpu/gfx10: " Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-02-12 13:53 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Otherwise we readback all ones. Fixes rlc counter
readback while gfxoff is active.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 82476f6acfad..108b9e5319f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3959,6 +3959,7 @@ static uint64_t gfx_v9_0_get_gpu_clock_counter(struct amdgpu_device *adev)
{
uint64_t clock;
+ amdgpu_gfx_off_ctrl(adev, false);
mutex_lock(&adev->gfx.gpu_clock_mutex);
if (adev->asic_type == CHIP_VEGA10 && amdgpu_sriov_runtime(adev)) {
uint32_t tmp, lsb, msb, i = 0;
@@ -3977,6 +3978,7 @@ static uint64_t gfx_v9_0_get_gpu_clock_counter(struct amdgpu_device *adev)
((uint64_t)RREG32_SOC15(GC, 0, mmRLC_GPU_CLOCK_COUNT_MSB) << 32ULL);
}
mutex_unlock(&adev->gfx.gpu_clock_mutex);
+ amdgpu_gfx_off_ctrl(adev, true);
return clock;
}
--
2.24.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] drm/amdgpu/gfx10: disable gfxoff when reading rlc clock
2020-02-12 13:53 [PATCH 1/2] drm/amdgpu/gfx9: disable gfxoff when reading rlc clock Alex Deucher
@ 2020-02-12 13:53 ` Alex Deucher
2020-02-12 15:32 ` Yuan, Xiaojie
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-02-12 13:53 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher
Otherwise we readback all ones. Fixes rlc counter
readback while gfxoff is active.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 4e25b39ac14f..0eff2e7d33fa 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -3924,11 +3924,13 @@ static uint64_t gfx_v10_0_get_gpu_clock_counter(struct amdgpu_device *adev)
{
uint64_t clock;
+ amdgpu_gfx_off_ctrl(adev, false);
mutex_lock(&adev->gfx.gpu_clock_mutex);
WREG32_SOC15(GC, 0, mmRLC_CAPTURE_GPU_CLOCK_COUNT, 1);
clock = (uint64_t)RREG32_SOC15(GC, 0, mmRLC_GPU_CLOCK_COUNT_LSB) |
((uint64_t)RREG32_SOC15(GC, 0, mmRLC_GPU_CLOCK_COUNT_MSB) << 32ULL);
mutex_unlock(&adev->gfx.gpu_clock_mutex);
+ amdgpu_gfx_off_ctrl(adev, true);
return clock;
}
--
2.24.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/2] drm/amdgpu/gfx10: disable gfxoff when reading rlc clock
2020-02-12 13:53 ` [PATCH 2/2] drm/amdgpu/gfx10: " Alex Deucher
@ 2020-02-12 15:32 ` Yuan, Xiaojie
0 siblings, 0 replies; 3+ messages in thread
From: Yuan, Xiaojie @ 2020-02-12 15:32 UTC (permalink / raw)
To: Alex Deucher; +Cc: Deucher, Alexander, amd-gfx
Series is Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
BR,
Xiaojie
> On Feb 12, 2020, at 9:53 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Otherwise we readback all ones. Fixes rlc counter
> readback while gfxoff is active.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> index 4e25b39ac14f..0eff2e7d33fa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
> @@ -3924,11 +3924,13 @@ static uint64_t gfx_v10_0_get_gpu_clock_counter(struct amdgpu_device *adev)
> {
> uint64_t clock;
>
> + amdgpu_gfx_off_ctrl(adev, false);
> mutex_lock(&adev->gfx.gpu_clock_mutex);
> WREG32_SOC15(GC, 0, mmRLC_CAPTURE_GPU_CLOCK_COUNT, 1);
> clock = (uint64_t)RREG32_SOC15(GC, 0, mmRLC_GPU_CLOCK_COUNT_LSB) |
> ((uint64_t)RREG32_SOC15(GC, 0, mmRLC_GPU_CLOCK_COUNT_MSB) << 32ULL);
> mutex_unlock(&adev->gfx.gpu_clock_mutex);
> + amdgpu_gfx_off_ctrl(adev, true);
> return clock;
> }
>
> --
> 2.24.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CXiaojie.Yuan%40amd.com%7C14c17abf264943e85faf08d7afc2f80e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637171124232441506&sdata=Xz4N%2FDc8ExXMIV9PK%2FMGG48vHsb6%2FrzvmrUzXer%2F5Eo%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-12 15:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 13:53 [PATCH 1/2] drm/amdgpu/gfx9: disable gfxoff when reading rlc clock Alex Deucher
2020-02-12 13:53 ` [PATCH 2/2] drm/amdgpu/gfx10: " Alex Deucher
2020-02-12 15:32 ` Yuan, Xiaojie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).