? Makefile ? bioshotkeys.diff ? dynclocks.patch ? r128.4.html ? r128._man ? radeon.4.html ? radeon._man Index: radeon.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h,v retrieving revision 1.12 diff -u -r1.12 radeon.h --- radeon.h 3 Oct 2004 00:01:13 -0000 1.12 +++ radeon.h 5 Dec 2004 18:47:21 -0000 @@ -618,6 +618,10 @@ /* special handlings for DELL triple-head server */ Bool IsDellServer; + + /* enable bios hotkey output switching */ + Bool BiosHotkeys; + } RADEONInfoRec, *RADEONInfoPtr; #define RADEONWaitForFifo(pScrn, entries) \ Index: radeon.man =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man,v retrieving revision 1.13 diff -u -r1.13 radeon.man --- radeon.man 27 Nov 2004 15:14:15 -0000 1.13 +++ radeon.man 5 Dec 2004 18:47:21 -0000 @@ -496,6 +496,13 @@ with this enabled. The default is .B off. .TP +.BI "Option \*qBIOSHotkeys\*q \*q" boolean \*q +Enable BIOS hotkey output switching. This allows the BIOS to toggle outputs +using hotkeys (e.g., fn-f7, etc.). Since the driver does not support ACPI, +there is no way to validate modes on an output switch and the BIOS can +potentially change things behind the driver's back. The default is +.B off. +.TP .SH SEE ALSO __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) Index: radeon_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v retrieving revision 1.25 diff -u -r1.25 radeon_driver.c --- radeon_driver.c 23 Nov 2004 21:27:43 -0000 1.25 +++ radeon_driver.c 5 Dec 2004 18:47:25 -0000 @@ -171,7 +171,8 @@ OPTION_SUBPIXEL_ORDER, #endif OPTION_SHOWCACHE, - OPTION_DYNAMIC_CLOCKS + OPTION_DYNAMIC_CLOCKS, + OPTION_BIOS_HOTKEYS } RADEONOpts; static const OptionInfoRec RADEONOptions[] = { @@ -223,6 +224,7 @@ #endif { OPTION_SHOWCACHE, "ShowCache", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_DYNAMIC_CLOCKS, "DynamicClocks", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_BIOS_HOTKEYS, "BIOSHotkeys", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -6806,7 +6810,18 @@ } } - if (info->IsMobility) { + info->BiosHotkeys = FALSE; + /* + * Allow the bios to toggle outputs. see below for more. + */ + if (xf86ReturnOptValBool(info->Options, OPTION_BIOS_HOTKEYS, FALSE)) { + info->BiosHotkeys = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BIOS HotKeys Enabled\n"); + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BIOS HotKeys Disabled\n"); + } + + if (info->IsMobility && (!info->BiosHotkeys)) { RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); /* To work correctly with laptop hotkeys. @@ -6834,6 +6849,17 @@ } save->bios_4_scratch = 0x4; save->bios_6_scratch = orig->bios_6_scratch | 0x40000000; + + } else if (info->IsMobility && (info->DisplayType == MT_LCD)) { + RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); + + /* BIOS will use this setting to reset displays upon lid close/open. + * Here we let BIOS controls LCD, but the driver will control the external CRT. + */ + if (info->MergedFB || pRADEONEnt->HasSecondary) + save->bios_5_scratch = 0x01020201; + else + save->bios_5_scratch = orig->bios_5_scratch; } save->fp_crtc_h_total_disp = save->crtc_h_total_disp;