From: Kevin Hilman <khilman@baylibre.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-pm@vger.kernel.org, "Len Brown" <len.brown@intel.com>,
"Pavel Machek" <pavel@ucw.cz>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Lina Iyer" <lina.iyer@linaro.org>,
"Axel Haslam" <ahaslam@baylibre.com>,
"Marek Szyprowski" <m.szyprowski@samsung.com>,
"Jon Hunter" <jonathanh@nvidia.com>,
"Andy Gross" <andy.gross@linaro.org>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"David Airlie" <airlied@linux.ie>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Maruthi Srinivas Bayyavarapu" <Maruthi.Bayyavarapu@amd.com>,
dri-devel@lists.freedesktop.org,
"Christian König" <christian.koenig@amd.com>
Subject: Re: [RESEND PATCH v3 1/2] PM / Domains: Allow genpd to power on during the system PM phases
Date: Wed, 15 Jun 2016 14:00:29 -0700 [thread overview]
Message-ID: <m2fusep3pu.fsf@baylibre.com> (raw)
In-Reply-To: <1464601388-26693-2-git-send-email-ulf.hansson@linaro.org> (Ulf Hansson's message of "Mon, 30 May 2016 11:43:07 +0200")
Ulf Hansson <ulf.hansson@linaro.org> writes:
> If the PM domain is powered off when the first device starts its system PM
> prepare phase, genpd prevents any further attempts to power on the PM
> domain during the following system PM phases. Not until the system PM
> complete phase is finalized for all devices in the PM domain, genpd again
> allows it to be powered on.
>
> This behaviour needs to be changed, as a subsystem/driver for a device in
> the same PM domain may still need to be able to serve requests in some of
> the system PM phases. Accordingly, it may need to runtime resume its
> device and thus also request the corresponding PM domain to be powered on.
>
> To deal with these scenarios, let's make the device operational in the
> system PM prepare phase by runtime resuming it, no matter if the PM domain
> is powered on or off. Changing this also enables us to remove genpd's
> suspend_power_off flag, as it's being used to track this condition.
> Additionally, we must allow the PM domain to be powered on via runtime PM
> during the system PM phases.
>
> This change also requires a fix in the AMD ACP (Audio CoProcessor) drm
> driver. It registers a genpd to model the ACP as a PM domain, but
> unfortunately it's also abuses genpd's "internal" suspend_power_off flag
> to deal with a corner case at system PM resume.
>
> More precisely, the so called SMU block powers on the ACP at system PM
> resume, unconditionally if it's being used or not. This may lead to that
> genpd's internal status of the power state, may not correctly reflect the
> power state of the HW after a system PM resume.
>
> Because of changing the behaviour of genpd, by runtime resuming devices in
> the prepare phase, the AMD ACP drm driver no longer have to deal with this
> corner case. So let's just drop the related code in this driver.
>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Maruthi Srinivas Bayyavarapu <Maruthi.Bayyavarapu@amd.com>
> Cc: dri-devel@lists.freedesktop.org
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>
> Changes in v3:
> - Updated changelog.
>
> Changes in v2:
> - Updated changelog.
> - Added a fix in the AMD ACP (Audio CoProcessor) drm driver, which
> registers a genpd. The fix removes the usage of genpd's internal
> suspend_power_off flag as it's not needed after this change. Because of
> this change I am also requesting an ack from the drm driver maintainer.
>
>
> ---
> drivers/base/power/domain.c | 84 ++++++++++++---------------------
> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 23 ---------
> include/linux/pm_domain.h | 1 -
For the PM core part:
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
For the AMD DRM driver, the changes look right too, but I'm not
confident enough about the intent of that to be sure.
Kevin
next prev parent reply other threads:[~2016-06-15 21:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 9:43 [RESEND PATCH v3 0/2] PM / Domains: Second step in improving system PM code in genpd Ulf Hansson
2016-05-30 9:43 ` [RESEND PATCH v3 1/2] PM / Domains: Allow genpd to power on during the system PM phases Ulf Hansson
2016-06-15 21:00 ` Kevin Hilman [this message]
2016-06-16 11:30 ` maruthi srinivas
2016-05-30 9:43 ` [RESEND PATCH v3 2/2] PM / Domains: Remove redundant wrapper functions for system PM Ulf Hansson
2016-06-15 21:01 ` Kevin Hilman
2016-06-15 8:22 ` [RESEND PATCH v3 0/2] PM / Domains: Second step in improving system PM code in genpd Ulf Hansson
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=m2fusep3pu.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=Maruthi.Bayyavarapu@amd.com \
--cc=ahaslam@baylibre.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=andy.gross@linaro.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=jonathanh@nvidia.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=len.brown@intel.com \
--cc=lina.iyer@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
--cc=ulf.hansson@linaro.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