* [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode
@ 2018-07-20 16:33 Michel Dänzer
[not found] ` <20180720163301.9376-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Michel Dänzer @ 2018-07-20 16:33 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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>
---
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);
}
--
2.18.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <20180720163301.9376-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>]
* RE: [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode [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) 2018-07-24 17:20 ` Paul Menzel 2 siblings, 0 replies; 5+ messages in thread From: Deucher, Alexander @ 2018-07-20 16:35 UTC (permalink / raw) To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Michel Dänzer > Sent: Friday, July 20, 2018 12:33 PM > To: amd-gfx@lists.freedesktop.org > Subject: [PATCH] drm/amdgpu: Fix RLC safe mode test in > gfx_v9_0_enter_rlc_safe_mode > > 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> Reviewed-by: Alex Deucher <alexander.deucher@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); > } > -- > 2.18.0 > > _______________________________________________ > 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] 5+ messages in thread
* Re: [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode [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) 2018-07-24 17:20 ` Paul Menzel 2 siblings, 0 replies; 5+ messages in thread From: Zhang, Jerry (Junwei) @ 2018-07-23 6:33 UTC (permalink / raw) To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode [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) @ 2018-07-24 17:20 ` Paul Menzel [not found] ` <cd8a8d33-2fa5-6cdc-fe62-86a38f04c207-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org> 2 siblings, 1 reply; 5+ messages in thread From: Paul Menzel @ 2018-07-24 17:20 UTC (permalink / raw) To: Michel Dänzer; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW [-- Attachment #1.1: Type: text/plain, Size: 711 bytes --] Dear Michel, On 07/20/18 18:33, Michel Dänzer wrote: > From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org> > > 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-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org> > Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org> […] As this line is present since v4.12-rc1, could you please tag this to be picked up for the stable series (4.14.x)? Kind regards, Paul [-- Attachment #1.2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 5174 bytes --] [-- Attachment #2: Type: text/plain, Size: 154 bytes --] _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <cd8a8d33-2fa5-6cdc-fe62-86a38f04c207-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: Fix RLC safe mode test in gfx_v9_0_enter_rlc_safe_mode [not found] ` <cd8a8d33-2fa5-6cdc-fe62-86a38f04c207-KUpvgZVWgV9o1qOY/usvUg@public.gmane.org> @ 2018-07-24 17:24 ` Michel Dänzer 0 siblings, 0 replies; 5+ messages in thread From: Michel Dänzer @ 2018-07-24 17:24 UTC (permalink / raw) To: Paul Menzel; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On 2018-07-24 07:20 PM, Paul Menzel wrote: > On 07/20/18 18:33, 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> > > […] > > As this line is present since v4.12-rc1, could you please tag this to be > picked up for the stable series (4.14.x)? I added the Cc: stable tag before pushing to the internal amd-staging-drm-next branch. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-24 17:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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)
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
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.