(#79033, fd.o #2000) Radeon driver disables hotkeys. Provide a new option BIOSHotkeys to enable hotkey switching. --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c.orig 2005-01-23 13:58:56.000000000 +0100 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2005-01-23 17:35:46.000000000 +0100 @@ -172,6 +172,7 @@ typedef enum { OPTION_VGA_ACCESS, OPTION_LVDS_PROBE_PLL, OPTION_REVERSE_DDC, + OPTION_BIOS_HOTKEYS, } RADEONOpts; static const OptionInfoRec RADEONOptions[] = { @@ -222,6 +223,7 @@ static const OptionInfoRec RADEONOptions { OPTION_VGA_ACCESS, "VGAAccess", OPTV_BOOLEAN, {0}, TRUE }, { OPTION_LVDS_PROBE_PLL, "LVDSProbePLL", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_REVERSE_DDC, "ReverseDDC", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_BIOS_HOTKEYS, "BIOSHotkeys", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; @@ -6899,7 +6901,18 @@ static void RADEONInitFPRegisters(ScrnIn } } - 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. @@ -6927,6 +6940,21 @@ static void RADEONInitFPRegisters(ScrnIn } 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->bios_4_scratch = orig->bios_4_scratch; + save->bios_6_scratch = orig->bios_6_scratch; + } save->fp_crtc_h_total_disp = save->crtc_h_total_disp; --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h.orig 2005-01-23 13:58:56.000000000 +0100 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h 2005-01-23 17:35:46.000000000 +0100 @@ -602,6 +602,10 @@ typedef struct { /* special handlings for DELL triple-head server */ Bool IsDellServer; + + /* enable bios hotkey output switching */ + Bool BiosHotkeys; + } RADEONInfoRec, *RADEONInfoPtr; --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man.orig 2005-01-23 13:58:56.000000000 +0100 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man 2005-01-23 17:35:46.000000000 +0100 @@ -522,6 +522,13 @@ case. This is only useful for LVDS pane The default is .B on. .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__)