LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspend-vt-switch.patch added to -mm tree
       [not found] <200803120527.m2C5RmWl011967@imap1.linux-foundation.org>
@ 2008-03-12  8:51 ` Pavel Machek
  2008-03-12 14:45   ` Jordan Crouse
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2008-03-12  8:51 UTC (permalink / raw)
  To: akpm, kernel list, Linux-pm mailing list
  Cc: mm-commits, dilinger, adaplas, dilinger, jordan.crouse, rjw

Hi!

> Subject: PM/gxfb: add hook to PM console layer that allows disabling of suspend VT switch
> From: Andres Salomon <dilinger@queued.net>
> 
> Prior to suspend, we allocate and switch to a new VT; after suspend, we switch
> back to the original VT.  This can be slow, and is completely unnecessary if
> the framebuffer we're using can restore video properly.
> 
> This adds a hook that allows drivers to select whether or not to do this vt
> switch, and changes the gxfb driver to call this hook.  It also adds a module
> param to gxfb to allow controlling of the vt switch (defaulting to no switch).
> 
> (Note: I'm not convinced that console_sem is the best way to protect this, but
> we should probably have some form of locking..)

I guess this is okay for now, but we probably want to make it more
elaborate in future.

Console switch is there to make sure kernel (not X) owns the graphical
hardware.

That is unneccessary for gxfb since X never owns graphics hardware,
good. (I do not see why it is optional, then. Do you really want to
see tty1?)

Now, question is what happens with two graphics cards, one of them
driven by X. Fortunately that is uncommon.

Also, it would be nice to make the logic the other way around. Move vt
switching to the drivers that need it because X can be expected to own
the hardware.

							Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspend-vt-switch.patch added to -mm tree
  2008-03-12  8:51 ` + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspend-vt-switch.patch added to -mm tree Pavel Machek
@ 2008-03-12 14:45   ` Jordan Crouse
  2008-03-13  7:43     ` + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspen d-vt-switch.patch " Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Jordan Crouse @ 2008-03-12 14:45 UTC (permalink / raw)
  To: Pavel Machek
  Cc: akpm, kernel list, Linux-pm mailing list, mm-commits, dilinger,
	adaplas, dilinger, rjw

On 12/03/08 09:51 +0100, Pavel Machek wrote:
> Hi!
> 
> > Subject: PM/gxfb: add hook to PM console layer that allows disabling of suspend VT switch
> > From: Andres Salomon <dilinger@queued.net>
> > 
> > Prior to suspend, we allocate and switch to a new VT; after suspend, we switch
> > back to the original VT.  This can be slow, and is completely unnecessary if
> > the framebuffer we're using can restore video properly.
> > 
> > This adds a hook that allows drivers to select whether or not to do this vt
> > switch, and changes the gxfb driver to call this hook.  It also adds a module
> > param to gxfb to allow controlling of the vt switch (defaulting to no switch).
> > 
> > (Note: I'm not convinced that console_sem is the best way to protect this, but
> > we should probably have some form of locking..)
> 
> I guess this is okay for now, but we probably want to make it more
> elaborate in future.
> 
> Console switch is there to make sure kernel (not X) owns the graphical
> hardware.
> 
> That is unneccessary for gxfb since X never owns graphics hardware,
> good. (I do not see why it is optional, then. Do you really want to
> see tty1?)

Its the dream for the lxfb and gxfb to own the graphics hardware
completely (at least, thats what Jim Gettys keeps pounding in to my
brain), but we're not quite there yet.  What we have here are 
framebuffer drivers that are intelligent enough to save and restore the
state of the graphics engine, which is still a lot better then most other
drivers.

> Now, question is what happens with two graphics cards, one of them
> driven by X. Fortunately that is uncommon.

We would be screwed.  But since the Geode has built in graphics logic,
it doesn't make much sense to use an external card, so we'll mostly
avoid this problem.  But even if it happens, we'll have the VT switch
available in a pinch.

> Also, it would be nice to make the logic the other way around. Move vt
> switching to the drivers that need it because X can be expected to own
> the hardware.

Conservation of energy.  Its easier to make 3 or 4 drivers opt out of 
VT switching, rather then hacking 64 other drivers to opt in.  Hopefully
more people will fix their drivers and make this statement false.. :)

Jordan

-- 
Jordan Crouse
Systems Software Development Engineer 
Advanced Micro Devices, Inc.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspen d-vt-switch.patch added to -mm tree
  2008-03-12 14:45   ` Jordan Crouse
@ 2008-03-13  7:43     ` Pavel Machek
  2008-03-13 14:57       ` Andres Salomon
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Machek @ 2008-03-13  7:43 UTC (permalink / raw)
  To: Jordan Crouse
  Cc: akpm, kernel list, Linux-pm mailing list, mm-commits, dilinger,
	adaplas, dilinger, rjw


> > > (Note: I'm not convinced that console_sem is the best way to protect this, but
> > > we should probably have some form of locking..)
> > 
> > I guess this is okay for now, but we probably want to make it more
> > elaborate in future.
> > 
> > Console switch is there to make sure kernel (not X) owns the graphical
> > hardware.
> > 
> > That is unneccessary for gxfb since X never owns graphics hardware,
> > good. (I do not see why it is optional, then. Do you really want to
> > see tty1?)
> 
> Its the dream for the lxfb and gxfb to own the graphics hardware
> completely (at least, thats what Jim Gettys keeps pounding in to my
> brain), but we're not quite there yet.  What we have here are 
> framebuffer drivers that are intelligent enough to save and restore the
> state of the graphics engine, which is still a lot better then most other
> drivers.

Ok.

> > Now, question is what happens with two graphics cards, one of them
> > driven by X. Fortunately that is uncommon.
> 
> We would be screwed.  But since the Geode has built in graphics logic,
> it doesn't make much sense to use an external card, so we'll mostly
> avoid this problem.  But even if it happens, we'll have the VT switch
> available in a pinch.
> 
> > Also, it would be nice to make the logic the other way around. Move vt
> > switching to the drivers that need it because X can be expected to own
> > the hardware.
> 
> Conservation of energy.  Its easier to make 3 or 4 drivers opt out of 

Nice euphemism. You did quick hack instead of proper solution, and
someone will have to clean it up sooner or later...
								Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspen d-vt-switch.patch added to -mm tree
  2008-03-13  7:43     ` + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspen d-vt-switch.patch " Pavel Machek
@ 2008-03-13 14:57       ` Andres Salomon
  0 siblings, 0 replies; 4+ messages in thread
From: Andres Salomon @ 2008-03-13 14:57 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Jordan Crouse, akpm, kernel list, Linux-pm mailing list,
	linux-fbdev-devel, adaplas, mm-commits, rjw

On Thu, 13 Mar 2008 08:43:32 +0100
Pavel Machek <pavel@ucw.cz> wrote:

[...]
> > 
> > > Also, it would be nice to make the logic the other way around. Move vt
> > > switching to the drivers that need it because X can be expected to own
> > > the hardware.
> > 
> > Conservation of energy.  Its easier to make 3 or 4 drivers opt out of 
> 
> Nice euphemism. You did quick hack instead of proper solution, and
> someone will have to clean it up sooner or later...
> 								Pavel
> 

And I wouldn't be willing to do anything further without approval
from the fbdevel folks.  No one's stopping you from writing a patch
if you feel so strongly about it, though.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-03-13 14:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200803120527.m2C5RmWl011967@imap1.linux-foundation.org>
2008-03-12  8:51 ` + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspend-vt-switch.patch added to -mm tree Pavel Machek
2008-03-12 14:45   ` Jordan Crouse
2008-03-13  7:43     ` + pm-gxfb-add-hook-to-pm-console-layer-that-allows-disabling-of-suspen d-vt-switch.patch " Pavel Machek
2008-03-13 14:57       ` Andres Salomon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).