AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode
Date: Mon, 23 Jul 2018 14:33:12 +0800	[thread overview]
Message-ID: <5B5576A8.3070302@amd.com> (raw)
In-Reply-To: <20180720163301.9376-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>

On 07/21/2018 12:33 AM, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> We were testing the register offset, instead of the value stored in the
> register, therefore always timing out the loop.
>
> This reduces suspend time of the system in the bug report below by ~600
> ms.
>
> Bugzilla: https://bugs.freedesktop.org/107277
> Tested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>

Good catch.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 9ab39117cc4e..ef00d14f8645 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -3490,7 +3490,7 @@ static void gfx_v9_0_enter_rlc_safe_mode(struct amdgpu_device *adev)
>
>   		/* wait for RLC_SAFE_MODE */
>   		for (i = 0; i < adev->usec_timeout; i++) {
> -			if (!REG_GET_FIELD(SOC15_REG_OFFSET(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD))
> +			if (!REG_GET_FIELD(RREG32_SOC15(GC, 0, mmRLC_SAFE_MODE), RLC_SAFE_MODE, CMD))
>   				break;
>   			udelay(1);
>   		}
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-07-23  6:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-20 16:33 [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode Michel Dänzer
     [not found] ` <20180720163301.9376-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-07-20 16:35   ` Deucher, Alexander
2018-07-23  6:33   ` Zhang, Jerry (Junwei) [this message]
2018-07-24 17:20   ` Paul Menzel
     [not found]     ` <cd8a8d33-2fa5-6cdc-fe62-86a38f04c207-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org>
2018-07-24 17:24       ` Michel Dänzer

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=5B5576A8.3070302@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.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