AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Subject: Re: [pull] radeon and amdgpu drm-next-4.9
Date: Fri, 16 Sep 2016 23:38:48 +0200	[thread overview]
Message-ID: <20160916213848.GA1116@wunner.de> (raw)
In-Reply-To: <1474058563-2525-1-git-send-email-alexander.deucher@amd.com>

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.)

Best regards,

Lukas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-09-16 21:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-16 20:42 [pull] radeon and amdgpu drm-next-4.9 Alex Deucher
2016-09-16 21:38 ` Lukas Wunner [this message]
2016-09-16 22:07   ` Alex Deucher
2016-09-17 10:23     ` Lukas Wunner
     [not found]       ` <20160917102333.GA1422-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2016-09-19 16:19         ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2016-10-14 17:18 Alex Deucher
2016-10-06 17:00 Alex Deucher
2016-09-28 21:05 Alex Deucher
2016-09-22 19:21 Alex Deucher
2016-08-24 21:46 Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160916213848.GA1116@wunner.de \
    --to=lukas@wunner.de \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox