I attached a patch that should fix this problem. Dave, can you and Alex
give it a test. I have very limited programming time at the moment.
Check it in if it looks good.

--- Dave Airlie <[EMAIL PROTECTED]> wrote:

> >   c0400000-c043ffff : eth1
> > d0000000-dfffffff : 0000:00:00.0
> > e0000000-e7ffffff : PCI Bus #01
> >   e0000000-e7ffffff : 0000:01:00.0
> >     e0000000-e059b8bf : vesafb
> 
> this is the culprit .. vesafb is loaded...
> 
> Jon can you figure out what do in this situation?
> 
> Dave.
> 
> > ff800000-ffffffff : reserved
> >
> > i am sending the laptop back to ibm so i won't be able to run any
> > tests for a while. hope this helps.
> >
> > --alex--
> >
> >
> 

=====
Jon Smirl
[EMAIL PROTECTED]


                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 
===== linux/drm_drv.h 1.8 vs edited =====
--- 1.8/linux/drm_drv.h	Tue Aug 17 11:38:31 2004
+++ edited/linux/drm_drv.h	Fri Aug 20 16:37:08 2004
@@ -635,7 +635,7 @@
 static int __init drm_init( void )
 {
 	struct pci_dev *pdev = NULL;
-	struct pci_driver *pdriver = NULL;
+	struct pci_device_id *pid;
 	int i;
 	
 	DRM_DEBUG( "\n" );
@@ -647,21 +647,26 @@
 	DRM(mem_init)();
 	
 	for (i=0; DRM(pciidlist)[i].vendor != 0; i++) {
-		pdev = pci_get_subsys(DRM(pciidlist[i]).vendor, DRM(pciidlist[i]).device, DRM(pciidlist[i]).subvendor, DRM(pciidlist[i]).subdevice, NULL);
-		if (pdev)
-		{
-			pdriver = pci_dev_driver(pdev);
-			if (pdriver)
-			{
-				DRM(fb_loaded)=1;
+		pid = &DRM(pciidlist[i]);
+		
+		/* pass back in pdev to account for multiple identical cards */
+		while ((pdev = pci_get_subsys(pid->vendor, pid->device, pid->subvendor, pid->subdevice, pdev))) {
+			/* is there already a driver loaded, or (short circuit saves work) */
+			/* does something like VesaFB have control of the memory region? */
+			if (pci_dev_driver(pdev) || pci_request_regions(pdev, "DRM scan")) {
+				/* go into stealth mode */
+				DRM(fb_loaded) = 1;
 				drm_probe(pdev, &DRM(pciidlist[i]));
+				/* keep looping to get all devices */
+				continue;
 			}
-			else
-				pci_dev_put(pdev);
+			/* no fbdev or vesadev, put things back and wait for normal probe */
+			pci_release_regions(pdev);
+			pci_dev_put(pdev);
 		}
 	}
 	
-	if (DRM(fb_loaded)==0)
+	if (DRM(fb_loaded) == 0)
 		pci_register_driver(&drm_driver);
 	else
 		DRM_INFO("Used old pci detect: framebuffer loaded\n");

Reply via email to