mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>,
	Mali DP Maintainers <malidp@foss.arm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	DRI devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm: hdlcd: Update PM code to save/restore console.
Date: Tue, 20 Jun 2017 11:37:29 +0200	[thread overview]
Message-ID: <20170620093729.4wldbtug4vdflcll@phenom.ffwll.local> (raw)
In-Reply-To: <926a4247-a62c-a64c-2349-52f63b1da2a0@tronnes.org>

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 <Liviu.Dudau@arm.com>
> > > > ---
> > > >    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

  reply	other threads:[~2017-06-20  9:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-16 13:53 Liviu Dudau
2017-06-16 16:58 ` Noralf Trønnes
2017-06-19 13:17   ` Liviu Dudau
2017-06-19 15:45     ` Noralf Trønnes
2017-06-20  9:37       ` Daniel Vetter [this message]
2017-06-20 10:23         ` [PATCH] drm: Convert CMA fbdev console suspend helpers to use bool Liviu Dudau
2017-06-20 14:23           ` Daniel Vetter
2017-06-19 13:53   ` [PATCH v2] drm: hdlcd: Update PM code to save/restore console Liviu Dudau
2017-06-19 15:47     ` Noralf Trønnes
2017-06-19 16:16       ` Liviu Dudau

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=20170620093729.4wldbtug4vdflcll@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Liviu.Dudau@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=malidp@foss.arm.com \
    --cc=noralf@tronnes.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

all inboxes | Powered by JetHome®