Added
Link Here
|
1 |
Revert https://gitlab.freedesktop.org/xorg/xserver/commit/dd00e5466a0e |
2 |
|
3 |
/usr/local/lib/xorg/modules/drivers/nvidia_drv.so: Undefined symbol "xf86DisableRandR" |
4 |
|
5 |
--- hw/xfree86/common/xf86.h.orig 2020-01-13 22:57:05 UTC |
6 |
+++ hw/xfree86/common/xf86.h |
7 |
@@ -305,6 +305,8 @@ extern _X_EXPORT Bool |
8 |
xf86GetModInDevEnabled(void); |
9 |
extern _X_EXPORT Bool |
10 |
xf86GetAllowMouseOpenFail(void); |
11 |
+extern _X_EXPORT void |
12 |
+xf86DisableRandR(void); |
13 |
extern _X_EXPORT CARD32 |
14 |
xorgGetVersion(void); |
15 |
extern _X_EXPORT CARD32 |
16 |
--- hw/xfree86/common/xf86Config.c.orig 2020-01-13 22:57:05 UTC |
17 |
+++ hw/xfree86/common/xf86Config.c |
18 |
@@ -634,6 +634,7 @@ typedef enum { |
19 |
FLAG_XINERAMA, |
20 |
FLAG_LOG, |
21 |
FLAG_RENDER_COLORMAP_MODE, |
22 |
+ FLAG_RANDR, |
23 |
FLAG_IGNORE_ABI, |
24 |
FLAG_ALLOW_EMPTY_INPUT, |
25 |
FLAG_USE_DEFAULT_FONT_PATH, |
26 |
@@ -683,6 +684,8 @@ static OptionInfoRec FlagOptions[] = { |
27 |
{0}, FALSE}, |
28 |
{FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING, |
29 |
{0}, FALSE}, |
30 |
+ {FLAG_RANDR, "RandR", OPTV_BOOLEAN, |
31 |
+ {0}, FALSE}, |
32 |
{FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN, |
33 |
{0}, FALSE}, |
34 |
{FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN, |
35 |
@@ -826,6 +829,15 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86Opti |
36 |
} |
37 |
} |
38 |
} |
39 |
+ |
40 |
+#ifdef RANDR |
41 |
+ xf86Info.disableRandR = FALSE; |
42 |
+ xf86Info.randRFrom = X_DEFAULT; |
43 |
+ if (xf86GetOptValBool(FlagOptions, FLAG_RANDR, &value)) { |
44 |
+ xf86Info.disableRandR = !value; |
45 |
+ xf86Info.randRFrom = X_CONFIG; |
46 |
+ } |
47 |
+#endif |
48 |
|
49 |
#ifdef GLXEXT |
50 |
xf86Info.glxVisuals = XF86_GlxVisualsTypical; |
51 |
--- hw/xfree86/common/xf86Globals.c.orig 2020-01-13 22:57:05 UTC |
52 |
+++ hw/xfree86/common/xf86Globals.c |
53 |
@@ -119,6 +119,8 @@ xf86InfoRec xf86Info = { |
54 |
.miscModInDevEnabled = TRUE, |
55 |
.miscModInDevAllowNonLocal = FALSE, |
56 |
.pmFlag = TRUE, |
57 |
+ .disableRandR = FALSE, |
58 |
+ .randRFrom = X_DEFAULT, |
59 |
#if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) || \ |
60 |
defined(CONFIG_DEVD) |
61 |
.forceInputDevices = FALSE, |
62 |
--- hw/xfree86/common/xf86Helper.c.orig 2020-01-13 22:57:05 UTC |
63 |
+++ hw/xfree86/common/xf86Helper.c |
64 |
@@ -1458,6 +1458,13 @@ xf86GetAllowMouseOpenFail(void) |
65 |
return xf86Info.allowMouseOpenFail; |
66 |
} |
67 |
|
68 |
+void |
69 |
+xf86DisableRandR(void) |
70 |
+{ |
71 |
+ xf86Info.disableRandR = TRUE; |
72 |
+ xf86Info.randRFrom = X_PROBED; |
73 |
+} |
74 |
+ |
75 |
CARD32 |
76 |
xf86GetModuleVersion(void *module) |
77 |
{ |
78 |
--- hw/xfree86/common/xf86Init.c.orig 2020-01-13 22:57:05 UTC |
79 |
+++ hw/xfree86/common/xf86Init.c |
80 |
@@ -77,7 +77,6 @@ |
81 |
#include "xf86Xinput.h" |
82 |
#include "xf86InPriv.h" |
83 |
#include "picturestr.h" |
84 |
-#include "randrstr.h" |
85 |
#include "glxvndabi.h" |
86 |
#include "xf86Bus.h" |
87 |
#ifdef XSERVER_LIBPCIACCESS |
88 |
@@ -303,16 +302,6 @@ xf86ScreenInit(ScreenPtr pScreen, int argc, char **arg |
89 |
return pScrn->ScreenInit (pScreen, argc, argv); |
90 |
} |
91 |
|
92 |
-static void |
93 |
-xf86EnsureRANDR(ScreenPtr pScreen) |
94 |
-{ |
95 |
-#ifdef RANDR |
96 |
- if (!dixPrivateKeyRegistered(rrPrivKey) || |
97 |
- !rrGetScrPriv(pScreen)) |
98 |
- xf86RandRInit(pScreen); |
99 |
-#endif |
100 |
-} |
101 |
- |
102 |
/* |
103 |
* InitOutput -- |
104 |
* Initialize screenInfo for all actually accessible framebuffers. |
105 |
@@ -729,12 +718,12 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char ** |
106 |
SubPixelHorizontalRGB : SubPixelNone) : |
107 |
SubPixelUnknown); |
108 |
} |
109 |
- |
110 |
- /* |
111 |
- * If the driver hasn't set up its own RANDR support, install the |
112 |
- * fallback support. |
113 |
- */ |
114 |
- xf86EnsureRANDR(xf86Screens[i]->pScreen); |
115 |
+#ifdef RANDR |
116 |
+ if (!xf86Info.disableRandR) |
117 |
+ xf86RandRInit(screenInfo.screens[scr_index]); |
118 |
+ xf86Msg(xf86Info.randRFrom, "RandR %s\n", |
119 |
+ xf86Info.disableRandR ? "disabled" : "enabled"); |
120 |
+#endif |
121 |
} |
122 |
|
123 |
for (i = 0; i < xf86NumGPUScreens; i++) { |
124 |
--- hw/xfree86/common/xf86Mode.c.orig 2020-01-13 22:57:05 UTC |
125 |
+++ hw/xfree86/common/xf86Mode.c |
126 |
@@ -1644,8 +1644,12 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr ava |
127 |
} |
128 |
|
129 |
/* Lookup each mode */ |
130 |
+#ifdef RANDR |
131 |
+ if (!xf86Info.disableRandR |
132 |
#ifdef PANORAMIX |
133 |
- if (noPanoramiXExtension) |
134 |
+ && noPanoramiXExtension |
135 |
+#endif |
136 |
+ ) |
137 |
validateAllDefaultModes = TRUE; |
138 |
#endif |
139 |
|
140 |
--- hw/xfree86/common/xf86Privstr.h.orig 2020-01-13 22:57:05 UTC |
141 |
+++ hw/xfree86/common/xf86Privstr.h |
142 |
@@ -81,6 +81,8 @@ typedef struct { |
143 |
Bool miscModInDevAllowNonLocal; |
144 |
Bool useSIGIO; /* Use SIGIO for handling DRI1 swaps */ |
145 |
Bool pmFlag; |
146 |
+ Bool disableRandR; |
147 |
+ MessageType randRFrom; |
148 |
MessageType iglxFrom; |
149 |
XF86_GlxVisuals glxVisuals; |
150 |
MessageType glxVisualsFrom; |
151 |
--- hw/xfree86/modes/xf86Crtc.c.orig 2020-01-13 22:57:05 UTC |
152 |
+++ hw/xfree86/modes/xf86Crtc.c |
153 |
@@ -807,6 +807,9 @@ xf86CrtcScreenInit(ScreenPtr screen) |
154 |
int c; |
155 |
|
156 |
/* Rotation */ |
157 |
+ xf86DrvMsg(scrn->scrnIndex, X_INFO, |
158 |
+ "RandR 1.2 enabled, ignore the following RandR disabled message.\n"); |
159 |
+ xf86DisableRandR(); /* Disable old RandR extension support */ |
160 |
xf86RandR12Init(screen); |
161 |
|
162 |
/* support all rotations if every crtc has the shadow alloc funcs */ |