Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670549

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

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH] drm: hdlcd: Update PM code to save/restore console.
Date Tue, 20 Jun 2017 11:40:03 +0200
Message-ID <tUnNF-6PZ-47@gated-at.bofh.it> (permalink)
References <tSZX4-Lj-13@gated-at.bofh.it> <tT2Lf-2HQ-9@gated-at.bofh.it> <tU4KZ-379-7@gated-at.bofh.it> <tU769-4xl-3@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=eX8NXUjQ+/b09vcltOO0IWw/2450xXsXo7G2GOrlHH0=; b=SL4E3gsipHCj7rmsk61j2ugs0Ehb1QX+s1bglbjxnflkML2RWwBpj8YtUQuKDVTKaQ TlN/B/FePSGZ+e9PEQH4euWKoOw28BHAaXBcHKRcMyJxScY5FupwpyjpslB8iBcAQteD PUvxjaQ1fA3AmCtOqY4g6xKXrPzFAymkfExW8=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=eX8NXUjQ+/b09vcltOO0IWw/2450xXsXo7G2GOrlHH0=; b=EIw7TUOBL5PWQ3KUWZlCogwcOkeHDeSkDuV9dnu7rOZnuMD1cZHmFTONSW/p6XxBSO zo/nFOF0VmprNMKJqOtVJx75Rc9gbIkeqcPMM6I8+OwglKcLk+sZMJi79ayx+x4ydR/w mHHy1gdL5xec5wImuqMbfYQgaaV9RTKXb3FDJGF5tRzLMmwIG/RaJCn7wZuQzcueYFy0 4hrb6Ne/ZLPfw3Nvqbj4o7kZuKFKnUX87ImjAW0K9PVkyXkgDsXuq+2M0marVxsjNo1a 1MlSyyQ5seSQCzb6Zyv25+bPRAO1KHxBN99ughCOEKCnZphwH93NHH52iZHXmguE5JmJ pbcg==
X-Gm-Message-State AKS2vOwZwBt4T6kNFaqtbibkIZdyIeuoty3ecw+cwIsg6Qx+tiiYV5Jm nA8xKBtgJCqvy+HI6q8=
X-Received by 10.80.182.135 with SMTP id d7mr20323078ede.56.1497951452882; Tue, 20 Jun 2017 02:37:32 -0700 (PDT)
Mail-Followup-To Noralf Trønnes <noralf@tronnes.org>, 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>
MIME-Version 1.0
Content-Type text/plain; charset=iso-8859-1
Content-Disposition inline
Content-Transfer-Encoding 8bit
X-Operating-System Linux phenom 4.9.0-2-amd64
User-Agent NeoMutt/20170306 (1.8.0)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 49
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Tue, 20 Jun 2017 11:37:29 +0200
X-Original-Message-ID <20170620093729.4wldbtug4vdflcll@phenom.ffwll.local>
X-Original-References <20170616135333.27796-1-Liviu.Dudau@arm.com> <ba373315-a1b9-0d2d-4949-bd84ede94a4d@tronnes.org> <20170619131709.GR1322@e110455-lin.cambridge.arm.com> <926a4247-a62c-a64c-2349-52f63b1da2a0@tronnes.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1670549

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] drm: hdlcd: Update PM code to save/restore console. Daniel Vetter <daniel@ffwll.ch> - 2017-06-20 11:40 +0200
  [PATCH] drm: Convert CMA fbdev console suspend helpers to use bool Liviu Dudau <Liviu.Dudau@arm.com> - 2017-06-20 12:30 +0200
    Re: [PATCH] drm: Convert CMA fbdev console suspend helpers to use  bool Daniel Vetter <daniel@ffwll.ch> - 2017-06-20 16:30 +0200

csiph-web