2.4.3-pre3 add PBG4 native LCD mode to modedb.c
Subsystems (2)
PATCH 1/1 2.4.3-pre3 add PBG4 native LCD mode to modedb.c
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
video/modedb.c renamed from video/modedb.c.orig +4 -0
@@ -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
Quoted 4 lines · Jeffrey W. Baker
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
Signature · 4 lines
$ man clone
BUGS
Main feature not yet implemented...drivers/video/aty128fb.c +23 -0
@@ -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 ;
drivers/video/macmodes.c +13 -1
@@ -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 */ };
include/linux/pci_ids.h +1 -0
@@ -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
include/video/macmodes.h +3 -1
@@ -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