amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Yuan, Xiaojie" <Xiaojie.Yuan@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/amdgpu/gfx10: disable gfxoff when reading rlc clock
Date: Wed, 12 Feb 2020 15:32:23 +0000	[thread overview]
Message-ID: <66081F18-7F03-43B6-A054-AB3D9F7449B7@amd.com> (raw)
In-Reply-To: <20200212135326.1165548-2-alexander.deucher@amd.com>

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&amp;data=02%7C01%7CXiaojie.Yuan%40amd.com%7C14c17abf264943e85faf08d7afc2f80e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637171124232441506&amp;sdata=Xz4N%2FDc8ExXMIV9PK%2FMGG48vHsb6%2FrzvmrUzXer%2F5Eo%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      reply	other threads:[~2020-02-12 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66081F18-7F03-43B6-A054-AB3D9F7449B7@amd.com \
    --to=xiaojie.yuan@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).