linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Antonino Daplas <adaplas@pol.net>
To: Kendall Bennett <KendallB@scitechsoft.com>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Help with Aki Laukkanen's vesafbd project?
Date: 20 Mar 2003 12:50:03 +0800	[thread overview]
Message-ID: <1048135312.1207.32.camel@localhost.localdomain> (raw)
In-Reply-To: <3E78BC18.9671.A905E64@localhost>

On Thu, 2003-03-20 at 10:51, Kendall Bennett wrote:
> Antonino Daplas <adaplas@pol.net> wrote:
> 
> > I guess, 2.5.x.
> 
> Ok.
> 
> > > However since I am not that familiar with the patching mechanism for the 
> > > Linux kernel, would someone more familiar with this be willing to help 
> > > out? I would like to modify the vesafb module in the kernel to optionally 
> > 
> > Yes, I'll be interested and willing to help out.
> 
> Great!
> 
> > I'm more inclined to generalize this as a vm86 daemon.  What I'm
> > thinking is to create a character device /dev/vm86.  
> 
> Right, that is actually not a bad idea, especially as a way for making 
> vm86 services available to Linux kernel modules. However one of the 
> offshoots of the vesafbd daemon is also the ability to handle full mode 
> setting and blitting from the userland daemon without needing the vm86() 
> BIOS support (ie: using XFree86 modules or allowing other vendor supplied 
> modules to support this).

I think that's not a problem, except perhaps for efficiency.  For
instance, if the kernel module sent a request for int 0x10 with AX =
0x4f02 (Set VBE mode), the user daemon can choose to either:

a. parse the request so it is compatible with XFree86 or some non-VBE
modules for video mode changing

b. execute the instruction as is via VBE

Similarly for blits, we can use the VBE/AF standard.

This should make the kernel->user interface as simple and as generic as
possible, and we just let the user daemon do whatever it wants perhaps
with some suggestions from the kernel (such as "use the BIOS
exclusively" or "use the BIOS only as a last resort").

> 
> Hence although I like the idea of a vm86d deamon, I do think there is a 
> place for a userland framebuffer console daemon as well.
> 
> > A daemon (perhaps named vm86d) will sleep waiting for a signal
> > which when it arrives, does a file read.  
> 
> It can just do the read and it will block in the read until there is 
> something to read. No need to wait on a signal ;-)

Okay.  How the user daemon gets the request probably does not matter. 
Also, I don't think asynchronous IO works other than for sockets and
tty's, yet.  Learned it the hard way :-)

> 
> > Within the kernel side, an exportable function (perhaps named
> > vm86_exec) will be available to anyone.  When this function is
> > called, it will send a signal to the daemon (for select(), poll()
> > or signal()), then optionally sleep. The read function will pass
> > the generic request structure to the daemon.  The write function
> > will get the result from the daemon and also wake up vm86_exec().  
> 
> An interesting side effect of this is that the vm86d daemon could be 
> built using the x86emu BIOS emulator for support on non-x86 platforms 
> such as Alpha and PowerPC.

Yes.

> 
> > As a sidenote:  There are specific contexts in the kernel where
> > the module cannot sleep (ie during vt switches).  In these cases,
> > the module has to exit immediately without waiting for the daemon
> > to write back the results, unless we find another method of waiting
> > for the daemon to finish without the kernel module sleeping. 
> 
> Interesting, I had not thought of that.

Yes, again learned it the hard way. 

> 
> > This way, the interface can be useful for other subsystems (APM, IDE,
> > etc).  Plus, the interface will be very simple (the request structure
> > will just contain x86's register set, the bus, device, function number,
> > and perhaps a few flags) and it need not know if this is graphics,
> > block, power, etc.  
> 
> I like the idea, but the downside is that some people on the Linux kernel 
> list feel that the availability of a generic BIOS interface would allow 
> hardware vendors to be 'lazy' and rely on these services, making their 
> code less portable to non-x86 platforms. Hence the generic vm86d project 
> might be a bit of a hard sell for those folks ;-)

Hmm, I hope not.  Using the BIOS is just too inefficient.

Tony



-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? 
You could win a Tablet PC. Get a free Tablet PC hat just for playing. 
What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en

  reply	other threads:[~2003-03-20  4:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-19 19:32 Help with Aki Laukkanen's vesafbd project? Kendall Bennett
2003-03-19 23:32 ` Antonino Daplas
2003-03-20  2:51   ` Kendall Bennett
2003-03-20  4:50     ` Antonino Daplas [this message]
2003-03-20 20:14       ` Kendall Bennett

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=1048135312.1207.32.camel@localhost.localdomain \
    --to=adaplas@pol.net \
    --cc=KendallB@scitechsoft.com \
    --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).