summaryrefslogtreecommitdiff
path: root/pcr/xf86-video-fbturbo-git/0001-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch
blob: f3da538a2dc7d9fc851d2e490910458d367b38ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
From 5152fea67554f9fe8a6fcd194f88e31a47ec1381 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Wed, 21 May 2014 09:49:56 -0400
Subject: [PATCH 1/2] Use own thunk functions instead of fbdevHW*Weak

I plan to remove the Weak functions from a future server.

Signed-off-by: Adam Jackson <ajax@redhat.com>
---
 src/fbdev.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 71 insertions(+), 15 deletions(-)

diff --git a/src/fbdev.c b/src/fbdev.c
index 2bbee6e..23ec855 100644
--- a/src/fbdev.c
+++ b/src/fbdev.c
@@ -269,6 +269,35 @@ FBDevIdentify(int flags)
 	xf86PrintChipsets(FBDEV_NAME, "driver for framebuffer", FBDevChipsets);
 }
 
+static Bool
+fbdevSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode)
+{
+    return fbdevHWSwitchMode(pScrn, mode);
+}
+
+static void
+fbdevAdjustFrame(ScrnInfoPtr pScrn, int x, int y)
+{
+    fbdevHWAdjustFrame(pScrn, x, y);
+}
+
+static Bool
+fbdevEnterVT(ScrnInfoPtr pScrn)
+{
+    return fbdevHWEnterVT(pScrn);
+}
+
+static void
+fbdevLeaveVT(ScrnInfoPtr pScrn)
+{
+    fbdevHWLeaveVT(pScrn);
+}
+
+static ModeStatus
+fbdevValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
+{
+    return fbdevHWValidMode(pScrn, mode, verbose, flags);
+}
 
 #ifdef XSERVER_LIBPCIACCESS
 static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
@@ -294,11 +323,11 @@ static Bool FBDevPciProbe(DriverPtr drv, int entity_num,
 	    pScrn->Probe         = FBDevProbe;
 	    pScrn->PreInit       = FBDevPreInit;
 	    pScrn->ScreenInit    = FBDevScreenInit;
-	    pScrn->SwitchMode    = fbdevHWSwitchModeWeak();
-	    pScrn->AdjustFrame   = fbdevHWAdjustFrameWeak();
-	    pScrn->EnterVT       = fbdevHWEnterVTWeak();
-	    pScrn->LeaveVT       = fbdevHWLeaveVTWeak();
-	    pScrn->ValidMode     = fbdevHWValidModeWeak();
+	    pScrn->SwitchMode    = fbdevSwitchMode;
+	    pScrn->AdjustFrame   = fbdevAdjustFrame;
+	    pScrn->EnterVT       = fbdevEnterVT;
+	    pScrn->LeaveVT       = fbdevLeaveVT;
+	    pScrn->ValidMode     = fbdevValidMode;
 
 	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
 		       "claimed PCI slot %d@%d:%d:%d\n", 
@@ -411,11 +440,11 @@ FBDevProbe(DriverPtr drv, int flags)
 		    pScrn->Probe         = FBDevProbe;
 		    pScrn->PreInit       = FBDevPreInit;
 		    pScrn->ScreenInit    = FBDevScreenInit;
-		    pScrn->SwitchMode    = fbdevHWSwitchModeWeak();
-		    pScrn->AdjustFrame   = fbdevHWAdjustFrameWeak();
-		    pScrn->EnterVT       = fbdevHWEnterVTWeak();
-		    pScrn->LeaveVT       = fbdevHWLeaveVTWeak();
-		    pScrn->ValidMode     = fbdevHWValidModeWeak();
+		    pScrn->SwitchMode    = fbdevSwitchMode;
+		    pScrn->AdjustFrame   = fbdevAdjustFrame;
+		    pScrn->EnterVT       = fbdevEnterVT;
+		    pScrn->LeaveVT       = fbdevLeaveVT;
+		    pScrn->ValidMode     = fbdevValidMode;
 		    
 		    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 			       "using %s\n", dev ? dev : "default device");
@@ -656,6 +685,17 @@ FBDevPreInit(ScrnInfoPtr pScrn, int flags)
 	return TRUE;
 }
 
+static void
+fbdevUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+    shadowUpdateRotatePacked(pScreen, pBuf);
+}
+
+static void
+fbdevUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf)
+{
+    shadowUpdatePacked(pScreen, pBuf);
+}
 
 static Bool
 FBDevCreateScreenResources(ScreenPtr pScreen)
@@ -675,7 +715,7 @@ FBDevCreateScreenResources(ScreenPtr pScreen)
     pPixmap = pScreen->GetScreenPixmap(pScreen);
 
     if (!shadowAdd(pScreen, pPixmap, fPtr->rotate ?
-		   shadowUpdateRotatePackedWeak() : shadowUpdatePackedWeak(),
+		   fbdevUpdateRotatePacked : fbdevUpdatePacked,
 		   FBDevWindowLinear, fPtr->rotate, NULL)) {
 	return FALSE;
     }
@@ -699,6 +739,23 @@ FBDevShadowInit(ScreenPtr pScreen)
     return TRUE;
 }
 
+static void
+fbdevLoadPalette(ScrnInfoPtr pScrn, int num, int *i, LOCO *col, VisualPtr pVis)
+{
+    fbdevHWLoadPalette(pScrn, num, i, col, pVis);
+}
+
+static void
+fbdevDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
+{
+    fbdevHWDPMSSet(pScrn, mode, flags);
+}
+
+static Bool
+fbdevSaveScreen(ScreenPtr pScreen, int mode)
+{
+    return fbdevHWSaveScreen(pScreen, mode);
+}
 
 static Bool
 FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
@@ -1025,13 +1082,12 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL)
 		return FALSE;
 	}
 	flags = CMAP_PALETTED_TRUECOLOR;
-	if(!xf86HandleColormaps(pScreen, 256, 8, fbdevHWLoadPaletteWeak(), 
-				NULL, flags))
+	if(!xf86HandleColormaps(pScreen, 256, 8, fbdevLoadPalette, NULL, flags))
 		return FALSE;
 
-	xf86DPMSInit(pScreen, fbdevHWDPMSSetWeak(), 0);
+	xf86DPMSInit(pScreen, fbdevDPMSSet, 0);
 
-	pScreen->SaveScreen = fbdevHWSaveScreenWeak();
+	pScreen->SaveScreen = fbdevSaveScreen;
 
 	/* Wrap the current CloseScreen function */
 	fPtr->CloseScreen = pScreen->CloseScreen;
-- 
2.16.2