The main purpose of this patch is to provide DRM driver support for initializing
secondary adapters. This will all us to remove the corresponding code from
Xfree. Xfree is doing all of this from user space without letting the kernel
know what is happening.

The patch implements:

1) getvbios ioctl - returns the contents of the PCI ROM to user space. Uses
kernel calls to map/unmap the ROM. video-reset needs this to fetch the ROM
contents.

2) vga_enable ioctl - this is used when reseting a card. Resetting a card
enables it VGA support so it is bad news if your reset a secondary card without
first disabling the primary VGA one.  This ioctl disables all VGA devices. Then
you can reset the card. Then call the ioctl again to restore the initial VGA
device. The code uses kernel calls to manipulate PCI VGA bus routing. Xfree
changes the PCI bus routing from user space (yuck!).

3) It implements the normal Linux mechanism for associating a device driver with
the hardware; that's what caused the changes in the PCI ID tables. If it
discovers that an FB driver is already loaded it stops probing and reverts to
the old scheme.

4) It permanently maps (DRM map, not kernel map) the framebuffer and registers.
This gets rid of the need for the user space app to find out where these are and
then tell the DRM driver. Now the DRM driver just asks the hardware. If you try
to map these again from user space the request is just ignored.

5) It implements sysfs and hotplug using class_simple. 

Most of the code is driver independent. postinit will need to be implemented for
each DRM driver. postinit marks the hardware in use to the kernel and adds the
permanent DRM maps for framebuffer and registers. I've implemented postinit for
the radeon.

=====
Jon Smirl
[EMAIL PROTECTED]


        
                
__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

Attachment: patch.bz2
Description: patch.bz2

Reply via email to