* [PATCH] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 @ 2022-12-19 12:12 Tim Huang 2022-12-19 15:21 ` Limonciello, Mario 0 siblings, 1 reply; 3+ messages in thread From: Tim Huang @ 2022-12-19 12:12 UTC (permalink / raw) To: amd-gfx; +Cc: Alexander.Deucher, Yifan1.zhang, li.ma, Xiaojian.Du, Tim Huang MES is part of gfxoff for S0i3 and does not require self-test after S0i3. Besides, self-test will free the BO that triggers a wraning while in the suspend state. [ 81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xfc/0x110 [amdgpu] [ 81.679435] Call Trace: [ 81.679726] <TASK> [ 81.679981] amdgpu_mes_remove_hw_queue+0x17a/0x230 [amdgpu] [ 81.680857] amdgpu_mes_self_test+0x390/0x430 [amdgpu] [ 81.681665] mes_v11_0_late_init+0x37/0x50 [amdgpu] [ 81.682423] amdgpu_device_ip_late_init+0x53/0x280 [amdgpu] [ 81.683257] amdgpu_device_resume+0xae/0x2a0 [amdgpu] [ 81.684043] amdgpu_pmops_resume+0x37/0x70 [amdgpu] [ 81.684818] pci_pm_resume+0x5c/0xa0 [ 81.685247] ? pci_pm_thaw+0x90/0x90 [ 81.685658] dpm_run_callback+0x4e/0x160 [ 81.686110] device_resume+0xad/0x210 [ 81.686529] async_resume+0x1e/0x40 [ 81.686931] async_run_entry_fn+0x33/0x120 [ 81.687405] process_one_work+0x21d/0x3f0 [ 81.687869] worker_thread+0x4a/0x3c0 [ 81.688293] ? process_one_work+0x3f0/0x3f0 [ 81.688777] kthread+0xff/0x130 [ 81.689157] ? kthread_complete_and_exit+0x20/0x20 [ 81.689707] ret_from_fork+0x22/0x30 [ 81.690118] </TASK> [ 81.690380] ---[ end trace 0000000000000000 ]--- Signed-off-by: Tim Huang <tim.huang@amd.com> --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c index 5459366f49ff..80e8cf826e71 100644 --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c @@ -1342,7 +1342,7 @@ static int mes_v11_0_late_init(void *handle) { struct amdgpu_device *adev = (struct amdgpu_device *)handle; - if (!amdgpu_in_reset(adev) && + if (!amdgpu_in_reset(adev) && !adev->in_suspend && (adev->ip_versions[GC_HWIP][0] != IP_VERSION(11, 0, 3))) amdgpu_mes_self_test(adev); -- 2.25.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 2022-12-19 12:12 [PATCH] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 Tim Huang @ 2022-12-19 15:21 ` Limonciello, Mario 2022-12-20 2:36 ` Huang, Tim 0 siblings, 1 reply; 3+ messages in thread From: Limonciello, Mario @ 2022-12-19 15:21 UTC (permalink / raw) To: Tim Huang, amd-gfx; +Cc: Alexander.Deucher, Yifan1.zhang, li.ma, Xiaojian.Du On 12/19/2022 06:12, Tim Huang wrote: > MES is part of gfxoff for S0i3 and does not require self-test after S0i3. > Besides, self-test will free the BO that triggers a wraning while in > the suspend state. > > [ 81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xfc/0x110 [amdgpu] > [ 81.679435] Call Trace: > [ 81.679726] <TASK> > [ 81.679981] amdgpu_mes_remove_hw_queue+0x17a/0x230 [amdgpu] > [ 81.680857] amdgpu_mes_self_test+0x390/0x430 [amdgpu] > [ 81.681665] mes_v11_0_late_init+0x37/0x50 [amdgpu] > [ 81.682423] amdgpu_device_ip_late_init+0x53/0x280 [amdgpu] > [ 81.683257] amdgpu_device_resume+0xae/0x2a0 [amdgpu] > [ 81.684043] amdgpu_pmops_resume+0x37/0x70 [amdgpu] > [ 81.684818] pci_pm_resume+0x5c/0xa0 > [ 81.685247] ? pci_pm_thaw+0x90/0x90 > [ 81.685658] dpm_run_callback+0x4e/0x160 > [ 81.686110] device_resume+0xad/0x210 > [ 81.686529] async_resume+0x1e/0x40 > [ 81.686931] async_run_entry_fn+0x33/0x120 > [ 81.687405] process_one_work+0x21d/0x3f0 > [ 81.687869] worker_thread+0x4a/0x3c0 > [ 81.688293] ? process_one_work+0x3f0/0x3f0 > [ 81.688777] kthread+0xff/0x130 > [ 81.689157] ? kthread_complete_and_exit+0x20/0x20 > [ 81.689707] ret_from_fork+0x22/0x30 > [ 81.690118] </TASK> > [ 81.690380] ---[ end trace 0000000000000000 ]--- Is this still needed with https://patchwork.freedesktop.org/patch/515278/ ? > > Signed-off-by: Tim Huang <tim.huang@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > index 5459366f49ff..80e8cf826e71 100644 > --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > @@ -1342,7 +1342,7 @@ static int mes_v11_0_late_init(void *handle) > { > struct amdgpu_device *adev = (struct amdgpu_device *)handle; > > - if (!amdgpu_in_reset(adev) && > + if (!amdgpu_in_reset(adev) && !adev->in_suspend && I think in this case you should be using adev->in_s0ix instead. > (adev->ip_versions[GC_HWIP][0] != IP_VERSION(11, 0, 3))) > amdgpu_mes_self_test(adev); > ^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 2022-12-19 15:21 ` Limonciello, Mario @ 2022-12-20 2:36 ` Huang, Tim 0 siblings, 0 replies; 3+ messages in thread From: Huang, Tim @ 2022-12-20 2:36 UTC (permalink / raw) To: Limonciello, Mario, amd-gfx Cc: Deucher, Alexander, Zhang, Yifan, Ma, Li, Du, Xiaojian [AMD Official Use Only - General] Hi Mario, Comments inline. Thanks. -----Original Message----- From: Limonciello, Mario <Mario.Limonciello@amd.com> Sent: Monday, December 19, 2022 11:22 PM To: Huang, Tim <Tim.Huang@amd.com>; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com>; Ma, Li <Li.Ma@amd.com>; Du, Xiaojian <Xiaojian.Du@amd.com> Subject: Re: drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 On 12/19/2022 06:12, Tim Huang wrote: > MES is part of gfxoff for S0i3 and does not require self-test after S0i3. > Besides, self-test will free the BO that triggers a wraning while in > the suspend state. > > [ 81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xfc/0x110 [amdgpu] > [ 81.679435] Call Trace: > [ 81.679726] <TASK> > [ 81.679981] amdgpu_mes_remove_hw_queue+0x17a/0x230 [amdgpu] > [ 81.680857] amdgpu_mes_self_test+0x390/0x430 [amdgpu] > [ 81.681665] mes_v11_0_late_init+0x37/0x50 [amdgpu] > [ 81.682423] amdgpu_device_ip_late_init+0x53/0x280 [amdgpu] > [ 81.683257] amdgpu_device_resume+0xae/0x2a0 [amdgpu] > [ 81.684043] amdgpu_pmops_resume+0x37/0x70 [amdgpu] > [ 81.684818] pci_pm_resume+0x5c/0xa0 > [ 81.685247] ? pci_pm_thaw+0x90/0x90 > [ 81.685658] dpm_run_callback+0x4e/0x160 > [ 81.686110] device_resume+0xad/0x210 > [ 81.686529] async_resume+0x1e/0x40 > [ 81.686931] async_run_entry_fn+0x33/0x120 > [ 81.687405] process_one_work+0x21d/0x3f0 > [ 81.687869] worker_thread+0x4a/0x3c0 > [ 81.688293] ? process_one_work+0x3f0/0x3f0 > [ 81.688777] kthread+0xff/0x130 > [ 81.689157] ? kthread_complete_and_exit+0x20/0x20 > [ 81.689707] ret_from_fork+0x22/0x30 > [ 81.690118] </TASK> > [ 81.690380] ---[ end trace 0000000000000000 ]--- Is this still needed with https://patchwork.freedesktop.org/patch/515278/ ? Patch 515278 skipped the MES suspend and resume, But the self-test stilled be called by ip late init. Please get detail for patch v2. > > Signed-off-by: Tim Huang <tim.huang@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > index 5459366f49ff..80e8cf826e71 100644 > --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c > @@ -1342,7 +1342,7 @@ static int mes_v11_0_late_init(void *handle) > { > struct amdgpu_device *adev = (struct amdgpu_device *)handle; > > - if (!amdgpu_in_reset(adev) && > + if (!amdgpu_in_reset(adev) && !adev->in_suspend && I think in this case you should be using adev->in_s0ix instead. Yes, adev->in_s0ix should be better, thanks for pointing that out. > (adev->ip_versions[GC_HWIP][0] != IP_VERSION(11, 0, 3))) > amdgpu_mes_self_test(adev); > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-20 2:36 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-12-19 12:12 [PATCH] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0 Tim Huang 2022-12-19 15:21 ` Limonciello, Mario 2022-12-20 2:36 ` Huang, Tim
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.