* [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop
@ 2017-07-14 10:20 Junwei Zhang
[not found] ` <1500027617-18557-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 15+ messages in thread
From: Junwei Zhang @ 2017-07-14 10:20 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Junwei Zhang, Ray.Huang-5C7GfCeVMHo
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;
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 15+ messages in thread[parent not found: <1500027617-18557-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop [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 1 sibling, 0 replies; 15+ messages in thread From: Deucher, Alexander @ 2017-07-14 14:40 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Cc: Zhang, Jerry, Huang, Ray > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Junwei Zhang > Sent: Friday, July 14, 2017 6:20 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhang, Jerry; Huang, Ray > Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Acked-by: Alex Deucher <alexander.deucher@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; > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop [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 2017-07-17 7:57 ` Huang Rui 1 sibling, 1 reply; 15+ messages in thread From: Huang Rui @ 2017-07-17 7:52 UTC (permalink / raw) To: Junwei Zhang, Ken Wang; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop 2017-07-17 7:52 ` Huang Rui @ 2017-07-17 7:57 ` Huang Rui 2017-07-17 8:56 ` Zhang, Jerry (Junwei) 0 siblings, 1 reply; 15+ messages in thread From: Huang Rui @ 2017-07-17 7:57 UTC (permalink / raw) To: Junwei Zhang, Ken Wang; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On Mon, Jul 17, 2017 at 03:52:10PM +0800, Huang Rui wrote: > 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> BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be backported to stable tree. Thanks, Rui _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop 2017-07-17 7:57 ` Huang Rui @ 2017-07-17 8:56 ` Zhang, Jerry (Junwei) 0 siblings, 0 replies; 15+ messages in thread From: Zhang, Jerry (Junwei) @ 2017-07-17 8:56 UTC (permalink / raw) To: Huang Rui, Ken Wang; +Cc: amd-gfx, stable + stable@vger.kernel.org On 07/17/2017 03:57 PM, Huang Rui wrote: > On Mon, Jul 17, 2017 at 03:52:10PM +0800, Huang Rui wrote: >> 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. Yes, it could fix this. Later I will enable it. Jerry >> >> #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> > > BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be > backported to stable tree. > > Thanks, > Rui > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop @ 2017-07-17 8:56 ` Zhang, Jerry (Junwei) 0 siblings, 0 replies; 15+ messages in thread From: Zhang, Jerry (Junwei) @ 2017-07-17 8:56 UTC (permalink / raw) To: Huang Rui, Ken Wang; +Cc: amd-gfx, stable + stable@vger.kernel.org On 07/17/2017 03:57 PM, Huang Rui wrote: > On Mon, Jul 17, 2017 at 03:52:10PM +0800, Huang Rui wrote: >> 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. Yes, it could fix this. Later I will enable it. Jerry >> >> #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> > > BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be > backported to stable tree. > > Thanks, > Rui > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop 2017-07-17 8:56 ` Zhang, Jerry (Junwei) (?) @ 2017-07-17 10:57 ` Greg KH [not found] ` <20170717105741.GC32372-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org> -1 siblings, 1 reply; 15+ messages in thread From: Greg KH @ 2017-07-17 10:57 UTC (permalink / raw) To: Zhang, Jerry (Junwei); +Cc: Huang Rui, Ken Wang, amd-gfx, stable On Mon, Jul 17, 2017 at 04:56:26PM +0800, Zhang, Jerry (Junwei) wrote: > + stable@vger.kernel.org <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter> ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20170717105741.GC32372-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop 2017-07-17 10:57 ` Greg KH @ 2017-07-17 11:45 ` Huang Rui 0 siblings, 0 replies; 15+ messages in thread From: Huang Rui @ 2017-07-17 11:45 UTC (permalink / raw) To: Greg KH, Zhang, Jerry Cc: Alex Deucher, Wang, Ken, stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org On Mon, Jul 17, 2017 at 06:57:41PM +0800, Greg KH wrote: > On Mon, Jul 17, 2017 at 04:56:26PM +0800, Zhang, Jerry (Junwei) wrote: > > + stable@vger.kernel.org > > <formletter> > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > for how to do this properly. > > </formletter> Thanks, Greg. :-) >> BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be >> backported to stable tree. Jerry, I might not describe it clearly. We need follow the rule that Greg provided. Actually, I meant to add Cc in your commit message like below, then sent it out: 8<---------- Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop This fixes the SOS loading failure of psp v3.1. Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Cc: stable@vger.kernel.org 8<---------- And you'd better squeeze the two patches as one (actually it's only one fix) to make backporting more smooth. Thanks, Rui _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop @ 2017-07-17 11:45 ` Huang Rui 0 siblings, 0 replies; 15+ messages in thread From: Huang Rui @ 2017-07-17 11:45 UTC (permalink / raw) To: Greg KH, Zhang, Jerry Cc: Wang, Ken, amd-gfx@lists.freedesktop.org, stable@vger.kernel.org, Alex Deucher On Mon, Jul 17, 2017 at 06:57:41PM +0800, Greg KH wrote: > On Mon, Jul 17, 2017 at 04:56:26PM +0800, Zhang, Jerry (Junwei) wrote: > > + stable@vger.kernel.org > > <formletter> > > This is not the correct way to submit patches for inclusion in the > stable kernel tree. Please read: > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > for how to do this properly. > > </formletter> Thanks, Greg. :-) >> BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be >> backported to stable tree. Jerry, I might not describe it clearly. We need follow the rule that Greg provided. Actually, I meant to add Cc in your commit message like below, then sent it out: 8<---------- Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop This fixes the SOS loading failure of psp v3.1. Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Cc: stable@vger.kernel.org 8<---------- And you'd better squeeze the two patches as one (actually it's only one fix) to make backporting more smooth. Thanks, Rui ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop 2017-07-17 11:45 ` Huang Rui @ 2017-07-18 2:50 ` Zhang, Jerry (Junwei) -1 siblings, 0 replies; 15+ messages in thread From: Zhang, Jerry (Junwei) @ 2017-07-18 2:50 UTC (permalink / raw) To: Huang Rui, Greg KH Cc: Deucher, Alexander, Wang, Ken, stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org On 07/17/2017 07:45 PM, Huang Rui wrote: > On Mon, Jul 17, 2017 at 06:57:41PM +0800, Greg KH wrote: >> On Mon, Jul 17, 2017 at 04:56:26PM +0800, Zhang, Jerry (Junwei) wrote: >> > + stable@vger.kernel.org >> >> <formletter> >> >> This is not the correct way to submit patches for inclusion in the >> stable kernel tree. Please read: >>https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html >> for how to do this properly. >> >> </formletter> > > Thanks, Greg. :-) Thanks Greg to reminder that > >>> BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be >>> backported to stable tree. > > Jerry, I might not describe it clearly. We need follow the rule that Greg > provided. Actually, I meant to add Cc in your commit message like below, > then sent it out: Thanks to explain in detail. I will prepare it them as one patch again. Jerry > > 8<---------- > > Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop > > This fixes the SOS loading failure of psp v3.1. > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> > Cc: stable@vger.kernel.org > > 8<---------- > > And you'd better squeeze the two patches as one (actually it's only one > fix) to make backporting more smooth. > > Thanks, > Rui _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop @ 2017-07-18 2:50 ` Zhang, Jerry (Junwei) 0 siblings, 0 replies; 15+ messages in thread From: Zhang, Jerry (Junwei) @ 2017-07-18 2:50 UTC (permalink / raw) To: Huang Rui, Greg KH Cc: Wang, Ken, amd-gfx@lists.freedesktop.org, stable@vger.kernel.org, Deucher, Alexander On 07/17/2017 07:45 PM, Huang Rui wrote: > On Mon, Jul 17, 2017 at 06:57:41PM +0800, Greg KH wrote: >> On Mon, Jul 17, 2017 at 04:56:26PM +0800, Zhang, Jerry (Junwei) wrote: >> > + stable@vger.kernel.org >> >> <formletter> >> >> This is not the correct way to submit patches for inclusion in the >> stable kernel tree. Please read: >>https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html >> for how to do this properly. >> >> </formletter> > > Thanks, Greg. :-) Thanks Greg to reminder that > >>> BTW: please add Cc: <stable@vger.kernel.org> in your patch, it need be >>> backported to stable tree. > > Jerry, I might not describe it clearly. We need follow the rule that Greg > provided. Actually, I meant to add Cc in your commit message like below, > then sent it out: Thanks to explain in detail. I will prepare it them as one patch again. Jerry > > 8<---------- > > Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop > > This fixes the SOS loading failure of psp v3.1. > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> > Cc: stable@vger.kernel.org > > 8<---------- > > And you'd better squeeze the two patches as one (actually it's only one > fix) to make backporting more smooth. > > Thanks, > Rui ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop @ 2017-07-18 2:54 ` Junwei Zhang 0 siblings, 0 replies; 15+ messages in thread From: Junwei Zhang @ 2017-07-18 2:54 UTC (permalink / raw) To: amd-gfx; +Cc: alexander.deucher, ray.huang, gregkh, Zhang, Jerry, stable From: "Zhang, Jerry" <Jerry.Zhang@amd.com> v2: fixes the SOS loading failure for PSP v3.1 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Cc: stable@vger.kernel.org Acked-by: Alex Deucher <alexander.deucher@amd.com> (v1) Acked-by: Huang Rui <ray.huang@amd.com> (v1) --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index c919579..644941d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -98,9 +98,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; diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c index 2718e86..23106e3 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c @@ -237,11 +237,9 @@ int psp_v3_1_bootloader_load_sos(struct psp_context *psp) /* there might be handshake issue with hardware which needs delay */ mdelay(20); -#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 return ret; } -- 1.9.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop @ 2017-07-18 2:54 ` Junwei Zhang 0 siblings, 0 replies; 15+ messages in thread From: Junwei Zhang @ 2017-07-18 2:54 UTC (permalink / raw) To: amd-gfx; +Cc: alexander.deucher, ray.huang, gregkh, Zhang, Jerry, stable From: "Zhang, Jerry" <Jerry.Zhang@amd.com> v2: fixes the SOS loading failure for PSP v3.1 Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Cc: stable@vger.kernel.org Acked-by: Alex Deucher <alexander.deucher@amd.com> (v1) Acked-by: Huang Rui <ray.huang@amd.com> (v1) --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index c919579..644941d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -98,9 +98,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; diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c index 2718e86..23106e3 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c +++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c @@ -237,11 +237,9 @@ int psp_v3_1_bootloader_load_sos(struct psp_context *psp) /* there might be handshake issue with hardware which needs delay */ mdelay(20); -#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 return ret; } -- 1.9.1 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* RE: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop 2017-07-18 2:54 ` Junwei Zhang @ 2017-07-18 3:25 ` Deucher, Alexander -1 siblings, 0 replies; 15+ messages in thread From: Deucher, Alexander @ 2017-07-18 3:25 UTC (permalink / raw) To: amd-gfx@lists.freedesktop.org Cc: Huang, Ray, gregkh@linuxfoundation.org, Zhang, Jerry, stable@vger.kernel.org > -----Original Message----- > From: Junwei Zhang [mailto:Jerry.Zhang@amd.com] > Sent: Monday, July 17, 2017 10:54 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander; Huang, Ray; gregkh@linuxfoundation.org; Zhang, > Jerry; stable@vger.kernel.org > Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop > > From: "Zhang, Jerry" <Jerry.Zhang@amd.com> > > v2: fixes the SOS loading failure for PSP v3.1 > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> > Cc: stable@vger.kernel.org > Acked-by: Alex Deucher <alexander.deucher@amd.com> (v1) > Acked-by: Huang Rui <ray.huang@amd.com> (v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- > drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 -- > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > index c919579..644941d 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > @@ -98,9 +98,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; > diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > index 2718e86..23106e3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > +++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > @@ -237,11 +237,9 @@ int psp_v3_1_bootloader_load_sos(struct > psp_context *psp) > > /* there might be handshake issue with hardware which needs delay > */ > mdelay(20); > -#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 > > return ret; > } > -- > 1.9.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop @ 2017-07-18 3:25 ` Deucher, Alexander 0 siblings, 0 replies; 15+ messages in thread From: Deucher, Alexander @ 2017-07-18 3:25 UTC (permalink / raw) To: Zhang, Jerry, amd-gfx@lists.freedesktop.org Cc: Huang, Ray, gregkh@linuxfoundation.org, Zhang, Jerry, stable@vger.kernel.org > -----Original Message----- > From: Junwei Zhang [mailto:Jerry.Zhang@amd.com] > Sent: Monday, July 17, 2017 10:54 PM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander; Huang, Ray; gregkh@linuxfoundation.org; Zhang, > Jerry; stable@vger.kernel.org > Subject: [PATCH] drm/amdgpu: read reg in each iterate of psp_wait_for loop > > From: "Zhang, Jerry" <Jerry.Zhang@amd.com> > > v2: fixes the SOS loading failure for PSP v3.1 > > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> > Cc: stable@vger.kernel.org > Acked-by: Alex Deucher <alexander.deucher@amd.com> (v1) > Acked-by: Huang Rui <ray.huang@amd.com> (v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +-- > drivers/gpu/drm/amd/amdgpu/psp_v3_1.c | 2 -- > 2 files changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > index c919579..644941d 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c > @@ -98,9 +98,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; > diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > index 2718e86..23106e3 100644 > --- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > +++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c > @@ -237,11 +237,9 @@ int psp_v3_1_bootloader_load_sos(struct > psp_context *psp) > > /* there might be handshake issue with hardware which needs delay > */ > mdelay(20); > -#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 > > return ret; > } > -- > 1.9.1 ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2017-07-18 3:25 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.