From: "Grygorii.Strashko@linaro.org" <grygorii.strashko@linaro.org>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>, David Airlie <airlied@linux.ie>
Cc: "Grygorii.Strashko@linaro.org" <grygorii.strashko@linaro.org>,
nm@ti.com, sumit.semwal@linaro.org, linux-omap@vger.kernel.org,
dri-devel@lists.freedesktop.org, Tony Lindgren <tony@atomide.com>,
Kevin Hilman <khilman@linaro.org>
Subject: Re: [PATCH] drm/omap: tiler: add hibernation callback
Date: Wed, 18 Mar 2015 16:56:07 +0200 [thread overview]
Message-ID: <55099207.3060006@linaro.org> (raw)
In-Reply-To: <1424887700-5909-1-git-send-email-grygorii.strashko@linaro.org>
Hi All,
On 02/25/2015 08:08 PM, grygorii.strashko@linaro.org wrote:
> From: Grygorii Strashko <grygorii.strashko@linaro.org>
>
> Setting a dev_pm_ops resume callback but not a set of
> hibernation handler means that pm function will not be
> called upon hibernation.
> Fix this by using SIMPLE_DEV_PM_OPS, which appropriately
> assigns the suspend and hibernation handlers and move
> omap_dmm_resume under CONFIG_PM_SLEEP to avoid build warnings.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
> ---
> drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> index 56c6055..afb8cfc 100644
> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> @@ -941,7 +941,7 @@ error:
> }
> #endif
>
> -#ifdef CONFIG_PM
> +#ifdef CONFIG_PM_SLEEP
> static int omap_dmm_resume(struct device *dev)
> {
> struct tcm_area area;
> @@ -965,12 +965,10 @@ static int omap_dmm_resume(struct device *dev)
>
> return 0;
> }
> -
> -static const struct dev_pm_ops omap_dmm_pm_ops = {
> - .resume = omap_dmm_resume,
> -};
> #endif
>
> +SIMPLE_DEV_PM_OPS(omap_dmm_pm_ops, NULL, omap_dmm_resume);
> +
> #if defined(CONFIG_OF)
> static const struct of_device_id dmm_of_match[] = {
> { .compatible = "ti,omap4-dmm", },
> @@ -986,9 +984,7 @@ struct platform_driver omap_dmm_driver = {
> .owner = THIS_MODULE,
> .name = DMM_DRIVER_NAME,
> .of_match_table = of_match_ptr(dmm_of_match),
> -#ifdef CONFIG_PM
> .pm = &omap_dmm_pm_ops,
> -#endif
> },
> };
>
>
Any comments on this?
--
regards,
-grygorii
next prev parent reply other threads:[~2015-03-18 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 18:08 [PATCH] drm/omap: tiler: add hibernation callback grygorii.strashko
2015-03-18 14:56 ` Grygorii.Strashko@linaro.org [this message]
2015-03-20 11:43 ` Tomi Valkeinen
2015-03-20 14:57 ` Grygorii.Strashko@linaro.org
2015-03-18 16:04 ` Rob Clark
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=55099207.3060006@linaro.org \
--to=grygorii.strashko@linaro.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=khilman@linaro.org \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.com \
--cc=sumit.semwal@linaro.org \
--cc=tomi.valkeinen@ti.com \
--cc=tony@atomide.com \
/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;
as well as URLs for NNTP newsgroup(s).