linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Zielinski <grim@undead.cc>
To: Alex Stewart <alex@foogod.com>
Cc: benh@kernel.crashing.org, jsimmons@infradead.org,
	geert@linux-m68k.org, linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] neofb patches
Date: Wed, 28 Apr 2004 00:36:10 -0400	[thread overview]
Message-ID: <408F34BA.2090105@undead.cc> (raw)
In-Reply-To: <52520.64.139.3.221.1083122220.squirrel@www.foogod.com>

Alex Stewart wrote:

>I like the idea of having graphical apps automatically open on the same
>framebuffer device as the console they were started from, but I agree with
>Ben, I think this approach is way more complicated than it needs to be.
>
>  
>
I don't believe it will be complicated but I'll find out after I try to 
implement it.  I just like the fact the the kernel would be able to keep 
applications from doing silly things.  Hey, if it turns out to be an 
ugly patch I'll be the first to delete it.  Who knows, parts of it might 
be useful.  And it's a great way for me to learn more of the innards of 
the vt/fb systems.

>Firstly, all of the graphical apps you're describing should be VT-aware. 
>If they aren't, you shouldn't be using them on anything other than
>dedicated framebuffers anyway, really.  It's not hard to make an app work
>with VTs and it really is the correct way to do things for anything that
>is likely to be run in a VT-console environment.
>  
>
Hmm, I'll have to do some hunting.  What is the easy way to find out if 
you're on a physical console and what vc num it is in user space?  I can 
do it easily in kernel space...

>With this issue solved, all that needs to be done is to make it so that
>apps which open up a new VT, automatically get it on the same framebuffer
>as the currently active console (or better yet, the console associated
>with the app) is on (which is really the most intuitive thing anyway, and
>should probably be done on general principle).  Problem solved.
>
>  
>
That might be tricky as you'd probably have to change the con2fb map to 
remap the unused console to the right fb.

>You really don't need all the complex machinations of a magic /dev/fb
>device to achieve this.  If the rest of the system is designed well the
>right behavior should be automatic without this extra effort.
>
>  
>
Unfortunately it's not automatic.  The programmer has to jump through a 
few hoops that it would take a couple of dozen lines of code in kernel 
space to do.   This is just off the top of my head so it's probably not 
entirely correct:

if( fbidx == 255 ) {
    if( current->tty->driver != console_driver )    
       return -ENODEV;
    fbidx  = con2fb_map[ current->tty->index ];
}

Add another dozen lines to do the the KD_TEXT/KD_GRAPHICS and that's 90% 
of the functionality of the /dev/fb device.

Like I said, it's just a small experiment on my part.  Maybe someone 
will find it useful or maybe they'll get some other ideas from it.  The 
only reason I haven't tried it yet is I have to hunt down where my PCI 
video card disappeared to so I can try it on a dual fb setup.

John




-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

  parent reply	other threads:[~2004-04-28  4:36 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-21  1:14 [PATCH] neofb patches Alex Stewart
2004-04-21 17:47 ` James Simmons
2004-04-21 19:10   ` Antonino A. Daplas
2004-04-22  8:09     ` Geert Uytterhoeven
2004-04-23 23:27       ` James Simmons
2004-04-23 16:53     ` Alex Stewart
2004-04-23 20:03       ` James Simmons
2004-04-23 18:35     ` James Simmons
2004-04-23 19:54       ` James Simmons
2004-04-22  3:18   ` Alex Stewart
2004-04-22 20:57     ` James Simmons
2004-04-23  4:03       ` Alex Stewart
2004-04-23  6:43         ` Alex Stewart
2004-04-23 23:00           ` James Simmons
2004-04-24  3:15             ` [Linux-fbdev-devel] " Randy.Dunlap
2004-04-24  7:08               ` Alex Stewart
2004-04-25  3:10                 ` [Linux-fbdev-devel] " James Simmons
2004-04-25  3:09               ` James Simmons
2004-04-24 17:29             ` Alex Stewart
2004-04-25  0:55               ` James Simmons
2004-04-26 18:12                 ` Alex Stewart
2004-04-27  0:11                   ` James Simmons
2004-04-27  1:15                     ` Alex Stewart
2004-04-27  8:49                       ` Geert Uytterhoeven
2004-04-27 10:12                         ` Benjamin Herrenschmidt
2004-04-27 20:25                           ` James Simmons
2004-04-27 22:48                             ` John Zielinski
2004-04-27 23:10                               ` Benjamin Herrenschmidt
2004-04-27 23:21                                 ` James Simmons
2004-04-27 23:25                                   ` Benjamin Herrenschmidt
2004-04-27 23:46                                   ` John Zielinski
2004-04-27 23:50                                     ` Benjamin Herrenschmidt
2004-04-28  0:38                                       ` John Zielinski
2004-04-28  0:41                                         ` Benjamin Herrenschmidt
2004-04-28  1:39                                           ` John Zielinski
2004-04-28  3:17                                             ` Alex Stewart
2004-04-28  3:18                                               ` Benjamin Herrenschmidt
2004-04-28 17:02                                                 ` James Simmons
2004-04-28  4:36                                               ` John Zielinski [this message]
2004-04-28  4:56                                                 ` Alex Stewart
2004-04-28  6:59                                                   ` John Zielinski
2004-04-28  8:26                                         ` Geert Uytterhoeven
2004-04-28 22:00                                           ` John Zielinski
2004-04-28  0:29                                     ` Otto Solares
2004-04-28  0:54                                       ` Antonino A. Daplas
2004-04-28  1:15                                         ` Otto Solares
2004-04-28  1:21                                       ` John Zielinski
2004-04-28 16:53                                         ` James Simmons
2004-04-28  0:23                                   ` Otto Solares
2004-04-28  0:20                                 ` Otto Solares
2004-04-28  0:36                                   ` Benjamin Herrenschmidt
2004-04-28  7:08                                     ` Otto Solares
2004-04-28  8:27                                       ` Geert Uytterhoeven
2004-04-28 10:16                                       ` Michel Dänzer
2004-04-28 16:37                                         ` Otto Solares
2004-04-28 16:50                                           ` James Simmons
2004-04-28 22:26                                           ` Michel Dänzer
2004-04-28 23:42                                             ` Benjamin Herrenschmidt
2004-04-28 23:59                                               ` James Simmons
2004-04-29  1:06                                               ` Otto Solares
2004-04-29  1:20                                                 ` Benjamin Herrenschmidt
2004-04-29 16:56                                                   ` James Simmons
2004-04-29 21:57                                                     ` Benjamin Herrenschmidt
2004-04-30 15:06                                                       ` Ville Syrjälä
2004-04-30 16:50                                                         ` James Simmons
2004-05-01  0:40                                                           ` Otto Solares
2004-05-06 19:28                                                             ` Mobility M1 refresh code problem 2.4.26? Richard Smith
2004-05-06 19:57                                                               ` Mikael Eriksson
2004-05-06 20:35                                                                 ` Richard Smith
2004-05-06 20:42                                                                   ` Geert Uytterhoeven
2004-05-06 21:12                                                                     ` Richard Smith
2004-05-07  7:57                                                                       ` Mikael Eriksson
2004-05-07 14:11                                                                         ` Richard Smith
2004-05-07 15:34                                                                           ` Mikael Eriksson
2004-05-07 19:42                                                                             ` Richard Smith
2004-05-07 23:11                                                                               ` Mikael Eriksson
2004-04-29  8:32                                               ` [PATCH] neofb patches Geert Uytterhoeven
2004-04-29  1:07                                             ` Otto Solares
2004-04-29  1:23                                               ` Benjamin Herrenschmidt
2004-04-29 13:01                                               ` Michel Dänzer
2004-04-29 17:52                                                 ` Otto Solares
2004-04-29 23:12                                                   ` Michel Dänzer
2004-04-30  1:18                                                     ` Otto Solares
2004-04-30  1:28                                                       ` Michel Dänzer
2004-04-30 21:26                                                         ` Otto Solares
2004-04-28 23:30                                           ` Benjamin Herrenschmidt
2004-04-28 17:39                                       ` James Simmons
2004-04-28 18:03                                         ` Geert Uytterhoeven
2004-04-28 22:46                                         ` John Zielinski
2004-04-27  8:56                   ` Geert Uytterhoeven
2004-04-23 16:07         ` James Simmons

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=408F34BA.2090105@undead.cc \
    --to=grim@undead.cc \
    --cc=alex@foogod.com \
    --cc=benh@kernel.crashing.org \
    --cc=geert@linux-m68k.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).