First let me say that if you only have one video card installed you don't see this.
If you have two or more video cards you will find that the system BIOS only resets one of them. X contains some really ugly user space code that resets these cards. This code does things like play with PCI bridge routing from user space without telling the kernel what is going on. Over time I would like to get this code out of X. I believe it is the device driver's responsibly to reset the hardware. But the hardware vendors have not released enough documentation to write this code directly into the device driver. Since I can't directly add the reset code to the device driver I took an alternate approach. In the patch I sent out I have modified DRM to reset secondary cards if needed. The patch works by generating a hotplug event on driver insertion. This event calls a user space helper - video-reset. Video cards can be reset from user space using VM86 mode. video-reset starts off by getting a copy of the VBIOS ROM using a new DRM ioctl. The VBIOS ROM is retrieved using standard kernel calls for enabling/disabling it. Right now X enables it from user space without telling the kernel. This leaves a window of vulnerability where the kernel could assign another PCI device on top of the video ROM (hotplug) since the kernel doesn't know it has been enabled. Next video-reset uses another IOCTL to disable all VGA devices in the system. Controlling the VGA devices is done using standard kernel calls. This is also where PCI bridge routing is set up using kernel calls. Next it uses VM86 mode to call the VBIOS reset function. Reseting the hardware will enable it's VGA mode. After the reset the VGA IOCTL is again called to restore VGA routing like it was before the reset. To me the video-reset program is an extension of the DRM device driver and should be kept in the new drm tree. But other people have different opinions. What does everyone think? ===== Jon Smirl [EMAIL PROTECTED] __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click -- _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel
