Re: s2idle not working
HI Alex, I will check with your patch. if it doesn't work i will raise bug . Regards, Sk shahul. On Thu, Feb 21, 2019 at 12:01 PM Alex Deucher wrote: > On Wed, Feb 20, 2019 at 11:56 PM shahul hameed > wrote: > > > > Hi All, > > > > I did below exoeriments: > > > > -> S2idle is working in software rendering mode(disable AMDGPU driver). > > > > -> For experiment purpose i commented suspend/resume calls of amdgpu > driver, in this case S2idle worked. > > > > With above experiments it is clear that my platform supports s2idel. > > Some issue in AMDGPU suspend/resume sequence for s2idle. > > So can you please help me. > > I'd suggest filing a bug (https://bugs.freedesktop.org) and attaching > your full dmesg output. I'm not too familiar with s2idle and what > pmops paths it uses. I suspect what is happening is that the power is > not getting fully cut the the device when s2idle is invoked, and it's > left in a bad state on resume. Maybe something like the attached > patch might help. That said, if the platform is not properly cutting > power to the device at s2idle time, you probably aren't saving any > power anyway. > > Alex > > > > > Thanks & Regards, > > Sk shahul. > > > > On Thu, Feb 21, 2019 at 3:32 AM Alex Deucher > wrote: > >> > >> On Wed, Feb 20, 2019 at 4:59 PM shahul hameed > >> wrote: > >> > > >> > Hi > >> > > >> > I am facing below issue. Can any one please help me to resolve it. > >> > >> As I mentioned previously, please make sure the platform supports > >> s2idle and that it is enabled in the sbios. Does s2idle work on other > >> devices and the platform itself? > >> > >> Alex > >> > >> > > >> > Regards, > >> > Sk shahul > >> > > >> > -- Forwarded message - > >> > From: shahul hameed > >> > Date: Wed, Feb 20, 2019, 3:13 PM > >> > Subject: s2idle not working > >> > To: > >> > > >> > > >> > Hi Shirish > >> > > >> > I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic > card is gfx9. > >> > Porting is done successfully. Now i am working on suspend/resume. > >> > Suspend/resume is working fine in deep mode. > >> > But suspend/resume is not working in s2idle (Suspend to idle) mode. > >> > > >> > during resume i found error in gpu driver. > >> > > >> > [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable > failed (scratch(0xC040)=0xCAFEDEAD) > >> > [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* > resume of IP block failed -22 > >> > [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* > amdgpu_device_ip_resume failed (-22). > >> > [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 > >> > [ 105.862345] PM: Device :03:00.0 failed to resume async: error > -22 > >> > > >> > same issue is reproduced with ubuntu16.04. > >> > > >> > Can you please help me to resolve this issue. > >> > Thanks in Advance, > >> > Regards, > >> > Sk shahul. > >> > ___ > >> > 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
Re: s2idle not working
On Wed, Feb 20, 2019 at 11:56 PM shahul hameed wrote: > > Hi All, > > I did below exoeriments: > > -> S2idle is working in software rendering mode(disable AMDGPU driver). > > -> For experiment purpose i commented suspend/resume calls of amdgpu driver, > in this case S2idle worked. > > With above experiments it is clear that my platform supports s2idel. > Some issue in AMDGPU suspend/resume sequence for s2idle. > So can you please help me. I'd suggest filing a bug (https://bugs.freedesktop.org) and attaching your full dmesg output. I'm not too familiar with s2idle and what pmops paths it uses. I suspect what is happening is that the power is not getting fully cut the the device when s2idle is invoked, and it's left in a bad state on resume. Maybe something like the attached patch might help. That said, if the platform is not properly cutting power to the device at s2idle time, you probably aren't saving any power anyway. Alex > > Thanks & Regards, > Sk shahul. > > On Thu, Feb 21, 2019 at 3:32 AM Alex Deucher wrote: >> >> On Wed, Feb 20, 2019 at 4:59 PM shahul hameed >> wrote: >> > >> > Hi >> > >> > I am facing below issue. Can any one please help me to resolve it. >> >> As I mentioned previously, please make sure the platform supports >> s2idle and that it is enabled in the sbios. Does s2idle work on other >> devices and the platform itself? >> >> Alex >> >> > >> > Regards, >> > Sk shahul >> > >> > -- Forwarded message - >> > From: shahul hameed >> > Date: Wed, Feb 20, 2019, 3:13 PM >> > Subject: s2idle not working >> > To: >> > >> > >> > Hi Shirish >> > >> > I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic card >> > is gfx9. >> > Porting is done successfully. Now i am working on suspend/resume. >> > Suspend/resume is working fine in deep mode. >> > But suspend/resume is not working in s2idle (Suspend to idle) mode. >> > >> > during resume i found error in gpu driver. >> > >> > [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable failed >> > (scratch(0xC040)=0xCAFEDEAD) >> > [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* >> > resume of IP block failed -22 >> > [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* >> > amdgpu_device_ip_resume failed (-22). >> > [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 >> > [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 >> > >> > same issue is reproduced with ubuntu16.04. >> > >> > Can you please help me to resolve this issue. >> > Thanks in Advance, >> > Regards, >> > Sk shahul. >> > ___ >> > amd-gfx mailing list >> > amd-gfx@lists.freedesktop.org >> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx From 8a506e026c0913b1b0efab89cb03bf81ad1b3a74 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 21 Feb 2019 01:24:15 -0500 Subject: [PATCH] drm/amdgpu: possibly reset device on resume If the device was left in a bad state on resume form suspend attempt to reset the GPU. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index fcab1fe9bb68..6ab2fb3c0c51 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2896,6 +2896,12 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) return r; } + if (!amdgpu_sriov_vf(adev) && amdgpu_asic_need_reset_on_init(adev)) { + r = amdgpu_asic_reset(adev); + if (r) + return r; + } + /* post card */ if (amdgpu_device_need_post(adev)) { r = amdgpu_atom_asic_init(adev->mode_info.atom_context); -- 2.20.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: s2idle not working
Hi All, Below error also got amdgpu :04:00.0: couldn't schedule ib on ring [ 148.782052] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22) [ 148.782054] amdgpu :04:00.0: couldn't schedule ib on ring [ 148.782107] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22) [ 148.782120] amdgpu :04:00.0: couldn't schedule ib on ring [ 148.782173] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22) [ 148.782175] amdgpu :04:00.0: couldn't schedule ib on ring [ 148.782228] [drm:amdgpu_job_run [amdgpu]] *ERROR* Error scheduling IBs (-22) Regards, Skshahul. On Thu, Feb 21, 2019 at 10:26 AM shahul hameed wrote: > Hi All, > > I did below exoeriments: > > -> S2idle is working in software rendering mode(disable AMDGPU driver). > > -> For experiment purpose i commented suspend/resume calls of amdgpu > driver, in this case S2idle worked. > With above experiments it is clear that my platform supports s2idel. > Some issue in AMDGPU suspend/resume sequence for s2idle. > So can you please help me. > > Thanks & Regards, > Sk shahul. > > On Thu, Feb 21, 2019 at 3:32 AM Alex Deucher > wrote: > >> On Wed, Feb 20, 2019 at 4:59 PM shahul hameed >> wrote: >> > >> > Hi >> > >> > I am facing below issue. Can any one please help me to resolve it. >> >> As I mentioned previously, please make sure the platform supports >> s2idle and that it is enabled in the sbios. Does s2idle work on other >> devices and the platform itself? >> >> Alex >> >> > >> > Regards, >> > Sk shahul >> > >> > -- Forwarded message - >> > From: shahul hameed >> > Date: Wed, Feb 20, 2019, 3:13 PM >> > Subject: s2idle not working >> > To: >> > >> > >> > Hi Shirish >> > >> > I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic >> card is gfx9. >> > Porting is done successfully. Now i am working on suspend/resume. >> > Suspend/resume is working fine in deep mode. >> > But suspend/resume is not working in s2idle (Suspend to idle) mode. >> > >> > during resume i found error in gpu driver. >> > >> > [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable >> failed (scratch(0xC040)=0xCAFEDEAD) >> > [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* >> resume of IP block failed -22 >> > [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* >> amdgpu_device_ip_resume failed (-22). >> > [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 >> > [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 >> > >> > same issue is reproduced with ubuntu16.04. >> > >> > Can you please help me to resolve this issue. >> > Thanks in Advance, >> > Regards, >> > Sk shahul. >> > ___ >> > 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
Re: s2idle not working
Hi All, I did below exoeriments: -> S2idle is working in software rendering mode(disable AMDGPU driver). -> For experiment purpose i commented suspend/resume calls of amdgpu driver, in this case S2idle worked. With above experiments it is clear that my platform supports s2idel. Some issue in AMDGPU suspend/resume sequence for s2idle. So can you please help me. Thanks & Regards, Sk shahul. On Thu, Feb 21, 2019 at 3:32 AM Alex Deucher wrote: > On Wed, Feb 20, 2019 at 4:59 PM shahul hameed > wrote: > > > > Hi > > > > I am facing below issue. Can any one please help me to resolve it. > > As I mentioned previously, please make sure the platform supports > s2idle and that it is enabled in the sbios. Does s2idle work on other > devices and the platform itself? > > Alex > > > > > Regards, > > Sk shahul > > > > -- Forwarded message ----- > > From: shahul hameed > > Date: Wed, Feb 20, 2019, 3:13 PM > > Subject: s2idle not working > > To: > > > > > > Hi Shirish > > > > I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic card > is gfx9. > > Porting is done successfully. Now i am working on suspend/resume. > > Suspend/resume is working fine in deep mode. > > But suspend/resume is not working in s2idle (Suspend to idle) mode. > > > > during resume i found error in gpu driver. > > > > [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable failed > (scratch(0xC040)=0xCAFEDEAD) > > [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* > resume of IP block failed -22 > > [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* > amdgpu_device_ip_resume failed (-22). > > [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 > > [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 > > > > same issue is reproduced with ubuntu16.04. > > > > Can you please help me to resolve this issue. > > Thanks in Advance, > > Regards, > > Sk shahul. > > ___ > > 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
Re: s2idle not working
On Wed, Feb 20, 2019 at 4:59 PM shahul hameed wrote: > > Hi > > I am facing below issue. Can any one please help me to resolve it. As I mentioned previously, please make sure the platform supports s2idle and that it is enabled in the sbios. Does s2idle work on other devices and the platform itself? Alex > > Regards, > Sk shahul > > -- Forwarded message - > From: shahul hameed > Date: Wed, Feb 20, 2019, 3:13 PM > Subject: s2idle not working > To: > > > Hi Shirish > > I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic card is > gfx9. > Porting is done successfully. Now i am working on suspend/resume. > Suspend/resume is working fine in deep mode. > But suspend/resume is not working in s2idle (Suspend to idle) mode. > > during resume i found error in gpu driver. > > [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable failed > (scratch(0xC040)=0xCAFEDEAD) > [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume > of IP block failed -22 > [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* > amdgpu_device_ip_resume failed (-22). > [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 > [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 > > same issue is reproduced with ubuntu16.04. > > Can you please help me to resolve this issue. > Thanks in Advance, > Regards, > Sk shahul. > ___ > 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
Fwd: s2idle not working
Hi I am facing below issue. Can any one please help me to resolve it. Regards, Sk shahul -- Forwarded message - From: shahul hameed Date: Wed, Feb 20, 2019, 3:13 PM Subject: s2idle not working To: Hi Shirish I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic card is gfx9. Porting is done successfully. Now i am working on suspend/resume. Suspend/resume is working fine in deep mode. But suspend/resume is not working in s2idle (Suspend to idle) mode. during resume i found error in gpu driver. [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable failed (scratch(0xC040)=0xCAFEDEAD) [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block failed -22 [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu_device_ip_resume failed (-22). [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 same issue is reproduced with ubuntu16.04. Can you please help me to resolve this issue. Thanks in Advance, Regards, Sk shahul. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: s2idle not working
Thanks, I will. On Wed, Feb 20, 2019, 8:29 PM S, Shirish wrote: > Please mail your query to amd-gfx@lists.freedesktop.org . > > > > > > > > Regards, > > Shirish S > > > > *From:* shahul hameed > *Sent:* Wednesday, February 20, 2019 3:14 PM > *To:* S, Shirish > *Subject:* s2idle not working > > > > Hi Shirish > > > > I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic card > is gfx9. > > Porting is done successfully. Now i am working on suspend/resume. > > Suspend/resume is working fine in deep mode. > > But suspend/resume is not working in s2idle (Suspend to idle) mode. > > > > during resume i found error in gpu driver. > > > > [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable failed > (scratch(0xC040)=0xCAFEDEAD) > [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* > resume of IP block failed -22 > [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* > amdgpu_device_ip_resume failed (-22). > [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 > [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 > > > > same issue is reproduced with ubuntu16.04. > > > > Can you please help me to resolve this issue. > > Thanks in Advance, > > Regards, > > Sk shahul. > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
RE: s2idle not working
Please mail your query to amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> . Regards, Shirish S From: shahul hameed Sent: Wednesday, February 20, 2019 3:14 PM To: S, Shirish Subject: s2idle not working Hi Shirish I am porting Android_N and keenel 4.19.2 to Ryzen platform. Graphic card is gfx9. Porting is done successfully. Now i am working on suspend/resume. Suspend/resume is working fine in deep mode. But suspend/resume is not working in s2idle (Suspend to idle) mode. during resume i found error in gpu driver. [ 105.862161] [drm:gfx_v9_0_hw_init [amdgpu]] *ERROR* KCQ enable failed (scratch(0xC040)=0xCAFEDEAD) [ 105.862187] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block failed -22 [ 105.862210] [drm:amdgpu_device_resume [amdgpu]] *ERROR* amdgpu_device_ip_resume failed (-22). [ 105.862215] dpm_run_callback(): pci_pm_resume+0x0/0xd6 returns -22 [ 105.862345] PM: Device :03:00.0 failed to resume async: error -22 same issue is reproduced with ubuntu16.04. Can you please help me to resolve this issue. Thanks in Advance, Regards, Sk shahul. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx