On Fri, Sep 16, 2016 at 5:38 PM, Lukas Wunner <lu...@wunner.de> wrote:
> On Fri, Sep 16, 2016 at 04:42:43PM -0400, Alex Deucher wrote:
>>       drm/amdgpu: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF
>>       drm/radeon: skip suspend/resume on DRM_SWITCH_POWER_DYNAMIC_OFF
>
> Those two are unnecessary, it can't happen that the ->suspend hook
> is executed with the device runtime suspended.
>
> Since commit d14d2a8453d6 ("drm: Remove dev_pm_ops from drm_class"),
> DRM devices are afforded direct_complete, i.e. if the GPU is runtime
> suspended upon system sleep, it is left in this state.  The only
> callbacks that are executed are the ->prepare and the ->complete hook.
> All the callbacks in-between, like ->suspend, are skipped.
>
> Even if direct_complete is not afforded for some reason, the PM core
> will automatically runtime resume the device before executing ->suspend.
>
> That ->suspend is skipped in the DRM_SWITCH_POWER_OFF case was done
> because the device is suspended behind the PM core's back if runpm=0
> is set.  (And it doesn't work properly because the PCI core will
> invalidate the saved_state during ->resume_noirq.  That could be
> solved by returning 1 from the ->prepare hook in the DRM_SWITCH_POWER_OFF
> case, but that's a different story.)
>
> (Sorry for not raising this earlier, I'm not subscribed to amd-gfx.)

Thanks for the heads up.  They shouldn't hurt anything and it matches
what other drivers do.  If you feel strongly about it, I can revert
them later.

Alex

>
> Best regards,
>
> Lukas
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to