* [PATCH] drm/omap: tiler: add hibernation callback
@ 2015-02-25 18:08 grygorii.strashko
2015-03-18 14:56 ` Grygorii.Strashko@linaro.org
2015-03-18 16:04 ` Rob Clark
0 siblings, 2 replies; 5+ messages in thread
From: grygorii.strashko @ 2015-02-25 18:08 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie
Cc: nm, sumit.semwal, linux-omap, dri-devel, Grygorii Strashko
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
},
};
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/omap: tiler: add hibernation callback
2015-02-25 18:08 [PATCH] drm/omap: tiler: add hibernation callback grygorii.strashko
@ 2015-03-18 14:56 ` Grygorii.Strashko@linaro.org
2015-03-20 11:43 ` Tomi Valkeinen
2015-03-18 16:04 ` Rob Clark
1 sibling, 1 reply; 5+ messages in thread
From: Grygorii.Strashko@linaro.org @ 2015-03-18 14:56 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie
Cc: Grygorii.Strashko@linaro.org, nm, sumit.semwal, linux-omap,
dri-devel, Tony Lindgren, Kevin Hilman
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/omap: tiler: add hibernation callback
2015-02-25 18:08 [PATCH] drm/omap: tiler: add hibernation callback grygorii.strashko
2015-03-18 14:56 ` Grygorii.Strashko@linaro.org
@ 2015-03-18 16:04 ` Rob Clark
1 sibling, 0 replies; 5+ messages in thread
From: Rob Clark @ 2015-03-18 16:04 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Tomi Valkeinen, David Airlie, Menon, Nishanth, Sumit Semwal,
linux-omap, dri-devel
On Wed, Feb 25, 2015 at 1: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>
Reviewed-by: Rob Clark <robdclark@gmail.com>
> ---
> 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
> },
> };
>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/omap: tiler: add hibernation callback
2015-03-18 14:56 ` Grygorii.Strashko@linaro.org
@ 2015-03-20 11:43 ` Tomi Valkeinen
2015-03-20 14:57 ` Grygorii.Strashko@linaro.org
0 siblings, 1 reply; 5+ messages in thread
From: Tomi Valkeinen @ 2015-03-20 11:43 UTC (permalink / raw)
To: Grygorii.Strashko@linaro.org
Cc: David Airlie, nm, sumit.semwal, linux-omap, dri-devel,
Tony Lindgren, Kevin Hilman
[-- Attachment #1: Type: text/plain, Size: 2005 bytes --]
On 18/03/15 16:56, Grygorii.Strashko@linaro.org wrote:
> 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?
Sorry, I missed this. I'll add it to my omapdrm branch.
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/omap: tiler: add hibernation callback
2015-03-20 11:43 ` Tomi Valkeinen
@ 2015-03-20 14:57 ` Grygorii.Strashko@linaro.org
0 siblings, 0 replies; 5+ messages in thread
From: Grygorii.Strashko@linaro.org @ 2015-03-20 14:57 UTC (permalink / raw)
To: Tomi Valkeinen
Cc: David Airlie, nm, sumit.semwal, linux-omap, dri-devel,
Tony Lindgren, Kevin Hilman
On 03/20/2015 01:43 PM, Tomi Valkeinen wrote:
> On 18/03/15 16:56, Grygorii.Strashko@linaro.org wrote:
>> 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?
>
> Sorry, I missed this. I'll add it to my omapdrm branch.
>
Thanks.
--
regards,
-grygorii
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-20 14:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 18:08 [PATCH] drm/omap: tiler: add hibernation callback grygorii.strashko
2015-03-18 14:56 ` Grygorii.Strashko@linaro.org
2015-03-20 11:43 ` Tomi Valkeinen
2015-03-20 14:57 ` Grygorii.Strashko@linaro.org
2015-03-18 16:04 ` Rob Clark
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.