Commit | Line | Data |
---|---|---|
f0e0dd16 RM |
1 | diff -rupN xf86-video-dove-0.3.4.orig/src/compat-api.h xf86-video-dove-0.3.4/src/compat-api.h |
2 | --- xf86-video-dove-0.3.4.orig/src/compat-api.h 1970-01-01 01:00:00.000000000 +0100 | |
3 | +++ xf86-video-dove-0.3.4/src/compat-api.h 2012-10-16 22:21:27.589861729 +0200 | |
4 | @@ -0,0 +1,99 @@ | |
5 | +/* | |
6 | + * Copyright 2012 Red Hat, Inc. | |
7 | + * | |
8 | + * Permission is hereby granted, free of charge, to any person obtaining a | |
9 | + * copy of this software and associated documentation files (the "Software"), | |
10 | + * to deal in the Software without restriction, including without limitation | |
11 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
12 | + * and/or sell copies of the Software, and to permit persons to whom the | |
13 | + * Software is furnished to do so, subject to the following conditions: | |
14 | + * | |
15 | + * The above copyright notice and this permission notice (including the next | |
16 | + * paragraph) shall be included in all copies or substantial portions of the | |
17 | + * Software. | |
18 | + * | |
19 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
20 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
21 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | |
22 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
23 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
24 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
25 | + * DEALINGS IN THE SOFTWARE. | |
26 | + * | |
27 | + * Author: Dave Airlie <airlied@redhat.com> | |
28 | + */ | |
29 | + | |
30 | +/* this file provides API compat between server post 1.13 and pre it, | |
31 | + it should be reused inside as many drivers as possible */ | |
32 | +#ifndef COMPAT_API_H | |
33 | +#define COMPAT_API_H | |
34 | + | |
35 | +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR | |
36 | +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] | |
37 | +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p | |
38 | +#endif | |
39 | + | |
40 | +#ifndef XF86_HAS_SCRN_CONV | |
41 | +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] | |
42 | +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] | |
43 | +#endif | |
44 | + | |
45 | +#ifndef XF86_SCRN_INTERFACE | |
46 | + | |
47 | +#define SCRN_ARG_TYPE int | |
48 | +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] | |
49 | + | |
50 | +#define SCREEN_ARG_TYPE int | |
51 | +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] | |
52 | + | |
53 | +#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv | |
54 | + | |
55 | +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask | |
56 | +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask | |
57 | + | |
58 | +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen | |
59 | +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen | |
60 | + | |
61 | +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags | |
62 | +#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 | |
63 | + | |
64 | +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags | |
65 | +#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 | |
66 | + | |
67 | +#define FREE_SCREEN_ARGS_DECL int arg, int flags | |
68 | + | |
69 | +#define VT_FUNC_ARGS_DECL int arg, int flags | |
70 | +#define VT_FUNC_ARGS pScrn->scrnIndex, 0 | |
71 | + | |
72 | +#define XF86_SCRN_ARG(x) ((x)->scrnIndex) | |
73 | +#else | |
74 | +#define SCRN_ARG_TYPE ScrnInfoPtr | |
75 | +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) | |
76 | + | |
77 | +#define SCREEN_ARG_TYPE ScreenPtr | |
78 | +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) | |
79 | + | |
80 | +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv | |
81 | + | |
82 | +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask | |
83 | +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask | |
84 | + | |
85 | +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen | |
86 | +#define CLOSE_SCREEN_ARGS pScreen | |
87 | + | |
88 | +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y | |
89 | +#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y | |
90 | + | |
91 | +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode | |
92 | +#define SWITCH_MODE_ARGS(arg, m) arg, m | |
93 | + | |
94 | +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg | |
95 | + | |
96 | +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg | |
97 | +#define VT_FUNC_ARGS pScrn | |
98 | + | |
99 | +#define XF86_SCRN_ARG(x) (x) | |
100 | + | |
101 | +#endif | |
102 | + | |
103 | +#endif | |
104 | diff -rupN xf86-video-dove-0.3.4.orig/src/dovefb.c xf86-video-dove-0.3.4/src/dovefb.c | |
105 | --- xf86-video-dove-0.3.4.orig/src/dovefb.c 2011-03-07 18:52:09.000000000 +0100 | |
106 | +++ xf86-video-dove-0.3.4/src/dovefb.c 2012-10-16 22:21:49.705464928 +0200 | |
107 | @@ -78,9 +78,8 @@ static Bool FBDevPciProbe(DriverPtr drv, | |
108 | struct pci_device *dev, intptr_t match_data); | |
109 | #endif | |
110 | static Bool FBDevPreInit(ScrnInfoPtr pScrn, int flags); | |
111 | -static Bool FBDevScreenInit(int Index, ScreenPtr pScreen, int argc, | |
112 | - char **argv); | |
113 | -static Bool FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen); | |
114 | +static Bool FBDevScreenInit(SCREEN_INIT_ARGS_DECL); | |
115 | +static Bool FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL); | |
116 | static void * FBDevWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, | |
117 | CARD32 *size, void *closure); | |
118 | static void FBDevPointerMoved(int index, int x, int y); | |
119 | @@ -329,9 +328,9 @@ mrvl_scn_validMode(int scrnIndex, Displa | |
120 | } | |
121 | ||
122 | Bool | |
123 | -mrvl_scn_switchMode(int scrnIndex, DisplayModePtr mode, int flags) | |
124 | +mrvl_scn_switchMode(SWITCH_MODE_ARGS_DECL) | |
125 | { | |
126 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | |
127 | + SCRN_INFO_PTR(arg); | |
128 | Bool ret; | |
129 | ||
130 | xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Preparing to switch single mode\n"); | |
131 | @@ -346,9 +345,9 @@ mrvl_scn_switchMode(int scrnIndex, Displ | |
132 | extern int mrvl_crtc_set_pos(xf86CrtcPtr crtc, int x, int y); | |
133 | ||
134 | void | |
135 | -mrvl_scn_adjustFrame(int scrnIndex, int x, int y, int flags) | |
136 | +mrvl_scn_adjustFrame(ADJUST_FRAME_ARGS_DECL) | |
137 | { | |
138 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | |
139 | + SCRN_INFO_PTR(arg); | |
140 | xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); | |
141 | xf86OutputPtr output = config->output[config->compat_output]; | |
142 | xf86CrtcPtr crtc = output->crtc; | |
143 | @@ -485,9 +484,9 @@ static Bool mrvlRestoreServerScreen(Scrn | |
144 | } | |
145 | ||
146 | Bool | |
147 | -mrvl_scn_entervt(int scrnIndex, int flags) | |
148 | +mrvl_scn_entervt(VT_FUNC_ARGS_DECL) | |
149 | { | |
150 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | |
151 | + SCRN_INFO_PTR(arg); | |
152 | MRVLGetPrivateByScrn(pScrn); | |
153 | ||
154 | xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Preparing to enter VT\n"); | |
155 | @@ -512,10 +511,10 @@ mrvl_scn_entervt(int scrnIndex, int flag | |
156 | ||
157 | // | |
158 | void | |
159 | -mrvl_scn_leavevt(int scrnIndex, int flags) | |
160 | +mrvl_scn_leavevt(VT_FUNC_ARGS_DECL) | |
161 | { | |
162 | + SCRN_INFO_PTR(arg); | |
163 | int i; | |
164 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | |
165 | xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); | |
166 | MRVLGetPrivateByScrn(pScrn); | |
167 | ||
168 | @@ -1252,9 +1251,9 @@ FBDevShadowInit(ScreenPtr pScreen) | |
169 | ||
170 | ||
171 | static Bool | |
172 | -FBDevScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) | |
173 | +FBDevScreenInit(SCREEN_INIT_ARGS_DECL) | |
174 | { | |
175 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | |
176 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | |
177 | FBDevPtr fPtr = FBDEVPTR(pScrn); | |
178 | VisualPtr visual; | |
179 | int init_picture = 0; | |
180 | @@ -1281,7 +1280,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
181 | #endif | |
182 | ||
183 | if (NULL == (fPtr->fbmem = fbdevHWMapVidmem(pScrn))) { | |
184 | - xf86DrvMsg(scrnIndex,X_ERROR,"mapping of video memory" | |
185 | + xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"mapping of video memory" | |
186 | " failed\n"); | |
187 | return FALSE; | |
188 | } | |
189 | @@ -1292,17 +1291,17 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
190 | fbdevHWSave(pScrn); | |
191 | ||
192 | if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) { | |
193 | - xf86DrvMsg(scrnIndex,X_ERROR,"mode initialization failed\n"); | |
194 | + xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"mode initialization failed\n"); | |
195 | return FALSE; | |
196 | } | |
197 | fbdevHWSaveScreen(pScreen, SCREEN_SAVER_ON); | |
198 | - fbdevHWAdjustFrame(scrnIndex,0,0,0); | |
199 | + fbdevHWAdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0)); | |
200 | ||
201 | /* mi layer */ | |
202 | miClearVisualTypes(); | |
203 | if (pScrn->bitsPerPixel > 8) { | |
204 | if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) { | |
205 | - xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed" | |
206 | + xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed" | |
207 | " for %d bits per pixel [1]\n", | |
208 | pScrn->bitsPerPixel); | |
209 | return FALSE; | |
210 | @@ -1311,14 +1310,14 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
211 | if (!miSetVisualTypes(pScrn->depth, | |
212 | miGetDefaultVisualMask(pScrn->depth), | |
213 | pScrn->rgbBits, pScrn->defaultVisual)) { | |
214 | - xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed" | |
215 | + xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed" | |
216 | " for %d bits per pixel [2]\n", | |
217 | pScrn->bitsPerPixel); | |
218 | return FALSE; | |
219 | } | |
220 | } | |
221 | if (!miSetPixmapDepths()) { | |
222 | - xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n"); | |
223 | + xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n"); | |
224 | return FALSE; | |
225 | } | |
226 | ||
227 | @@ -1334,7 +1333,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
228 | (pScrn->bitsPerPixel / 8); | |
229 | ||
230 | if (pScrn->displayWidth != pScrn->virtualX) { | |
231 | - xf86DrvMsg(scrnIndex, X_INFO, | |
232 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, | |
233 | "Pitch updated to %d after ModeInit\n", | |
234 | pScrn->displayWidth); | |
235 | } | |
236 | @@ -1367,14 +1366,14 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
237 | case FBDEVHW_PLANES: | |
238 | if (fPtr->rotate) | |
239 | { | |
240 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
241 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
242 | "internal error: rotate not supported for afb\n"); | |
243 | ret = FALSE; | |
244 | break; | |
245 | } | |
246 | if (fPtr->shadowFB) | |
247 | { | |
248 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
249 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
250 | "internal error: shadow framebuffer not supported" | |
251 | " for afb\n"); | |
252 | ret = FALSE; | |
253 | @@ -1399,7 +1398,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
254 | init_picture = 1; | |
255 | break; | |
256 | default: | |
257 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
258 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
259 | "internal error: invalid number of bits per" | |
260 | " pixel (%d) encountered in" | |
261 | " FBDevScreenInit()\n", pScrn->bitsPerPixel); | |
262 | @@ -1410,7 +1409,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
263 | case FBDEVHW_INTERLEAVED_PLANES: | |
264 | /* This should never happen ... | |
265 | * we should check for this much much earlier ... */ | |
266 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
267 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
268 | "internal error: interleaved planes are not yet " | |
269 | "supported by the fbdev driver\n"); | |
270 | ret = FALSE; | |
271 | @@ -1418,20 +1417,20 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
272 | case FBDEVHW_TEXT: | |
273 | /* This should never happen ... | |
274 | * we should check for this much much earlier ... */ | |
275 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
276 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
277 | "internal error: text mode is not supported by the " | |
278 | "fbdev driver\n"); | |
279 | ret = FALSE; | |
280 | break; | |
281 | case FBDEVHW_VGA_PLANES: | |
282 | /* Not supported yet */ | |
283 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
284 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
285 | "internal error: EGA/VGA Planes are not yet " | |
286 | "supported by the fbdev driver\n"); | |
287 | ret = FALSE; | |
288 | break; | |
289 | default: | |
290 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
291 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
292 | "internal error: unrecognised hardware type (%d) " | |
293 | "encountered in FBDevScreenInit()\n", type); | |
294 | ret = FALSE; | |
295 | @@ -1490,7 +1489,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
296 | pScrn->vtSema = TRUE; | |
297 | ||
298 | if (fPtr->shadowFB && !FBDevShadowInit(pScreen)) { | |
299 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
300 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
301 | "shadow framebuffer initialization failed\n"); | |
302 | return FALSE; | |
303 | } | |
304 | @@ -1498,12 +1497,12 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
305 | if (!fPtr->rotate) | |
306 | FBDevDGAInit(pScrn, pScreen); | |
307 | else { | |
308 | - xf86DrvMsg(scrnIndex, X_INFO, "display rotated; disabling DGA\n"); | |
309 | - xf86DrvMsg(scrnIndex, X_INFO, "using driver rotation; disabling " | |
310 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "display rotated; disabling DGA\n"); | |
311 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "using driver rotation; disabling " | |
312 | "XRandR\n"); | |
313 | xf86DisableRandR(); | |
314 | if (pScrn->bitsPerPixel == 24) | |
315 | - xf86DrvMsg(scrnIndex, X_WARNING, "rotation might be broken at 24 " | |
316 | + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "rotation might be broken at 24 " | |
317 | "bits per pixel\n"); | |
318 | } | |
319 | ||
320 | @@ -1521,7 +1520,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
321 | #ifdef USE_AFB | |
322 | case FBDEVHW_PLANES: | |
323 | if (!afbCreateDefColormap(pScreen)) { | |
324 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
325 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
326 | "internal error: afbCreateDefColormap " | |
327 | "failed in FBDevScreenInit()\n"); | |
328 | return FALSE; | |
329 | @@ -1530,29 +1529,29 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
330 | #endif | |
331 | case FBDEVHW_PACKED_PIXELS: | |
332 | if (!miCreateDefColormap(pScreen)) { | |
333 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
334 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
335 | "internal error: miCreateDefColormap failed " | |
336 | "in FBDevScreenInit()\n"); | |
337 | return FALSE; | |
338 | } | |
339 | break; | |
340 | case FBDEVHW_INTERLEAVED_PLANES: | |
341 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
342 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
343 | "internal error: interleaved planes are not yet " | |
344 | "supported by the fbdev driver\n"); | |
345 | return FALSE; | |
346 | case FBDEVHW_TEXT: | |
347 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
348 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
349 | "internal error: text mode is not supported by " | |
350 | "the fbdev driver\n"); | |
351 | return FALSE; | |
352 | case FBDEVHW_VGA_PLANES: | |
353 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
354 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
355 | "internal error: EGA/VGA planes are not yet " | |
356 | "supported by the fbdev driver\n"); | |
357 | return FALSE; | |
358 | default: | |
359 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
360 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
361 | "internal error: unrecognised fbdev hardware type " | |
362 | "(%d) encountered in FBDevScreenInit()\n", type); | |
363 | return FALSE; | |
364 | @@ -1574,7 +1573,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
365 | #if MRVL_SUPPORT_EXA | |
366 | if (fPtr->UseExa) | |
367 | { | |
368 | - xf86DrvMsg(scrnIndex, X_INFO, | |
369 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, | |
370 | "Start to initialize vivnate hal module\n"); | |
371 | fPtr->UseGPU = TRUE; | |
372 | } | |
373 | @@ -1588,11 +1587,11 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
374 | // Set up hal layer for Exa and Xv. | |
375 | if( ! mrvlExaInitHal(pScreen) ) | |
376 | { | |
377 | - xf86DrvMsg(scrnIndex, X_ERROR, | |
378 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | |
379 | "Failed to initialize vivnate hal module\n"); | |
380 | return FALSE; | |
381 | } | |
382 | - xf86DrvMsg(scrnIndex, X_INFO, | |
383 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, | |
384 | "Initialize vivnate hal module successfully\n"); | |
385 | } | |
386 | #endif | |
387 | @@ -1647,11 +1646,11 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
388 | /* Initialize Xv support. */ | |
389 | DovefbXVInitVideo (pScreen); | |
390 | ||
391 | - xf86DrvMsg(scrnIndex, X_INFO, "Xv acceleration is loaded successfully\n"); | |
392 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv acceleration is loaded successfully\n"); | |
393 | } | |
394 | else | |
395 | { | |
396 | - xf86DrvMsg(scrnIndex, X_INFO, "Xv acceleration is disabled\n"); | |
397 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Xv acceleration is disabled\n"); | |
398 | } | |
399 | ||
400 | /* Initialize hw cursor. */ | |
401 | @@ -1660,7 +1659,7 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
402 | xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Can not initialize h/w cursor\n"); | |
403 | return FALSE; | |
404 | } | |
405 | - xf86DrvMsg(scrnIndex, X_INFO, "HW cursor init okay.\n"); | |
406 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "HW cursor init okay.\n"); | |
407 | } | |
408 | ||
409 | /* ----------------------------------------- */ | |
410 | @@ -1682,18 +1681,18 @@ FBDevScreenInit(int scrnIndex, ScreenPtr | |
411 | //pScrn->modes = xf86CVTMode(1024, 768, 60.0, FALSE, FALSE); | |
412 | #endif | |
413 | ||
414 | - xf86DrvMsg(scrnIndex, X_INFO, "Leave FBDevScreenInit().\n"); | |
415 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Leave FBDevScreenInit().\n"); | |
416 | ||
417 | return TRUE; | |
418 | } | |
419 | ||
420 | static Bool | |
421 | -FBDevCloseScreen(int scrnIndex, ScreenPtr pScreen) | |
422 | +FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL) | |
423 | { | |
424 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | |
425 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | |
426 | FBDevPtr fPtr = FBDEVPTR(pScrn); | |
427 | - | |
428 | - xf86DrvMsg(scrnIndex, X_INFO, "FBDevCloseScreen.\n"); | |
429 | + | |
430 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBDevCloseScreen.\n"); | |
431 | fbdevHWRestore(pScrn); | |
432 | fbdevHWUnmapVidmem(pScrn); | |
433 | if (fPtr->shadow) { | |
434 | @@ -1750,7 +1749,7 @@ FBDevCloseScreen(int scrnIndex, ScreenPt | |
435 | /* Restore resolution for fb console */ | |
436 | mrvlRestoreFBScreen(pScrn); | |
437 | ||
438 | - return (*pScreen->CloseScreen)(scrnIndex, pScreen); | |
439 | + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); | |
440 | } | |
441 | ||
442 | ||
443 | @@ -1859,9 +1858,9 @@ FBDevDGASetMode(ScrnInfoPtr pScrn, DGAMo | |
444 | frameY0 = pScrn->frameY0; | |
445 | } | |
446 | ||
447 | - if (!(*pScrn->SwitchMode)(scrnIdx, pMode, 0)) | |
448 | + if (!(*pScrn->SwitchMode)(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode))) | |
449 | return FALSE; | |
450 | - (*pScrn->AdjustFrame)(scrnIdx, frameX0, frameY0, 0); | |
451 | + (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, frameX0, frameY0)); | |
452 | ||
453 | return TRUE; | |
454 | } | |
455 | @@ -1869,7 +1868,7 @@ FBDevDGASetMode(ScrnInfoPtr pScrn, DGAMo | |
456 | static void | |
457 | FBDevDGASetViewport(ScrnInfoPtr pScrn, int x, int y, int flags) | |
458 | { | |
459 | - (*pScrn->AdjustFrame)(pScrn->pScreen->myNum, x, y, flags); | |
460 | + (*pScrn->AdjustFrame)(ADJUST_FRAME_ARGS(pScrn, x, y)); | |
461 | } | |
462 | ||
463 | static int | |
464 | diff -rupN xf86-video-dove-0.3.4.orig/src/dovefb_driver.h xf86-video-dove-0.3.4/src/dovefb_driver.h | |
465 | --- xf86-video-dove-0.3.4.orig/src/dovefb_driver.h 2011-03-07 18:52:09.000000000 +0100 | |
466 | +++ xf86-video-dove-0.3.4/src/dovefb_driver.h 2012-10-16 22:21:27.589861730 +0200 | |
467 | @@ -40,6 +40,8 @@ | |
468 | ||
469 | #include <linux/fb.h> | |
470 | ||
471 | +#include "compat-api.h" | |
472 | + | |
473 | /* Platform ID*/ | |
474 | #define MRVL_DOVE 1 | |
475 | #define MRVL_MMP2 2 |