On Wed, Feb 3, 2021 at 2:56 AM Lazar, Lijo <[email protected]> wrote: > > [AMD Public Use] > > > -----Original Message----- > From: amd-gfx <[email protected]> On Behalf Of Alex > Deucher > Sent: Tuesday, February 2, 2021 10:48 PM > To: [email protected] > Cc: Deucher, Alexander <[email protected]> > Subject: [PATCH 2/2] drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and > DPM_FLAG_SMART_SUSPEND flags > > Once the device has runtime suspended, we don't need to power it back up > again for system suspend. Likewise for resume, we don't to power up the > device again on resume only to power it back off again via runtime pm because > it's still idle. > > Signed-off-by: Alex Deucher <[email protected]> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c > index b4780182f990..b78847fa769b 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c > @@ -206,6 +206,12 @@ int amdgpu_driver_load_kms(struct amdgpu_device *adev, > unsigned long flags) > if (amdgpu_device_supports_atpx(dev) && > !amdgpu_is_atpx_hybrid()) > dev_pm_set_driver_flags(dev->dev, > DPM_FLAG_NO_DIRECT_COMPLETE); > + /* we want direct complete for BOCO */ > + if ((amdgpu_device_supports_atpx(dev) && > + amdgpu_is_atpx_hybrid()) || > + amdgpu_device_supports_boco(dev)) > + dev_pm_set_driver_flags(dev->dev, > DPM_FLAG_SMART_SUSPEND | > + DPM_FLAG_MAY_SKIP_RESUME); > > Device runtime suspend callback does - > amdgpu_device_suspend(drm_dev, false) > > System suspend callback does - > amdgpu_device_suspend(drm_dev, true) > > One of the effects of this flag is for KFD to decide whether to evict all > processes. It is done during system suspend but not during runtime device > suspend. Will that have an impact if the system suspend routine is skipped > in this way?
+ Rajneesh Can you comment on this? Idea of this patch is to not wake the device for system suspend and resume if it's already in runtime suspend. Alex > > Thanks, > Lijo > > pm_runtime_use_autosuspend(dev->dev); > pm_runtime_set_autosuspend_delay(dev->dev, 5000); > pm_runtime_allow(dev->dev); > -- > 2.29.2 > > _______________________________________________ > amd-gfx mailing list > [email protected] > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Clijo.lazar%40amd.com%7C8a6f7c5bbab84c6e71c408d8c79e7edd%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637478830856688013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=55Rfj9pO3cnGBiB1DkJ9yuyMMrKOvxhgYDajhIeUNkI%3D&reserved=0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
