public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.4.3-pre3 add PBG4 native LCD mode to modedb.c
@ 2001-03-13 20:37 Jeffrey W. Baker
  2001-03-13 22:54 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey W. Baker @ 2001-03-13 20:37 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds

[-- Attachment #1: Type: TEXT/PLAIN, Size: 272 bytes --]

The attached patch adds the a new mode to the modedb, used by the ATI,
3Dfx, and Amiga frame buffer devices.  The new mode is the native,
slightly wide resolution of the new Apple laptops.  It isn't obvious how
popular a mode has to be before it goes into modedb.c.

-jwb

[-- Attachment #2: Patch to drivers/video/modedb.c --]
[-- Type: TEXT/PLAIN, Size: 522 bytes --]

--- drivers/video/modedb.c.orig	Tue Mar 13 04:20:43 2001
+++ drivers/video/modedb.c	Tue Mar 13 04:16:20 2001
@@ -91,6 +91,10 @@
 	NULL, 60, 1024, 768, 15384, 168, 8, 29, 3, 144, 6,
 	0, FB_VMODE_NONINTERLACED
     }, {
+	/* 1152x768 @ 55 Hz, 44.154 kHz hsync, PowerBook G4 LCD */
+        NULL, 55, 1152, 768, 15386, 126, 58, 29, 3, 136, 6,
+        0, FB_VMODE_NONINTERLACED 
+    }, {
 	/* 640x480 @ 100 Hz, 53.01 kHz hsync */
 	NULL, 100, 640, 480, 21834, 96, 32, 36, 8, 96, 6,
 	0, FB_VMODE_NONINTERLACED

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

* Re: [PATCH] 2.4.3-pre3 add PBG4 native LCD mode to modedb.c
  2001-03-13 20:37 [PATCH] 2.4.3-pre3 add PBG4 native LCD mode to modedb.c Jeffrey W. Baker
@ 2001-03-13 22:54 ` Olaf Hering
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Hering @ 2001-03-13 22:54 UTC (permalink / raw)
  To: Jeffrey W. Baker, Alan Cox; +Cc: linux-kernel, torvalds

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

On Tue, Mar 13, Jeffrey W. Baker wrote:

> The attached patch adds the a new mode to the modedb, used by the ATI,
> 3Dfx, and Amiga frame buffer devices.  The new mode is the native,
> slightly wide resolution of the new Apple laptops.  It isn't obvious how
> popular a mode has to be before it goes into modedb.c.

It proably depends also on your own popularity as a kernel hacker ;)

Do it right and put the stuff into aty128fb.c. The various models can be
autodetected via the OpenFirmware "compatible" property.
The attached patch forces the known models into a sane video mode.
It adds also a vmode:22 for the 22" Apple Cinema display, there is
currently no way in the kernel to use that one.
It adds PCI_DEVICE_ID_ATI_RAGE128_TR for the new iMacs.
It adds vmode:21 for that Titanium PowerBook.


(Btw, someone should have at the new aic7xxx, make distclean is broken.)



Gruss Olaf

-- 
 $ man clone

BUGS
       Main feature not yet implemented...

[-- Attachment #2: 2.4.2-ac20.macmodes.dif --]
[-- Type: text/plain, Size: 4737 bytes --]

diff -urN linux-2.4.2-ac20/drivers/video/aty128fb.c linux-2.4.2-ac20.macmodes/drivers/video/aty128fb.c
--- linux-2.4.2-ac20/drivers/video/aty128fb.c	Tue Mar 13 23:10:48 2001
+++ linux-2.4.2-ac20.macmodes/drivers/video/aty128fb.c	Tue Mar 13 23:13:31 2001
@@ -176,6 +176,7 @@
     {"Rage128 RL", PCI_DEVICE_ID_ATI_RAGE128_RL, rage_128, "AGP" },
     {"Rage128 Pro PF", PCI_DEVICE_ID_ATI_RAGE128_PF, rage_128_pro, "AGP" },
     {"Rage128 Pro PR", PCI_DEVICE_ID_ATI_RAGE128_PR, rage_128_pro, "PCI" },
+    {"Rage128 Pro TR", PCI_DEVICE_ID_ATI_RAGE128_TR, rage_128_pro, "AGP" },
     {"Rage Mobility M3", PCI_DEVICE_ID_ATI_RAGE128_LE, rage_M3, "PCI" },
     {"Rage Mobility M3", PCI_DEVICE_ID_ATI_RAGE128_LF, rage_M3, "AGP" },
     {NULL, 0, rage_128, NULL }
@@ -1701,6 +1702,28 @@
         } else {
             if (default_vmode <= 0 || default_vmode > VMODE_MAX)
                 default_vmode = VMODE_1024_768_60;
+
+	    /* iMacs need that resolution
+	     * PowerMac2,1 first r128 iMacs
+	     * PowerMac2,2 summer 2000 iMacs
+	     * PowerMac4,1 januar 2001 iMacs "flower power"
+	     */
+	    if (machine_is_compatible("PowerMac2,1") ||
+		machine_is_compatible("PowerMac2,2") ||
+		machine_is_compatible("PowerMac4,1"))
+		default_vmode = VMODE_1024_768_75;
+
+	    /* PowerBook Firewire (Pismo) */
+	    if (machine_is_compatible("PowerBook3,1"))
+		default_vmode = VMODE_1024_768_60;
+
+	    /* PowerBook Titanium */
+	    if (machine_is_compatible("PowerBook3,2"))
+		default_vmode = VMODE_1152_768_60;
+
+	    /* iBook Firewire */
+	    if (machine_is_compatible("PowerBook2,2"))
+		default_vmode = VMODE_800_600_60;
 
             if (default_cmode < CMODE_8 || default_cmode > CMODE_32)
                 default_cmode = CMODE_8;
diff -urN linux-2.4.2-ac20/drivers/video/macmodes.c linux-2.4.2-ac20.macmodes/drivers/video/macmodes.c
--- linux-2.4.2-ac20/drivers/video/macmodes.c	Tue Mar 13 23:10:48 2001
+++ linux-2.4.2-ac20.macmodes/drivers/video/macmodes.c	Tue Mar 13 23:12:32 2001
@@ -94,7 +94,15 @@
 	/* 1280x1024, 75 Hz, Non-Interlaced (135.00 MHz dotclock) */
 	"mac20", 75, 1280, 1024, 7408, 232, 64, 38, 1, 112, 3,
 	FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
-    },
+    }, {
+	/* 1152x768, 60 Hz, Titanium PowerBook */
+	"mac21", 75, 1152, 768, 15386, 158, 26, 29, 3, 136, 6,
+	FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
+    }, {
+	/* 1600x1024, 60 Hz, Non-Interlaced (112.27 MHz dotclock) */
+	"mac22", 75, 1600, 1024, 8908, 88, 104, 1, 10, 16, 1,
+	FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, FB_VMODE_NONINTERLACED
+    }
 
 #if 0
     /* Anyone who has timings for these? */
@@ -154,12 +162,15 @@
     { VMODE_1024_768_75V, &mac_modedb[9] },
     { VMODE_1024_768_70, &mac_modedb[8] },
     { VMODE_1024_768_60, &mac_modedb[7] },
+    { VMODE_1152_768_60, &mac_modedb[14] },
     /* 1152x870 */
     { VMODE_1152_870_75, &mac_modedb[11] },
     /* 1280x960 */
     { VMODE_1280_960_75, &mac_modedb[12] },
     /* 1280x1024 */
     { VMODE_1280_1024_75, &mac_modedb[13] },
+    /* 1600x1024 */
+    { VMODE_1600_1024_60, &mac_modedb[15] },
     { -1, NULL }
 };
 
@@ -191,6 +202,7 @@
     { 0x730, VMODE_768_576_50I },	/* PAL (Alternate) */
     { 0x73a, VMODE_1152_870_75 },	/* 3rd party 19" */
     { 0x73f, VMODE_640_480_67 },	/* no sense lines connected at all */
+    { 0xBEEF, VMODE_1600_1024_60 },	/* 22" Apple Cinema Display */
     { -1,    VMODE_640_480_60 },	/* catch-all, must be last */
 };
 
diff -urN linux-2.4.2-ac20/include/linux/pci_ids.h linux-2.4.2-ac20.macmodes/include/linux/pci_ids.h
--- linux-2.4.2-ac20/include/linux/pci_ids.h	Tue Mar 13 23:10:53 2001
+++ linux-2.4.2-ac20.macmodes/include/linux/pci_ids.h	Tue Mar 13 23:14:04 2001
@@ -194,6 +194,7 @@
 #define PCI_DEVICE_ID_ATI_RAGE128_PP	0x5050
 #define PCI_DEVICE_ID_ATI_RAGE128_PQ	0x5051
 #define PCI_DEVICE_ID_ATI_RAGE128_PR	0x5052
+#define PCI_DEVICE_ID_ATI_RAGE128_TR	0x5452
 #define PCI_DEVICE_ID_ATI_RAGE128_PS	0x5053
 #define PCI_DEVICE_ID_ATI_RAGE128_PT	0x5054
 #define PCI_DEVICE_ID_ATI_RAGE128_PU	0x5055
diff -urN linux-2.4.2-ac20/include/video/macmodes.h linux-2.4.2-ac20.macmodes/include/video/macmodes.h
--- linux-2.4.2-ac20/include/video/macmodes.h	Thu Feb 10 04:43:57 2000
+++ linux-2.4.2-ac20.macmodes/include/video/macmodes.h	Tue Mar 13 23:12:32 2001
@@ -38,7 +38,9 @@
 #define VMODE_1152_870_75	18	/* 1152x870, 75Hz */
 #define VMODE_1280_960_75	19	/* 1280x960, 75Hz */
 #define VMODE_1280_1024_75	20	/* 1280x1024, 75Hz */
-#define VMODE_MAX		20
+#define VMODE_1152_768_60	21	/* 1152x768, 60Hz     Titanium PowerBook */
+#define VMODE_1600_1024_60	22	/* 1600x1024, 60Hz 22" Cinema Display */
+#define VMODE_MAX		22
 #define VMODE_CHOOSE		99
 
 #define CMODE_NVRAM		-1

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

end of thread, other threads:[~2001-03-13 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-13 20:37 [PATCH] 2.4.3-pre3 add PBG4 native LCD mode to modedb.c Jeffrey W. Baker
2001-03-13 22:54 ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox