linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pm2fb 3dlabs Permedia 2V reference board added
@ 2007-04-21  6:54 Krzysztof Helt
  2007-04-23 14:51 ` Antonino A. Daplas
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Helt @ 2007-04-21  6:54 UTC (permalink / raw)
  To: linux-fbdev-devel

[-- Attachment #1: Type: text/plain, Size: 389 bytes --]

This patch adds support for 3dlabs Permedia reference board.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>

---



----------------------------------------------------
Rozlicz się sercem - przekaż 1% podatku.
1% Twojego podatku może uratować życie dziecka!
Jak przekazać 1% podatku potrzebującym? Kliknij i zobacz:
http://klik.wp.pl/?adr=www.jedenprocent.wp.pl&sid=1111

[-- Attachment #2: perm2v.diff --]
[-- Type: application/octet-stream, Size: 2572 bytes --]

diff -urp linux-2.6.21.orig/drivers/video/pm2fb.c linux-2.6.21/drivers/video/pm2fb.c
--- linux-2.6.21.orig/drivers/video/pm2fb.c	2007-04-06 04:36:56.000000000 +0200
+++ linux-2.6.21/drivers/video/pm2fb.c	2007-04-21 08:38:00.206343424 +0200
@@ -1117,20 +1123,31 @@ static int __devinit pm2fb_probe(struct 
 		default_par->mem_control, default_par->boot_address,
 		default_par->mem_config);
 
+	default_par->memclock = CVPPC_MEMCLOCK;
 	if(default_par->mem_control == 0 &&
 		default_par->boot_address == 0x31 &&
-		default_par->mem_config == 0x259fffff &&
-		pdev->subsystem_vendor == 0x1048 &&
-		pdev->subsystem_device == 0x0a31) {
-		DPRINTK("subsystem_vendor: %04x, subsystem_device: %04x\n",
-			pdev->subsystem_vendor, pdev->subsystem_device);
-		DPRINTK("We have not been initialized by VGA BIOS "
-			"and are running on an Elsa Winner 2000 Office\n");
-		DPRINTK("Initializing card timings manually...\n");
+		default_par->mem_config == 0x259fffff) {
 		default_par->mem_control=0;
 		default_par->boot_address=0x20;
 		default_par->mem_config=0xe6002021;
-		default_par->memclock=100000;
+		if (pdev->subsystem_vendor == 0x1048 &&
+			pdev->subsystem_device == 0x0a31) {
+			DPRINTK("subsystem_vendor: %04x, subsystem_device: %04x\n",
+				pdev->subsystem_vendor, pdev->subsystem_device);
+			DPRINTK("We have not been initialized by VGA BIOS "
+				"and are running on an Elsa Winner 2000 Office\n");
+			DPRINTK("Initializing card timings manually...\n");
+			default_par->memclock=70000;
+		}
+		if (pdev->subsystem_vendor == 0x3d3d &&
+			pdev->subsystem_device == 0x0100) {
+			DPRINTK("subsystem_vendor: %04x, subsystem_device: %04x\n",
+				pdev->subsystem_vendor, pdev->subsystem_device);
+			DPRINTK("We have not been initialized by VGA BIOS "
+				"and are running on an 3dlabs reference board\n");
+			DPRINTK("Initializing card timings manually...\n");
+			default_par->memclock=70000;
+		}
 	}
 
 	/* Now work out how big lfb is going to be. */
@@ -1148,7 +1165,6 @@ static int __devinit pm2fb_probe(struct 
 		default_par->fb_size=0x800000;
 		break;
 	}
-	default_par->memclock = CVPPC_MEMCLOCK;
 	pm2fb_fix.smem_start = pci_resource_start(pdev, 1);
 	pm2fb_fix.smem_len = default_par->fb_size;
 
@@ -1242,6 +1258,9 @@ static struct pci_device_id pm2fb_id_tab
 	{ PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2V,
 	  PCI_ANY_ID, PCI_ANY_ID, PCI_BASE_CLASS_DISPLAY << 16,
 	  0xff0000, 0 },
+	{ PCI_VENDOR_ID_3DLABS, PCI_DEVICE_ID_3DLABS_PERMEDIA2V,
+	  PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NOT_DEFINED_VGA << 8,
+	  0xff00, 0 },
 	{ 0, }
 };
 

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-23 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-21  6:54 [PATCH] pm2fb 3dlabs Permedia 2V reference board added Krzysztof Helt
2007-04-23 14:51 ` Antonino A. Daplas

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).