All of lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
To: Junwei Zhang <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>,
	Ken Wang <Qingqing.Wang-5C7GfCeVMHo@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop
Date: Mon, 17 Jul 2017 15:52:10 +0800	[thread overview]
Message-ID: <20170717075209.GA16630@hr-amur2> (raw)
In-Reply-To: <1500027617-18557-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>

On Fri, Jul 14, 2017 at 06:20:17PM +0800, Junwei Zhang wrote:
> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index ba743d4..71ce3ee 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -95,9 +95,8 @@ int psp_wait_for(struct psp_context *psp, uint32_t reg_index,
>  	int i;
>  	struct amdgpu_device *adev = psp->adev;
>  
> -	val = RREG32(reg_index);
> -
>  	for (i = 0; i < adev->usec_timeout; i++) {
> +		val = RREG32(reg_index);
>  		if (check_changed) {
>  			if (val != reg_val)
>  				return 0;

Nice catch. I remembered Ken also mentioned it before. This should fix the
issue I encountered before during bring-up. Can you open this handshake in
psp_v3_1_bootloader_load_sos and double check if this handshake is workable
with this fix. If yes, please add it back.

#if 0
        ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_81),
                           RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_81),
                           0, true);
#endif

Acked-by: Huang Rui <ray.huang@amd.com>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-07-17  7:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-14 10:20 [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop Junwei Zhang
     [not found] ` <1500027617-18557-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-07-14 14:40   ` Deucher, Alexander
2017-07-17  7:52   ` Huang Rui [this message]
2017-07-17  7:57     ` Huang Rui
2017-07-17  8:56       ` Zhang, Jerry (Junwei)
2017-07-17  8:56         ` Zhang, Jerry (Junwei)
2017-07-17 10:57         ` Greg KH
     [not found]           ` <20170717105741.GC32372-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2017-07-17 11:45             ` Huang Rui
2017-07-17 11:45               ` Huang Rui
2017-07-18  2:50               ` Zhang, Jerry (Junwei)
2017-07-18  2:50                 ` Zhang, Jerry (Junwei)
  -- strict thread matches above, loose matches on Subject: below --
2017-07-18  2:54 Junwei Zhang
2017-07-18  2:54 ` Junwei Zhang
2017-07-18  3:25 ` Deucher, Alexander
2017-07-18  3:25   ` Deucher, Alexander

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=20170717075209.GA16630@hr-amur2 \
    --to=ray.huang-5c7gfcevmho@public.gmane.org \
    --cc=Jerry.Zhang-5C7GfCeVMHo@public.gmane.org \
    --cc=Qingqing.Wang-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.