From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org,
Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] PM: make VT switching to the suspend console optional v2
Date: Sun, 3 Feb 2013 09:56:09 +0100 [thread overview]
Message-ID: <20130203095609.31867279@jbarnes-t420> (raw)
In-Reply-To: <2424360.s1UolC1PMO@vostro.rjw.lan>
On Sat, 02 Feb 2013 21:50:35 +0100
"Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> > > + * Drivers can indicate support for switchless suspend/resume, which can
> > > + * save time and flicker, by using this routine and passing 'false' as
> > > + * the argument. If any loaded driver needs VT switching, or the
> > > + * no_console_suspend argument has been passed on the command line, VT
> > > + * switches will occur.
> > > + */
> >
> > It seems to me that we'll need a separate counter for the number of registered
> > drivers and do the switch if that number is equal to the number of drivers that
> > have passed false to this thing.
> >
> > In which case we can simplify this slightly and introduce
> > pm_vt_swtich_not_required(void)
>
> Sorry, that won't be sufficient. Rather something like pm_vt_switch_get()
> (indicating "I'll do the switch, thanks") and pm_vt_switch_put() (indicating
> "now you need to do the switch yourself").
I thought of both of your approaches before posting this one, but each
have other problems. And I found a bug in mine last night.
So I think I need a separate count of drivers that need the switch, and
ones that don't. Then if either no driver has registered or if the
need_switch count is nonzero, we'll do the switch. Otherwise, if the
dont_need_switch is nonzero, we can avoid the switch. I think that'll
handle all the cases I outlined.
My code as posted will fail if one driver needs a switch but then two
switch free drivers register.
Jesse
next prev parent reply other threads:[~2013-02-03 11:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 15:34 VT switchless suspend/resume Jesse Barnes
2013-02-02 15:34 ` [PATCH] PM: make VT switching to the suspend console optional v2 Jesse Barnes
2013-02-02 19:39 ` Rafael J. Wysocki
2013-02-02 20:50 ` Rafael J. Wysocki
2013-02-03 8:56 ` Jesse Barnes [this message]
2013-02-03 12:59 ` Rafael J. Wysocki
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=20130203095609.31867279@jbarnes-t420 \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@sisk.pl \
/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®