2017-06-16 13:53:41

by Liviu Dudau

[permalink] [raw]
Subject: [PATCH] drm: hdlcd: Update PM code to save/restore console.

Update the PM code to suspend/resume the fbdev_cma console.

Signed-off-by: Liviu Dudau <[email protected]>
---
drivers/gpu/drm/arm/hdlcd_drv.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index d3da87fbd85a..89cd408cde6f 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/clk.h>
#include <linux/component.h>
+#include <linux/console.h>
#include <linux/list.h>
#include <linux/of_graph.h>
#include <linux/of_reserved_mem.h>
@@ -435,9 +436,15 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
return 0;

drm_kms_helper_poll_disable(drm);
+ console_lock();
+ drm_fbdev_cma_set_suspend(hdlcd->fbdev, 1);
+ console_unlock();

hdlcd->state = drm_atomic_helper_suspend(drm);
if (IS_ERR(hdlcd->state)) {
+ console_lock();
+ drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
+ console_unlock();
drm_kms_helper_poll_enable(drm);
return PTR_ERR(hdlcd->state);
}
@@ -454,8 +461,10 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
return 0;

drm_atomic_helper_resume(drm, hdlcd->state);
+ console_lock();
+ drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
+ console_unlock();
drm_kms_helper_poll_enable(drm);
- pm_runtime_set_active(dev);

return 0;
}
--
2.13.1


2017-06-16 16:59:02

by Noralf Trønnes

[permalink] [raw]
Subject: Re: [PATCH] drm: hdlcd: Update PM code to save/restore console.


Den 16.06.2017 15.53, skrev Liviu Dudau:
> Update the PM code to suspend/resume the fbdev_cma console.
>
> Signed-off-by: Liviu Dudau <[email protected]>
> ---
> drivers/gpu/drm/arm/hdlcd_drv.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> index d3da87fbd85a..89cd408cde6f 100644
> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> @@ -13,6 +13,7 @@
> #include <linux/spinlock.h>
> #include <linux/clk.h>
> #include <linux/component.h>
> +#include <linux/console.h>
> #include <linux/list.h>
> #include <linux/of_graph.h>
> #include <linux/of_reserved_mem.h>
> @@ -435,9 +436,15 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
> return 0;
>
> drm_kms_helper_poll_disable(drm);
> + console_lock();
> + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 1);
> + console_unlock();

You can use drm_fbdev_cma_set_suspend_unlocked() instead, it takes the
lock for you and can speed up resume if the lock is contented.

Noralf.


>
> hdlcd->state = drm_atomic_helper_suspend(drm);
> if (IS_ERR(hdlcd->state)) {
> + console_lock();
> + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
> + console_unlock();
> drm_kms_helper_poll_enable(drm);
> return PTR_ERR(hdlcd->state);
> }
> @@ -454,8 +461,10 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
> return 0;
>
> drm_atomic_helper_resume(drm, hdlcd->state);
> + console_lock();
> + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
> + console_unlock();
> drm_kms_helper_poll_enable(drm);
> - pm_runtime_set_active(dev);
>
> return 0;
> }

2017-06-19 13:17:13

by Liviu Dudau

[permalink] [raw]
Subject: Re: [PATCH] drm: hdlcd: Update PM code to save/restore console.

On Fri, Jun 16, 2017 at 06:58:36PM +0200, Noralf Trønnes wrote:
>
> Den 16.06.2017 15.53, skrev Liviu Dudau:
> > Update the PM code to suspend/resume the fbdev_cma console.
> >
> > Signed-off-by: Liviu Dudau <[email protected]>
> > ---
> > drivers/gpu/drm/arm/hdlcd_drv.c | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> > index d3da87fbd85a..89cd408cde6f 100644
> > --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> > @@ -13,6 +13,7 @@
> > #include <linux/spinlock.h>
> > #include <linux/clk.h>
> > #include <linux/component.h>
> > +#include <linux/console.h>
> > #include <linux/list.h>
> > #include <linux/of_graph.h>
> > #include <linux/of_reserved_mem.h>
> > @@ -435,9 +436,15 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
> > return 0;
> > drm_kms_helper_poll_disable(drm);
> > + console_lock();
> > + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 1);
> > + console_unlock();
>
> You can use drm_fbdev_cma_set_suspend_unlocked() instead, it takes the
> lock for you and can speed up resume if the lock is contented.

Hi Noralf,

Thanks for pointing out the helpful function. As you look to be the author of it,
any reason why the signature of the function doesn't match the drm_fb_helper_ one
being called through? (I'm talking about int vs bool for the state/suspend arguments).

Best regards,
Liviu

>
> Noralf.
>
>
> > hdlcd->state = drm_atomic_helper_suspend(drm);
> > if (IS_ERR(hdlcd->state)) {
> > + console_lock();
> > + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
> > + console_unlock();
> > drm_kms_helper_poll_enable(drm);
> > return PTR_ERR(hdlcd->state);
> > }
> > @@ -454,8 +461,10 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
> > return 0;
> > drm_atomic_helper_resume(drm, hdlcd->state);
> > + console_lock();
> > + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
> > + console_unlock();
> > drm_kms_helper_poll_enable(drm);
> > - pm_runtime_set_active(dev);
> > return 0;
> > }
>

--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯

2017-06-19 13:53:50

by Liviu Dudau

[permalink] [raw]
Subject: [PATCH v2] drm: hdlcd: Update PM code to save/restore console.

Update the PM code to suspend/resume the fbdev_cma console.

Changelog:
- v2: Use drm_fbdev_cma_set_suspend_unlocked() function for taking the
console lock (suggested by Noralf Trønnes <[email protected]>)
- v1: Initial submission [1]


[1] https://lists.freedesktop.org/archives/dri-devel/2017-June/144502.html

Signed-off-by: Liviu Dudau <[email protected]>
---
drivers/gpu/drm/arm/hdlcd_drv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
index d3da87fbd85a..11ecda211f7f 100644
--- a/drivers/gpu/drm/arm/hdlcd_drv.c
+++ b/drivers/gpu/drm/arm/hdlcd_drv.c
@@ -13,6 +13,7 @@
#include <linux/spinlock.h>
#include <linux/clk.h>
#include <linux/component.h>
+#include <linux/console.h>
#include <linux/list.h>
#include <linux/of_graph.h>
#include <linux/of_reserved_mem.h>
@@ -435,9 +436,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
return 0;

drm_kms_helper_poll_disable(drm);
+ drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1);

hdlcd->state = drm_atomic_helper_suspend(drm);
if (IS_ERR(hdlcd->state)) {
+ drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
drm_kms_helper_poll_enable(drm);
return PTR_ERR(hdlcd->state);
}
@@ -454,8 +457,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
return 0;

drm_atomic_helper_resume(drm, hdlcd->state);
+ drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
drm_kms_helper_poll_enable(drm);
- pm_runtime_set_active(dev);

return 0;
}
--
2.13.1

2017-06-19 15:45:27

by Noralf Trønnes

[permalink] [raw]
Subject: Re: [PATCH] drm: hdlcd: Update PM code to save/restore console.


Den 19.06.2017 15.17, skrev Liviu Dudau:
> On Fri, Jun 16, 2017 at 06:58:36PM +0200, Noralf Trønnes wrote:
>> Den 16.06.2017 15.53, skrev Liviu Dudau:
>>> Update the PM code to suspend/resume the fbdev_cma console.
>>>
>>> Signed-off-by: Liviu Dudau <[email protected]>
>>> ---
>>> drivers/gpu/drm/arm/hdlcd_drv.c | 11 ++++++++++-
>>> 1 file changed, 10 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
>>> index d3da87fbd85a..89cd408cde6f 100644
>>> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
>>> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
>>> @@ -13,6 +13,7 @@
>>> #include <linux/spinlock.h>
>>> #include <linux/clk.h>
>>> #include <linux/component.h>
>>> +#include <linux/console.h>
>>> #include <linux/list.h>
>>> #include <linux/of_graph.h>
>>> #include <linux/of_reserved_mem.h>
>>> @@ -435,9 +436,15 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
>>> return 0;
>>> drm_kms_helper_poll_disable(drm);
>>> + console_lock();
>>> + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 1);
>>> + console_unlock();
>> You can use drm_fbdev_cma_set_suspend_unlocked() instead, it takes the
>> lock for you and can speed up resume if the lock is contented.
> Hi Noralf,
>
> Thanks for pointing out the helpful function. As you look to be the author of it,
> any reason why the signature of the function doesn't match the drm_fb_helper_ one
> being called through? (I'm talking about int vs bool for the state/suspend arguments).

I don't remember, but probably to match drm_fbdev_cma_set_suspend()
which uses int. drm_fb_helper_set_suspend*() uses bool, but calls
into fb_set_suspend() which uses int, but as a boolean.

Noralf.
> Best regards,
> Liviu
>
>> Noralf.
>>
>>
>>> hdlcd->state = drm_atomic_helper_suspend(drm);
>>> if (IS_ERR(hdlcd->state)) {
>>> + console_lock();
>>> + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
>>> + console_unlock();
>>> drm_kms_helper_poll_enable(drm);
>>> return PTR_ERR(hdlcd->state);
>>> }
>>> @@ -454,8 +461,10 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
>>> return 0;
>>> drm_atomic_helper_resume(drm, hdlcd->state);
>>> + console_lock();
>>> + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 0);
>>> + console_unlock();
>>> drm_kms_helper_poll_enable(drm);
>>> - pm_runtime_set_active(dev);
>>> return 0;
>>> }

2017-06-19 15:47:13

by Noralf Trønnes

[permalink] [raw]
Subject: Re: [PATCH v2] drm: hdlcd: Update PM code to save/restore console.


Den 19.06.2017 15.53, skrev Liviu Dudau:
> Update the PM code to suspend/resume the fbdev_cma console.
>
> Changelog:
> - v2: Use drm_fbdev_cma_set_suspend_unlocked() function for taking the
> console lock (suggested by Noralf Trønnes <[email protected]>)
> - v1: Initial submission [1]
>
>
> [1] https://lists.freedesktop.org/archives/dri-devel/2017-June/144502.html
>
> Signed-off-by: Liviu Dudau <[email protected]>
> ---
> drivers/gpu/drm/arm/hdlcd_drv.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> index d3da87fbd85a..11ecda211f7f 100644
> --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> @@ -13,6 +13,7 @@
> #include <linux/spinlock.h>
> #include <linux/clk.h>
> #include <linux/component.h>
> +#include <linux/console.h>

This include isn't necessary now.

Noralf.

> #include <linux/list.h>
> #include <linux/of_graph.h>
> #include <linux/of_reserved_mem.h>
> @@ -435,9 +436,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
> return 0;
>
> drm_kms_helper_poll_disable(drm);
> + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1);
>
> hdlcd->state = drm_atomic_helper_suspend(drm);
> if (IS_ERR(hdlcd->state)) {
> + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
> drm_kms_helper_poll_enable(drm);
> return PTR_ERR(hdlcd->state);
> }
> @@ -454,8 +457,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
> return 0;
>
> drm_atomic_helper_resume(drm, hdlcd->state);
> + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
> drm_kms_helper_poll_enable(drm);
> - pm_runtime_set_active(dev);
>
> return 0;
> }

2017-06-19 16:16:55

by Liviu Dudau

[permalink] [raw]
Subject: Re: [PATCH v2] drm: hdlcd: Update PM code to save/restore console.

On Mon, Jun 19, 2017 at 05:47:07PM +0200, Noralf Trønnes wrote:
>
> Den 19.06.2017 15.53, skrev Liviu Dudau:
> > Update the PM code to suspend/resume the fbdev_cma console.
> >
> > Changelog:
> > - v2: Use drm_fbdev_cma_set_suspend_unlocked() function for taking the
> > console lock (suggested by Noralf Trønnes <[email protected]>)
> > - v1: Initial submission [1]
> >
> >
> > [1] https://lists.freedesktop.org/archives/dri-devel/2017-June/144502.html
> >
> > Signed-off-by: Liviu Dudau <[email protected]>
> > ---
> > drivers/gpu/drm/arm/hdlcd_drv.c | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> > index d3da87fbd85a..11ecda211f7f 100644
> > --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> > @@ -13,6 +13,7 @@
> > #include <linux/spinlock.h>
> > #include <linux/clk.h>
> > #include <linux/component.h>
> > +#include <linux/console.h>
>
> This include isn't necessary now.

Ah, thanks for catching this!

Will respin. Also, Brian pointed out that while the pm_runtime_set_active() call being
removed is the right thing to do, it is not necessarily done in the right patch, so I
need to figure out if I need another patch that does more tweaks to the pm_runtime.

Best regards,
Liviu

>
> Noralf.
>
> > #include <linux/list.h>
> > #include <linux/of_graph.h>
> > #include <linux/of_reserved_mem.h>
> > @@ -435,9 +436,11 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
> > return 0;
> > drm_kms_helper_poll_disable(drm);
> > + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 1);
> > hdlcd->state = drm_atomic_helper_suspend(drm);
> > if (IS_ERR(hdlcd->state)) {
> > + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
> > drm_kms_helper_poll_enable(drm);
> > return PTR_ERR(hdlcd->state);
> > }
> > @@ -454,8 +457,8 @@ static int __maybe_unused hdlcd_pm_resume(struct device *dev)
> > return 0;
> > drm_atomic_helper_resume(drm, hdlcd->state);
> > + drm_fbdev_cma_set_suspend_unlocked(hdlcd->fbdev, 0);
> > drm_kms_helper_poll_enable(drm);
> > - pm_runtime_set_active(dev);
> > return 0;
> > }
>

--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯

2017-06-20 09:37:43

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH] drm: hdlcd: Update PM code to save/restore console.

On Mon, Jun 19, 2017 at 05:45:21PM +0200, Noralf Tr?nnes wrote:
>
> Den 19.06.2017 15.17, skrev Liviu Dudau:
> > On Fri, Jun 16, 2017 at 06:58:36PM +0200, Noralf Tr?nnes wrote:
> > > Den 16.06.2017 15.53, skrev Liviu Dudau:
> > > > Update the PM code to suspend/resume the fbdev_cma console.
> > > >
> > > > Signed-off-by: Liviu Dudau <[email protected]>
> > > > ---
> > > > drivers/gpu/drm/arm/hdlcd_drv.c | 11 ++++++++++-
> > > > 1 file changed, 10 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c
> > > > index d3da87fbd85a..89cd408cde6f 100644
> > > > --- a/drivers/gpu/drm/arm/hdlcd_drv.c
> > > > +++ b/drivers/gpu/drm/arm/hdlcd_drv.c
> > > > @@ -13,6 +13,7 @@
> > > > #include <linux/spinlock.h>
> > > > #include <linux/clk.h>
> > > > #include <linux/component.h>
> > > > +#include <linux/console.h>
> > > > #include <linux/list.h>
> > > > #include <linux/of_graph.h>
> > > > #include <linux/of_reserved_mem.h>
> > > > @@ -435,9 +436,15 @@ static int __maybe_unused hdlcd_pm_suspend(struct device *dev)
> > > > return 0;
> > > > drm_kms_helper_poll_disable(drm);
> > > > + console_lock();
> > > > + drm_fbdev_cma_set_suspend(hdlcd->fbdev, 1);
> > > > + console_unlock();
> > > You can use drm_fbdev_cma_set_suspend_unlocked() instead, it takes the
> > > lock for you and can speed up resume if the lock is contented.
> > Hi Noralf,
> >
> > Thanks for pointing out the helpful function. As you look to be the author of it,
> > any reason why the signature of the function doesn't match the drm_fb_helper_ one
> > being called through? (I'm talking about int vs bool for the state/suspend arguments).
>
> I don't remember, but probably to match drm_fbdev_cma_set_suspend()
> which uses int. drm_fb_helper_set_suspend*() uses bool, but calls
> into fb_set_suspend() which uses int, but as a boolean.

I'd be happy to apply a patch which changes them all to bool ...

Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2017-06-20 10:23:35

by Liviu Dudau

[permalink] [raw]
Subject: [PATCH] drm: Convert CMA fbdev console suspend helpers to use bool

drm_fbdev_cma_set_suspend{,_unlocked} use an integer parameter
to describe whether the intended state is a suspend or a resume.
It then passes the value to drm_fb_helper_set_suspend{,_unlocked}
which uses a boolean. Switch to using bool everywhere.

Signed-off-by: Liviu Dudau <[email protected]>
---
drivers/gpu/drm/drm_fb_cma_helper.c | 4 ++--
include/drm/drm_fb_cma_helper.h | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
index 53f9bdf470d7..ade319d10e70 100644
--- a/drivers/gpu/drm/drm_fb_cma_helper.c
+++ b/drivers/gpu/drm/drm_fb_cma_helper.c
@@ -640,7 +640,7 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
* Calls drm_fb_helper_set_suspend, which is a wrapper around
* fb_set_suspend implemented by fbdev core.
*/
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state)
+void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state)
{
if (fbdev_cma)
drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
@@ -657,7 +657,7 @@ EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);
* fb_set_suspend implemented by fbdev core.
*/
void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
- int state)
+ bool state)
{
if (fbdev_cma)
drm_fb_helper_set_suspend_unlocked(&fbdev_cma->fb_helper,
diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h
index 199a63f48659..a323781afc3f 100644
--- a/include/drm/drm_fb_cma_helper.h
+++ b/include/drm/drm_fb_cma_helper.h
@@ -24,9 +24,9 @@ void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);

void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
+void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
- int state);
+ bool state);

void drm_fb_cma_destroy(struct drm_framebuffer *fb);
int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
--
2.13.1

2017-06-20 14:23:39

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH] drm: Convert CMA fbdev console suspend helpers to use bool

On Tue, Jun 20, 2017 at 11:23:20AM +0100, Liviu Dudau wrote:
> drm_fbdev_cma_set_suspend{,_unlocked} use an integer parameter
> to describe whether the intended state is a suspend or a resume.
> It then passes the value to drm_fb_helper_set_suspend{,_unlocked}
> which uses a boolean. Switch to using bool everywhere.
>
> Signed-off-by: Liviu Dudau <[email protected]>

Sweet, patch applied, thanks.
-Daniel

> ---
> drivers/gpu/drm/drm_fb_cma_helper.c | 4 ++--
> include/drm/drm_fb_cma_helper.h | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
> index 53f9bdf470d7..ade319d10e70 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -640,7 +640,7 @@ EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
> * Calls drm_fb_helper_set_suspend, which is a wrapper around
> * fb_set_suspend implemented by fbdev core.
> */
> -void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state)
> +void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state)
> {
> if (fbdev_cma)
> drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
> @@ -657,7 +657,7 @@ EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);
> * fb_set_suspend implemented by fbdev core.
> */
> void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
> - int state)
> + bool state)
> {
> if (fbdev_cma)
> drm_fb_helper_set_suspend_unlocked(&fbdev_cma->fb_helper,
> diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h
> index 199a63f48659..a323781afc3f 100644
> --- a/include/drm/drm_fb_cma_helper.h
> +++ b/include/drm/drm_fb_cma_helper.h
> @@ -24,9 +24,9 @@ void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
>
> void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
> void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
> -void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
> +void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
> void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
> - int state);
> + bool state);
>
> void drm_fb_cma_destroy(struct drm_framebuffer *fb);
> int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
> --
> 2.13.1
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch