linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Smirl <jonsmirl@gmail.com>
To: Kendall Bennett <kendallb@scitechsoft.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	fbdev <linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: Generic VESA framebuffer driver and Video card BOOT?
Date: Fri, 15 Oct 2004 16:19:16 -0400	[thread overview]
Message-ID: <9e4733910410151319159482ce@mail.gmail.com> (raw)
In-Reply-To: <416FB275.6425.1C3D985@localhost>

On Fri, 15 Oct 2004 11:20:21 -0700, Kendall Bennett
<kendallb@scitechsoft.com> wrote:
> Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> 
> > On Iau, 2004-10-14 at 21:46, Kendall Bennett wrote:
> > > a way to spawn a user mode process that early in the boot sequence (it
> > > would have to come from the initrd image I expect) then the only option
> > > is to compile it into the kernel.
> >
> > There is exactly that in 2.6 - the hotplug interfaces allow the
> > kernel to fire off userspace programs. Jon Smirl (who you should
> > definitely talk to about this stuff) has been hammering out a
> > design for moving almost all the mode switching into user space for
> > kernel video.
> 
> That is awesome! I am all for moving this outside of the kernel, as it
> would allow the use of ream vm86() services for VGA/VESA BIOS access on
> x86 and the user of the emulator for non-x86 platforms.
> 
> The only catch would be making sure this stuff is available really early
> in the boot sequence. As it stands right now the solution we have brings
> up the video almost imediately after you see the 'uncompressing kernel
> image' message on the serial port. The other solution of course is to get
> this into the boot loader which is what the AmigaOne folks did for their
> machines (U-Boot brings up the video). We are working with those guys to
> update their BIOS emulator to the latest version as the one they have
> doesn't work that reliably.
> 
> Anyway how do I find out more about this in 2.6?
> 
> Also I assume the code would need to end up in the initrg image, correct?
> Can you point me at some resources to learn more about how to get custom
> code into the initrd image?

The plan for this in 2.6 is to first write a VGA device driver. This
driver is responsible for identifying all of the VGA devices in a
system and ensuring only one of them gets enabled a time. I started
writing this but I haven't finished. This driver would be compiled
into the kernel. I can send source if you are interested.

I have added hooks to the PCI subsystem to record the boot video
device. If the VGA driver finds VGA devices other than the boot one it
will generate hotplug events on them. Initramfs should contain a reset
program for using X86 mode to reset these cards. To do this you need
two things from the kernel: 1) a way to make sure only a single VGA
device is active (VGA driver, allow you to disable the current VGA
device, reset the card, restore the active VGA device) and 2) a way to
get the ROM image. There is a patch in -mm that makes the ROMs visible
in sysfs that should be in the kernel shortly.

So, when you first boot you have two choices, 1) use a display the
boot ROM setup, such as VGAcon or PROMcon. or 2) have no display.
People want this both ways. VGAcon/PROMcon will let you get output
very early in the boot process.

Next the VGA driver will initialize. This will trigger user space
resets using the program on initramfs. Now it is possible to use all
of your displays. To control this from something like resume, the
driver sets a lock that is cleared by the reset app and the end of
reset. This will keep other processes out of the driver until reset is
finished.

Right now I am working on a merged fbdev/DRM that supports multi-head
adapters. It's turning out to be much more work than I though because
neither DRM or fbdev handle multihead at the device driver level. You
can get snapshots of the code at mesa3d.bkbits.net but it doesn't work
right yet. This driver is designed to run after the VGAdriver has
reset the hardware.

-- 
Jon Smirl
jonsmirl@gmail.com

  parent reply	other threads:[~2004-10-15 20:19 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2PjiW-3hl-21@gated-at.bofh.it>
2004-10-14 20:03 ` Generic VESA framebuffer driver and Video card BOOT? Andi Kleen
2004-10-14 20:46   ` Kendall Bennett
2004-10-15 12:39     ` Alan Cox
2004-10-15 18:20       ` Kendall Bennett
2004-10-15 18:41         ` Alan Cox
2004-10-15 20:19         ` Jon Smirl [this message]
2004-10-15 22:22           ` Kendall Bennett
2004-10-15 23:02             ` Jon Smirl
2004-10-19 21:09               ` Pavel Machek
2004-10-20 15:23     ` Paulo Marques
2004-10-20 17:27       ` Kendall Bennett
2004-10-21  4:03 Yu, Luming
     [not found] <2Pkf0-42m-11@gated-at.bofh.it>
     [not found] ` <2PncW-6j9-19@gated-at.bofh.it>
     [not found]   ` <2PncW-6j9-21@gated-at.bofh.it>
     [not found]     ` <20030401205016$5cc4@gated-at.bofh.it>
     [not found]       ` <20030401205016$63f7@gated-at.bofh.it>
     [not found]         ` <20030424075011$4028@gated-at.bofh.it>
     [not found]           ` <1ewKr-2Kh-41@gated-at.bofh.it>
     [not found]             ` <CebL.O9.13@gated-at.bofh.it>
     [not found]               ` <1bucs-57R-33@gated-at.bofh.it>
     [not found]                 ` <2PncW-6j9-23@gated-at.bofh.it>
     [not found]                   ` <20030423094012$4166@gated-at.bofh.it>
     [not found]                     ` <2PncW-6j9-17@gated-at.bofh.it>
     [not found]                       ` <2PAMY-7Ir-21@gated-at.bofh.it>
2004-10-15 14:22                         ` Andi Kleen
2004-10-15 14:33                           ` Alan Cox
2004-10-15 18:20                             ` Kendall Bennett
2004-10-15 18:39                               ` Alan Cox
2004-10-15 22:27                                 ` Kendall Bennett
2004-10-15 23:34                                   ` Alan Cox
2004-10-16  1:07                                   ` William Lee Irwin III
2004-10-21 11:59                                   ` Pavel Machek
2004-10-18 11:44                               ` Martin Waitz
2004-10-18 19:43                                 ` Kendall Bennett
2004-10-19 17:01                                   ` Martin Waitz
2004-10-19 17:54                                     ` Kendall Bennett
2004-10-15 15:37                           ` Gerd Knorr
2004-10-16  0:55                             ` Andi Kleen
2004-10-16 12:21                               ` Gerd Knorr
  -- strict thread matches above, loose matches on Subject: below --
2004-10-14 19:02 Kendall Bennett
2004-10-15 13:48 ` Helge Hafting
2004-10-15 18:36   ` Kendall Bennett
2004-10-15 21:44     ` Helge Hafting
2004-10-15 22:12       ` Kendall Bennett
2004-10-16 17:44 ` Jon Smirl
2004-10-19 21:00 ` Pavel Machek
2004-10-19 21:11 ` Pavel Machek

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=9e4733910410151319159482ce@mail.gmail.com \
    --to=jonsmirl@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=kendallb@scitechsoft.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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).