Magellan Linux

Contents of /trunk/xorg-old/patches-6.8.2-r10/5170_all_6.8.1.904-radeon-add-bioshotkeys-option.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 167 - (show annotations) (download)
Tue May 8 20:58:51 2007 UTC (17 years ago) by niro
File size: 3605 byte(s)
-import

1 (#79033, fd.o #2000) Radeon driver disables hotkeys. Provide a new option
2 BIOSHotkeys to enable hotkey switching.
3
4 --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c.orig 2005-01-23 13:58:56.000000000 +0100
5 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c 2005-01-23 17:35:46.000000000 +0100
6 @@ -172,6 +172,7 @@ typedef enum {
7 OPTION_VGA_ACCESS,
8 OPTION_LVDS_PROBE_PLL,
9 OPTION_REVERSE_DDC,
10 + OPTION_BIOS_HOTKEYS,
11 } RADEONOpts;
12
13 static const OptionInfoRec RADEONOptions[] = {
14 @@ -222,6 +223,7 @@ static const OptionInfoRec RADEONOptions
15 { OPTION_VGA_ACCESS, "VGAAccess", OPTV_BOOLEAN, {0}, TRUE },
16 { OPTION_LVDS_PROBE_PLL, "LVDSProbePLL", OPTV_BOOLEAN, {0}, FALSE },
17 { OPTION_REVERSE_DDC, "ReverseDDC", OPTV_BOOLEAN, {0}, FALSE },
18 + { OPTION_BIOS_HOTKEYS, "BIOSHotkeys", OPTV_BOOLEAN, {0}, FALSE },
19 { -1, NULL, OPTV_NONE, {0}, FALSE }
20 };
21
22 @@ -6899,7 +6901,18 @@ static void RADEONInitFPRegisters(ScrnIn
23 }
24 }
25
26 - if (info->IsMobility) {
27 + info->BiosHotkeys = FALSE;
28 + /*
29 + * Allow the bios to toggle outputs. see below for more.
30 + */
31 + if (xf86ReturnOptValBool(info->Options, OPTION_BIOS_HOTKEYS, FALSE)) {
32 + info->BiosHotkeys = TRUE;
33 + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BIOS HotKeys Enabled\n");
34 + } else {
35 + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "BIOS HotKeys Disabled\n");
36 + }
37 +
38 + if (info->IsMobility && (!info->BiosHotkeys)) {
39 RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
40
41 /* To work correctly with laptop hotkeys.
42 @@ -6927,6 +6940,21 @@ static void RADEONInitFPRegisters(ScrnIn
43 }
44 save->bios_4_scratch = 0x4;
45 save->bios_6_scratch = orig->bios_6_scratch | 0x40000000;
46 +
47 + } else if (info->IsMobility && (info->DisplayType == MT_LCD)) {
48 + RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
49 +
50 + /* BIOS will use this setting to reset displays upon lid close/open.
51 + * Here we let BIOS controls LCD, but the driver will control the external CRT.
52 + */
53 + if (info->MergedFB || pRADEONEnt->HasSecondary)
54 + save->bios_5_scratch = 0x01020201;
55 + else
56 + save->bios_5_scratch = orig->bios_5_scratch;
57 +
58 + save->bios_4_scratch = orig->bios_4_scratch;
59 + save->bios_6_scratch = orig->bios_6_scratch;
60 +
61 }
62
63 save->fp_crtc_h_total_disp = save->crtc_h_total_disp;
64 --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h.orig 2005-01-23 13:58:56.000000000 +0100
65 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h 2005-01-23 17:35:46.000000000 +0100
66 @@ -602,6 +602,10 @@ typedef struct {
67
68 /* special handlings for DELL triple-head server */
69 Bool IsDellServer;
70 +
71 + /* enable bios hotkey output switching */
72 + Bool BiosHotkeys;
73 +
74 } RADEONInfoRec, *RADEONInfoPtr;
75
76
77 --- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man.orig 2005-01-23 13:58:56.000000000 +0100
78 +++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man 2005-01-23 17:35:46.000000000 +0100
79 @@ -522,6 +522,13 @@ case. This is only useful for LVDS pane
80 The default is
81 .B on.
82 .TP
83 +.BI "Option \*qBIOSHotkeys\*q \*q" boolean \*q
84 +Enable BIOS hotkey output switching. This allows the BIOS to toggle outputs
85 +using hotkeys (e.g., fn-f7, etc.). Since the driver does not support ACPI,
86 +there is no way to validate modes on an output switch and the BIOS can
87 +potentially change things behind the driver's back. The default is
88 +.B off.
89 +.TP
90
91 .SH SEE ALSO
92 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)