diff options
| -rw-r--r-- | meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-compile.patch | 381 | ||||
| -rw-r--r-- | meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb | 1 |
2 files changed, 382 insertions, 0 deletions
diff --git a/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-compile.patch b/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-compile.patch new file mode 100644 index 000000000..d92acce95 --- /dev/null +++ b/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-compile.patch | |||
| @@ -0,0 +1,381 @@ | |||
| 1 | This patch handles changes in the X server API which appeared in version 1.13 | ||
| 2 | The changes should be backwards compatible so this driver still works in earlier | ||
| 3 | versions of the X server. | ||
| 4 | |||
| 5 | Upstream-Status: Pending | ||
| 6 | |||
| 7 | Index: xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_dri.h | ||
| 8 | =================================================================== | ||
| 9 | --- xserver-xorg-video-imx-viv-12.09.01.orig/src/vivante_fbdev/vivante_dri.h | ||
| 10 | +++ xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_dri.h | ||
| 11 | @@ -67,7 +67,7 @@ typedef struct _vvtDeviceInfoRec { | ||
| 12 | } vvtDeviceInfo; | ||
| 13 | |||
| 14 | Bool VivDRIScreenInit(ScreenPtr pScreen); | ||
| 15 | -void VivDRICloseScreen(ScreenPtr pScreen); | ||
| 16 | +void VivDRICloseScreen(CLOSE_SCREEN_ARGS_DECL); | ||
| 17 | Bool VivDRIFinishScreenInit(ScreenPtr pScreen); | ||
| 18 | |||
| 19 | #endif /* _VIVANTE_DRI_H_ */ | ||
| 20 | Index: xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_fbdev_driver.c | ||
| 21 | =================================================================== | ||
| 22 | --- xserver-xorg-video-imx-viv-12.09.01.orig/src/vivante_fbdev/vivante_fbdev_driver.c | ||
| 23 | +++ xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_fbdev_driver.c | ||
| 24 | @@ -19,7 +19,6 @@ | ||
| 25 | *****************************************************************************/ | ||
| 26 | |||
| 27 | |||
| 28 | - | ||
| 29 | #include "vivante_common.h" | ||
| 30 | #include "vivante.h" | ||
| 31 | #include "vivante_exa.h" | ||
| 32 | @@ -54,9 +53,8 @@ static const OptionInfoRec *VivAvailable | ||
| 33 | static void VivIdentify(int flags); | ||
| 34 | static Bool VivProbe(DriverPtr drv, int flags); | ||
| 35 | static Bool VivPreInit(ScrnInfoPtr pScrn, int flags); | ||
| 36 | -static Bool VivScreenInit(int Index, ScreenPtr pScreen, int argc, | ||
| 37 | - char **argv); | ||
| 38 | -static Bool VivCloseScreen(int scrnIndex, ScreenPtr pScreen); | ||
| 39 | +static Bool VivScreenInit(SCREEN_INIT_ARGS_DECL); | ||
| 40 | +static Bool VivCloseScreen(CLOSE_SCREEN_ARGS_DECL); | ||
| 41 | static Bool VivDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, | ||
| 42 | pointer ptr); | ||
| 43 | |||
| 44 | @@ -178,7 +176,7 @@ VivSetup(pointer module, pointer opts, i | ||
| 45 | |||
| 46 | static Bool InitExaLayer(ScreenPtr pScreen) { | ||
| 47 | ExaDriverPtr pExa; | ||
| 48 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 49 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 50 | VivPtr pViv = GET_VIV_PTR(pScrn); | ||
| 51 | |||
| 52 | TRACE_ENTER(); | ||
| 53 | @@ -274,7 +272,7 @@ static Bool InitExaLayer(ScreenPtr pScre | ||
| 54 | } | ||
| 55 | |||
| 56 | static Bool DestroyExaLayer(ScreenPtr pScreen) { | ||
| 57 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 58 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 59 | VivPtr pViv = GET_VIV_PTR(pScrn); | ||
| 60 | TRACE_ENTER(); | ||
| 61 | xf86DrvMsg(pScreen->myNum, X_INFO, "Shutdown EXA\n"); | ||
| 62 | @@ -590,7 +588,7 @@ VivPreInit(ScrnInfoPtr pScrn, int flags) | ||
| 63 | static Bool | ||
| 64 | VivCreateScreenResources(ScreenPtr pScreen) { | ||
| 65 | PixmapPtr pPixmap; | ||
| 66 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 67 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 68 | VivPtr fPtr = GET_VIV_PTR(pScrn); | ||
| 69 | Bool ret; | ||
| 70 | |||
| 71 | @@ -612,8 +610,8 @@ VivCreateScreenResources(ScreenPtr pScre | ||
| 72 | } | ||
| 73 | |||
| 74 | static Bool | ||
| 75 | -VivScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) { | ||
| 76 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 77 | +VivScreenInit(SCREEN_INIT_ARGS_DECL) { | ||
| 78 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 79 | VivPtr fPtr = GET_VIV_PTR(pScrn); | ||
| 80 | VisualPtr visual; | ||
| 81 | int init_picture = 0; | ||
| 82 | @@ -631,7 +629,7 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 83 | |||
| 84 | /*Mapping the Video memory*/ | ||
| 85 | if (NULL == (fPtr->mFB.mFBMemory = fbdevHWMapVidmem(pScrn))) { | ||
| 86 | - xf86DrvMsg(scrnIndex, X_ERROR, "mapping of video memory" | ||
| 87 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mapping of video memory" | ||
| 88 | " failed\n"); | ||
| 89 | TRACE_EXIT(FALSE); | ||
| 90 | } | ||
| 91 | @@ -647,11 +645,11 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 92 | |||
| 93 | /*Init the hardware in current mode*/ | ||
| 94 | if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) { | ||
| 95 | - xf86DrvMsg(scrnIndex, X_ERROR, "mode initialization failed\n"); | ||
| 96 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mode initialization failed\n"); | ||
| 97 | TRACE_EXIT(FALSE); | ||
| 98 | } | ||
| 99 | fbdevHWSaveScreen(pScreen, SCREEN_SAVER_ON); | ||
| 100 | - fbdevHWAdjustFrame(scrnIndex, 0, 0, 0); | ||
| 101 | + fbdevHWAdjustFrame(FBDEVHWADJUSTFRAME_ARGS(0, 0)); | ||
| 102 | |||
| 103 | |||
| 104 | |||
| 105 | @@ -659,7 +657,7 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 106 | miClearVisualTypes(); | ||
| 107 | if (pScrn->bitsPerPixel > 8) { | ||
| 108 | if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) { | ||
| 109 | - xf86DrvMsg(scrnIndex, X_ERROR, "visual type setup failed" | ||
| 110 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "visual type setup failed" | ||
| 111 | " for %d bits per pixel [1]\n", | ||
| 112 | pScrn->bitsPerPixel); | ||
| 113 | TRACE_EXIT(FALSE); | ||
| 114 | @@ -668,14 +666,14 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 115 | if (!miSetVisualTypes(pScrn->depth, | ||
| 116 | miGetDefaultVisualMask(pScrn->depth), | ||
| 117 | pScrn->rgbBits, pScrn->defaultVisual)) { | ||
| 118 | - xf86DrvMsg(scrnIndex, X_ERROR, "visual type setup failed" | ||
| 119 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "visual type setup failed" | ||
| 120 | " for %d bits per pixel [2]\n", | ||
| 121 | pScrn->bitsPerPixel); | ||
| 122 | TRACE_EXIT(FALSE); | ||
| 123 | } | ||
| 124 | } | ||
| 125 | if (!miSetPixmapDepths()) { | ||
| 126 | - xf86DrvMsg(scrnIndex, X_ERROR, "pixmap depth setup failed\n"); | ||
| 127 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "pixmap depth setup failed\n"); | ||
| 128 | return FALSE; | ||
| 129 | } | ||
| 130 | |||
| 131 | @@ -684,14 +682,14 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 132 | pScrn->displayWidth = fbdevHWGetLineLength(pScrn) / | ||
| 133 | (pScrn->bitsPerPixel / 8); | ||
| 134 | if (pScrn->displayWidth != pScrn->virtualX) { | ||
| 135 | - xf86DrvMsg(scrnIndex, X_INFO, | ||
| 136 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, | ||
| 137 | "Pitch updated to %d after ModeInit\n", | ||
| 138 | pScrn->displayWidth); | ||
| 139 | } | ||
| 140 | /*Logical start address*/ | ||
| 141 | fPtr->mFB.mFBStart = fPtr->mFB.mFBMemory + fPtr->mFB.mFBOffset; | ||
| 142 | |||
| 143 | - xf86DrvMsg(scrnIndex, X_INFO, | ||
| 144 | + xf86DrvMsg(pScrn->scrnIndex, X_INFO, | ||
| 145 | "FB Start = %p FB Base = %p FB Offset = %p\n", | ||
| 146 | fPtr->mFB.mFBStart, fPtr->mFB.mFBMemory, fPtr->mFB.mFBOffset); | ||
| 147 | |||
| 148 | @@ -708,7 +706,7 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 149 | init_picture = 1; | ||
| 150 | break; | ||
| 151 | default: | ||
| 152 | - xf86DrvMsg(scrnIndex, X_ERROR, | ||
| 153 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
| 154 | "internal error: invalid number of bits per" | ||
| 155 | " pixel (%d) encountered in" | ||
| 156 | " VivScreenInit()\n", pScrn->bitsPerPixel); | ||
| 157 | @@ -740,7 +738,7 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 158 | if (fPtr->mFakeExa.mUseExaFlag) { | ||
| 159 | TRACE_INFO("Loading EXA"); | ||
| 160 | if (!InitExaLayer(pScreen)) { | ||
| 161 | - xf86DrvMsg(scrnIndex, X_ERROR, | ||
| 162 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
| 163 | "internal error: initExaLayer failed " | ||
| 164 | "in VivScreenInit()\n"); | ||
| 165 | } | ||
| 166 | @@ -759,7 +757,7 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 167 | |||
| 168 | /* colormap */ | ||
| 169 | if (!miCreateDefColormap(pScreen)) { | ||
| 170 | - xf86DrvMsg(scrnIndex, X_ERROR, | ||
| 171 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
| 172 | "internal error: miCreateDefColormap failed " | ||
| 173 | "in VivScreenInit()\n"); | ||
| 174 | TRACE_EXIT(FALSE); | ||
| 175 | @@ -799,18 +797,18 @@ VivScreenInit(int scrnIndex, ScreenPtr p | ||
| 176 | } | ||
| 177 | |||
| 178 | static Bool | ||
| 179 | -VivCloseScreen(int scrnIndex, ScreenPtr pScreen) { | ||
| 180 | - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | ||
| 181 | +VivCloseScreen(CLOSE_SCREEN_ARGS_DECL) { | ||
| 182 | + CLOSE_SCREEN_DECL_ScrnInfoPtr; | ||
| 183 | VivPtr fPtr = GET_VIV_PTR(pScrn); | ||
| 184 | Bool ret = FALSE; | ||
| 185 | TRACE_ENTER(); | ||
| 186 | |||
| 187 | - VivDRICloseScreen(pScreen); | ||
| 188 | + VivDRICloseScreen(CLOSE_SCREEN_ARGS); | ||
| 189 | |||
| 190 | if (fPtr->mFakeExa.mUseExaFlag) { | ||
| 191 | DEBUGP("UnLoading EXA"); | ||
| 192 | if (fPtr->mFakeExa.mIsInited && !DestroyExaLayer(pScreen)) { | ||
| 193 | - xf86DrvMsg(scrnIndex, X_ERROR, | ||
| 194 | + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, | ||
| 195 | "internal error: DestroyExaLayer failed " | ||
| 196 | "in VivCloseScreen()\n"); | ||
| 197 | } | ||
| 198 | @@ -823,7 +821,7 @@ VivCloseScreen(int scrnIndex, ScreenPtr | ||
| 199 | |||
| 200 | pScreen->CreateScreenResources = fPtr->CreateScreenResources; | ||
| 201 | pScreen->CloseScreen = fPtr->CloseScreen; | ||
| 202 | - ret = (*pScreen->CloseScreen)(scrnIndex, pScreen); | ||
| 203 | + ret = (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); | ||
| 204 | TRACE_EXIT(ret); | ||
| 205 | } | ||
| 206 | |||
| 207 | Index: xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/compat-api.h | ||
| 208 | =================================================================== | ||
| 209 | --- /dev/null | ||
| 210 | +++ xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/compat-api.h | ||
| 211 | @@ -0,0 +1,106 @@ | ||
| 212 | +/* | ||
| 213 | + * Copyright 2012 Red Hat, Inc. | ||
| 214 | + * | ||
| 215 | + * Permission is hereby granted, free of charge, to any person obtaining a | ||
| 216 | + * copy of this software and associated documentation files (the "Software"), | ||
| 217 | + * to deal in the Software without restriction, including without limitation | ||
| 218 | + * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
| 219 | + * and/or sell copies of the Software, and to permit persons to whom the | ||
| 220 | + * Software is furnished to do so, subject to the following conditions: | ||
| 221 | + * | ||
| 222 | + * The above copyright notice and this permission notice (including the next | ||
| 223 | + * paragraph) shall be included in all copies or substantial portions of the | ||
| 224 | + * Software. | ||
| 225 | + * | ||
| 226 | + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 227 | + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 228 | + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
| 229 | + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 230 | + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| 231 | + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
| 232 | + * DEALINGS IN THE SOFTWARE. | ||
| 233 | + * | ||
| 234 | + * Author: Dave Airlie <airlied@redhat.com> | ||
| 235 | + */ | ||
| 236 | + | ||
| 237 | +/* this file provides API compat between server post 1.13 and pre it, | ||
| 238 | + it should be reused inside as many drivers as possible */ | ||
| 239 | +#ifndef COMPAT_API_H | ||
| 240 | +#define COMPAT_API_H | ||
| 241 | + | ||
| 242 | +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR | ||
| 243 | +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] | ||
| 244 | +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p | ||
| 245 | +#endif | ||
| 246 | + | ||
| 247 | +#ifndef XF86_HAS_SCRN_CONV | ||
| 248 | +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] | ||
| 249 | +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] | ||
| 250 | +#endif | ||
| 251 | + | ||
| 252 | +#ifndef XF86_SCRN_INTERFACE | ||
| 253 | + | ||
| 254 | +#define SCRN_ARG_TYPE int | ||
| 255 | +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] | ||
| 256 | + | ||
| 257 | +#define SCREEN_ARG_TYPE int | ||
| 258 | +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] | ||
| 259 | + | ||
| 260 | +#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv | ||
| 261 | + | ||
| 262 | +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask | ||
| 263 | +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask | ||
| 264 | + | ||
| 265 | +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen | ||
| 266 | +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen | ||
| 267 | +#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; | ||
| 268 | + | ||
| 269 | +#define FBDEVHWADJUSTFRAME_ARGS(x, y) scrnIndex, (x), (y), 0 | ||
| 270 | + | ||
| 271 | +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags | ||
| 272 | + | ||
| 273 | +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags | ||
| 274 | + | ||
| 275 | +#define FREE_SCREEN_ARGS_DECL int arg, int flags | ||
| 276 | +#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 | ||
| 277 | + | ||
| 278 | +#define VT_FUNC_ARGS_DECL int arg, int flags | ||
| 279 | +#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) | ||
| 280 | + | ||
| 281 | +#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn->scrnIndex, b | ||
| 282 | + | ||
| 283 | +#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) | ||
| 284 | +#else | ||
| 285 | +#define SCRN_ARG_TYPE ScrnInfoPtr | ||
| 286 | +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) | ||
| 287 | + | ||
| 288 | +#define SCREEN_ARG_TYPE ScreenPtr | ||
| 289 | +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) | ||
| 290 | + | ||
| 291 | +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv | ||
| 292 | + | ||
| 293 | +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask | ||
| 294 | +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask | ||
| 295 | + | ||
| 296 | +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen | ||
| 297 | +#define CLOSE_SCREEN_ARGS pScreen | ||
| 298 | +#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 299 | + | ||
| 300 | +#define FBDEVHWADJUSTFRAME_ARGS(x, y) pScrn, (x), (y) | ||
| 301 | + | ||
| 302 | +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y | ||
| 303 | +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode | ||
| 304 | + | ||
| 305 | +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg | ||
| 306 | +#define FREE_SCREEN_ARGS(x) (x) | ||
| 307 | + | ||
| 308 | +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg | ||
| 309 | +#define VT_FUNC_ARGS(flags) pScrn | ||
| 310 | + | ||
| 311 | +#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn, b | ||
| 312 | + | ||
| 313 | +#define XF86_ENABLEDISABLEFB_ARG(x) (x) | ||
| 314 | + | ||
| 315 | +#endif | ||
| 316 | + | ||
| 317 | +#endif | ||
| 318 | Index: xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/vivante_common.h | ||
| 319 | =================================================================== | ||
| 320 | --- xserver-xorg-video-imx-viv-12.09.01.orig/src/vivante_util/vivante_common.h | ||
| 321 | +++ xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/vivante_common.h | ||
| 322 | @@ -76,6 +76,9 @@ extern "C" { | ||
| 323 | #include "xf86Crtc.h" | ||
| 324 | #include "cursorstr.h" | ||
| 325 | |||
| 326 | + /* System API compatability */ | ||
| 327 | +#include "compat-api.h" | ||
| 328 | + | ||
| 329 | /*Debug*/ | ||
| 330 | #include "vivante_debug.h" | ||
| 331 | |||
| 332 | Index: xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante.h | ||
| 333 | =================================================================== | ||
| 334 | --- xserver-xorg-video-imx-viv-12.09.01.orig/src/vivante_fbdev/vivante.h | ||
| 335 | +++ xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante.h | ||
| 336 | @@ -99,11 +99,11 @@ extern "C" { | ||
| 337 | #define GET_VIV_PTR(p) ((VivPtr)((p)->driverPrivate)) | ||
| 338 | |||
| 339 | #define VIVPTR_FROM_PIXMAP(x) \ | ||
| 340 | - GET_VIV_PTR(xf86Screens[(x)->drawable.pScreen->myNum]) | ||
| 341 | + GET_VIV_PTR(xf86ScreenToScrn((x)->drawable.pScreen)) | ||
| 342 | #define VIVPTR_FROM_SCREEN(x) \ | ||
| 343 | - GET_VIV_PTR(xf86Screens[(x)->myNum]) | ||
| 344 | + GET_VIV_PTR(xf86ScreenToScrn((x))) | ||
| 345 | #define VIVPTR_FROM_PICTURE(x) \ | ||
| 346 | - GET_VIV_PTR(xf86Screens[(x)->pDrawable->pScreen->myNum]) | ||
| 347 | + GET_VIV_PTR(xf86ScreenToScrn((x)->pDrawable->pScreen)) | ||
| 348 | |||
| 349 | /******************************************************************************** | ||
| 350 | * | ||
| 351 | Index: xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_dri.c | ||
| 352 | =================================================================== | ||
| 353 | --- xserver-xorg-video-imx-viv-12.09.01.orig/src/vivante_fbdev/vivante_dri.c | ||
| 354 | +++ xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_dri.c | ||
| 355 | @@ -49,7 +49,7 @@ VivDestroyContext(ScreenPtr pScreen, drm | ||
| 356 | |||
| 357 | Bool | ||
| 358 | VivDRIFinishScreenInit(ScreenPtr pScreen) { | ||
| 359 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 360 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 361 | VivPtr pViv = GET_VIV_PTR(pScrn); | ||
| 362 | DRIInfoPtr pDRIInfo = (DRIInfoPtr) pViv->pDRIInfo; | ||
| 363 | |||
| 364 | @@ -79,7 +79,7 @@ VivDRIMoveBuffers(WindowPtr pParent, DDX | ||
| 365 | } | ||
| 366 | |||
| 367 | Bool VivDRIScreenInit(ScreenPtr pScreen) { | ||
| 368 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 369 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 370 | DRIInfoPtr pDRIInfo; | ||
| 371 | VivPtr pViv = GET_VIV_PTR(pScrn); | ||
| 372 | |||
| 373 | @@ -185,7 +185,7 @@ Bool VivDRIScreenInit(ScreenPtr pScreen) | ||
| 374 | } | ||
| 375 | |||
| 376 | void VivDRICloseScreen(ScreenPtr pScreen) { | ||
| 377 | - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; | ||
| 378 | + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); | ||
| 379 | VivPtr pViv = GET_VIV_PTR(pScrn); | ||
| 380 | |||
| 381 | if (pViv->pDRIInfo) { | ||
diff --git a/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb b/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb index 2b0d0a023..798e450aa 100644 --- a/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb +++ b/meta-fsl-arm/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb | |||
| @@ -10,6 +10,7 @@ DEPENDS += "virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q" | |||
| 10 | LIC_FILES_CHKSUM = "file://src/vivante_fbdev/vivante.h;endline=19;md5=93a322f91ec495569dcbcfbb2a95454a" | 10 | LIC_FILES_CHKSUM = "file://src/vivante_fbdev/vivante.h;endline=19;md5=93a322f91ec495569dcbcfbb2a95454a" |
| 11 | 11 | ||
| 12 | SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \ | 12 | SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \ |
| 13 | file://fix-vivante-compile.patch \ | ||
| 13 | file://Makefile.am-remove-prefixed-include-path.patch" | 14 | file://Makefile.am-remove-prefixed-include-path.patch" |
| 14 | SRC_URI[md5sum] = "1948119717aa01bed1f630be9ee7a708" | 15 | SRC_URI[md5sum] = "1948119717aa01bed1f630be9ee7a708" |
| 15 | SRC_URI[sha256sum] = "5b3be4b426d2d2803554df9e4d8919d1f9d17659c3153c71c6529f43c37e6ed1" | 16 | SRC_URI[sha256sum] = "5b3be4b426d2d2803554df9e4d8919d1f9d17659c3153c71c6529f43c37e6ed1" |
