* [PATCH] drm/fb-helper: Make docs for fb_set_suspend wrappers consistent
@ 2016-08-23 15:27 Daniel Vetter
2016-08-23 18:53 ` Noralf Trønnes
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2016-08-23 15:27 UTC (permalink / raw)
To: DRI Development; +Cc: Daniel Vetter, Daniel Vetter
I figured I might as well go ocd and make them booleans and rename the
locked version too.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Noralf Trønnes <noralf@tronnes.org>
Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()")
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
drivers/gpu/drm/drm_fb_helper.c | 8 ++++----
include/drm/drm_fb_helper.h | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 10585c462d85..e1af1d08511b 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1035,13 +1035,13 @@ EXPORT_SYMBOL(drm_fb_helper_cfb_imageblit);
/**
* drm_fb_helper_set_suspend - wrapper around fb_set_suspend
* @fb_helper: driver-allocated fbdev helper
- * @state: desired state, zero to resume, non-zero to suspend
+ * @suspend: whether to suspend or resume
*
* A wrapper around fb_set_suspend implemented by fbdev core.
* Use drm_fb_helper_set_suspend_unlocked() if you don't need to take
* the lock yourself
*/
-void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state)
+void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend)
{
if (fb_helper && fb_helper->fbdev)
fb_set_suspend(fb_helper->fbdev, state);
@@ -1052,7 +1052,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
* drm_fb_helper_set_suspend_unlocked - wrapper around fb_set_suspend that also
* takes the console lock
* @fb_helper: driver-allocated fbdev helper
- * @state: desired state, zero to resume, non-zero to suspend
+ * @suspend: whether to suspend or resume
*
* A wrapper around fb_set_suspend() that takes the console lock. If the lock
* isn't available on resume, a worker is tasked with waiting for the lock
@@ -1065,7 +1065,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
* Use drm_fb_helper_set_suspend() if you need to take the lock yourself.
*/
void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
- int suspend)
+ bool suspend)
{
if (!fb_helper || !fb_helper->fbdev)
return;
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 0c6e53d9ce68..6c812e3c8bfc 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -265,9 +265,9 @@ void drm_fb_helper_cfb_copyarea(struct fb_info *info,
void drm_fb_helper_cfb_imageblit(struct fb_info *info,
const struct fb_image *image);
-void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state);
+void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend);
void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
- int suspend);
+ bool suspend);
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
@@ -421,7 +421,7 @@ static inline void drm_fb_helper_cfb_imageblit(struct fb_info *info,
}
static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper,
- int state)
+ bool suspend)
{
}
--
2.9.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/fb-helper: Make docs for fb_set_suspend wrappers consistent
2016-08-23 15:27 [PATCH] drm/fb-helper: Make docs for fb_set_suspend wrappers consistent Daniel Vetter
@ 2016-08-23 18:53 ` Noralf Trønnes
2016-08-23 19:13 ` Daniel Vetter
0 siblings, 1 reply; 3+ messages in thread
From: Noralf Trønnes @ 2016-08-23 18:53 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, DRI Development
Den 23.08.2016 17:27, skrev Daniel Vetter:
> I figured I might as well go ocd and make them booleans and rename the
> locked version too.
>
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: Noralf Trønnes <noralf@tronnes.org>
> Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()")
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> drivers/gpu/drm/drm_fb_helper.c | 8 ++++----
> include/drm/drm_fb_helper.h | 6 +++---
> 2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 10585c462d85..e1af1d08511b 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1035,13 +1035,13 @@ EXPORT_SYMBOL(drm_fb_helper_cfb_imageblit);
> /**
> * drm_fb_helper_set_suspend - wrapper around fb_set_suspend
> * @fb_helper: driver-allocated fbdev helper
> - * @state: desired state, zero to resume, non-zero to suspend
> + * @suspend: whether to suspend or resume
> *
> * A wrapper around fb_set_suspend implemented by fbdev core.
> * Use drm_fb_helper_set_suspend_unlocked() if you don't need to take
> * the lock yourself
> */
> -void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state)
> +void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend)
> {
> if (fb_helper && fb_helper->fbdev)
> fb_set_suspend(fb_helper->fbdev, state);
Forgot to change state to suspend here.
> @@ -1052,7 +1052,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
> * drm_fb_helper_set_suspend_unlocked - wrapper around fb_set_suspend that also
> * takes the console lock
> * @fb_helper: driver-allocated fbdev helper
> - * @state: desired state, zero to resume, non-zero to suspend
> + * @suspend: whether to suspend or resume
> *
> * A wrapper around fb_set_suspend() that takes the console lock. If the lock
> * isn't available on resume, a worker is tasked with waiting for the lock
> @@ -1065,7 +1065,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
> * Use drm_fb_helper_set_suspend() if you need to take the lock yourself.
> */
> void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
> - int suspend)
> + bool suspend)
> {
> if (!fb_helper || !fb_helper->fbdev)
> return;
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 0c6e53d9ce68..6c812e3c8bfc 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -265,9 +265,9 @@ void drm_fb_helper_cfb_copyarea(struct fb_info *info,
> void drm_fb_helper_cfb_imageblit(struct fb_info *info,
> const struct fb_image *image);
>
> -void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state);
> +void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend);
> void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
> - int suspend);
> + bool suspend);
>
> int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
>
> @@ -421,7 +421,7 @@ static inline void drm_fb_helper_cfb_imageblit(struct fb_info *info,
> }
>
> static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper,
> - int state)
> + bool suspend)
> {
> }
>
The _unlocked version also needs the bool change here in the #else section.
With that:
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Thanks for fixing up my docs omission.
Noralf.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/fb-helper: Make docs for fb_set_suspend wrappers consistent
2016-08-23 18:53 ` Noralf Trønnes
@ 2016-08-23 19:13 ` Daniel Vetter
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2016-08-23 19:13 UTC (permalink / raw)
To: Noralf Trønnes; +Cc: Daniel Vetter, DRI Development, Daniel Vetter
On Tue, Aug 23, 2016 at 08:53:05PM +0200, Noralf Trønnes wrote:
>
> Den 23.08.2016 17:27, skrev Daniel Vetter:
> > I figured I might as well go ocd and make them booleans and rename the
> > locked version too.
> >
> > Reported-by: kbuild test robot <fengguang.wu@intel.com>
> > Cc: Noralf Trønnes <noralf@tronnes.org>
> > Fixes: cfe63423d9be ("drm/fb-helper: Add drm_fb_helper_set_suspend_unlocked()")
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> > drivers/gpu/drm/drm_fb_helper.c | 8 ++++----
> > include/drm/drm_fb_helper.h | 6 +++---
> > 2 files changed, 7 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > index 10585c462d85..e1af1d08511b 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -1035,13 +1035,13 @@ EXPORT_SYMBOL(drm_fb_helper_cfb_imageblit);
> > /**
> > * drm_fb_helper_set_suspend - wrapper around fb_set_suspend
> > * @fb_helper: driver-allocated fbdev helper
> > - * @state: desired state, zero to resume, non-zero to suspend
> > + * @suspend: whether to suspend or resume
> > *
> > * A wrapper around fb_set_suspend implemented by fbdev core.
> > * Use drm_fb_helper_set_suspend_unlocked() if you don't need to take
> > * the lock yourself
> > */
> > -void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state)
> > +void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend)
> > {
> > if (fb_helper && fb_helper->fbdev)
> > fb_set_suspend(fb_helper->fbdev, state);
>
> Forgot to change state to suspend here.
Argh, silly me forgot to compile-check both variants.
>
> > @@ -1052,7 +1052,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
> > * drm_fb_helper_set_suspend_unlocked - wrapper around fb_set_suspend that also
> > * takes the console lock
> > * @fb_helper: driver-allocated fbdev helper
> > - * @state: desired state, zero to resume, non-zero to suspend
> > + * @suspend: whether to suspend or resume
> > *
> > * A wrapper around fb_set_suspend() that takes the console lock. If the lock
> > * isn't available on resume, a worker is tasked with waiting for the lock
> > @@ -1065,7 +1065,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
> > * Use drm_fb_helper_set_suspend() if you need to take the lock yourself.
> > */
> > void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
> > - int suspend)
> > + bool suspend)
> > {
> > if (!fb_helper || !fb_helper->fbdev)
> > return;
> > diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> > index 0c6e53d9ce68..6c812e3c8bfc 100644
> > --- a/include/drm/drm_fb_helper.h
> > +++ b/include/drm/drm_fb_helper.h
> > @@ -265,9 +265,9 @@ void drm_fb_helper_cfb_copyarea(struct fb_info *info,
> > void drm_fb_helper_cfb_imageblit(struct fb_info *info,
> > const struct fb_image *image);
> > -void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, int state);
> > +void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper, bool suspend);
> > void drm_fb_helper_set_suspend_unlocked(struct drm_fb_helper *fb_helper,
> > - int suspend);
> > + bool suspend);
> > int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
> > @@ -421,7 +421,7 @@ static inline void drm_fb_helper_cfb_imageblit(struct fb_info *info,
> > }
> > static inline void drm_fb_helper_set_suspend(struct drm_fb_helper *fb_helper,
> > - int state)
> > + bool suspend)
> > {
> > }
>
> The _unlocked version also needs the bool change here in the #else section.
>
> With that:
> Acked-by: Noralf Trønnes <noralf@tronnes.org>
Both fixed and applied, thanks for the review.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-23 19:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 15:27 [PATCH] drm/fb-helper: Make docs for fb_set_suspend wrappers consistent Daniel Vetter
2016-08-23 18:53 ` Noralf Trønnes
2016-08-23 19:13 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox