Date: Sat, 14 Oct 2000 18:20:27 -0400 (EDT) From: Thomas Valentino Crimi <tcrimi+@andrew.cmu.edu> To: "Andrew M. Miklic" <miklic@attglobal.net> Cc: freebsd-alpha@freebsd.org Subject: Re: TGA and PCI Message-ID: <UtuBkfe00UwH4S1YpP@andrew.cmu.edu> In-Reply-To: <39E87745.596865AC@attglobal.net> References: <39E87745.596865AC@attglobal.net>
next in thread | previous in thread | raw e-mail | index | archive | help
I tried to write a TGA driver as well although but never finished it. At the point I left it the driver registered itself with syscons and drew a pattern on the screen. I'd be more than happy to send you the source if it can help any. From reading the code the driver is both registed as a PCI device and as a VIDEO_DRIVER, the PCI probe and attach functions are called first. In tga_pci_probe I use pci_get_vendor/device on the device_t structure passed. tga_pci_attach maps the video car into memory using: res = bus_alloc_resource(dev, SYS_RES_MEMORY, ®, 0, ~0, 1, RF_ACTIVE | PCI_RF_DENSE); where reg = PCIR_MAPS and puts necessary information in tga_adapter[i], an array of video_adapter_t, and calls vidregister() on it. So, before anything happens with sccnattach all pci configuration data has been read. If the card didn't sucessfully probe and attach the vi_probe_t or backdoor function would never find it. syscons eventually calls the backdoor fucnction which checks that something has been set in tga_adapters[] and calls the card initialization function on it, which find out which version of TGA card is present, sets up the resolution and draws the pattern. Best of luck finishing up the driver -- Tom To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?UtuBkfe00UwH4S1YpP>