From 80fb4b97f6e58d70ac9575324703d8a9376224ca Mon Sep 17 00:00:00 2001 From: Gary Thomas Date: Wed, 19 Dec 2012 12:06:15 -0700 Subject: [PATCH] Fix build errors due to changes in API --- .../fix-vivante-build.patch | 196 ++++++++++++++++++++ .../xf86-video-imxfb-vivante_12.09.01.bb | 1 + 2 files changed, 197 insertions(+) create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-build.patch diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-build.patch b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-build.patch new file mode 100644 index 0000000..ac3d0e1 --- /dev/null +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante/fix-vivante-build.patch @@ -0,0 +1,196 @@ +diff -uNr xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_dri.h xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_fbdev/vivante_dri.h +--- xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_dri.h 2012-08-21 03:51:17.000000000 -0600 ++++ xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_fbdev/vivante_dri.h 2012-12-19 10:58:25.612916840 -0700 +@@ -67,7 +67,7 @@ + } vvtDeviceInfo; + + Bool VivDRIScreenInit(ScreenPtr pScreen); +-void VivDRICloseScreen(ScreenPtr pScreen); ++void VivDRICloseScreen(CLOSE_SCREEN_ARGS_DECL); + Bool VivDRIFinishScreenInit(ScreenPtr pScreen); + + #endif /* _VIVANTE_DRI_H_ */ +diff -uNr xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_fbdev_driver.c xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_fbdev/vivante_fbdev_driver.c +--- xserver-xorg-video-imx-viv-12.09.01/src/vivante_fbdev/vivante_fbdev_driver.c 2012-08-21 03:51:17.000000000 -0600 ++++ xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_fbdev/vivante_fbdev_driver.c 2012-12-19 11:26:03.246916879 -0700 +@@ -19,7 +19,6 @@ + *****************************************************************************/ + + +- + #include "vivante_common.h" + #include "vivante.h" + #include "vivante_exa.h" +@@ -56,7 +55,7 @@ + static Bool VivPreInit(ScrnInfoPtr pScrn, int flags); + static Bool VivScreenInit(int Index, ScreenPtr pScreen, int argc, + char **argv); +-static Bool VivCloseScreen(int scrnIndex, ScreenPtr pScreen); ++static Bool VivCloseScreen(CLOSE_SCREEN_ARGS_DECL); + static Bool VivDriverFunc(ScrnInfoPtr pScrn, xorgDriverFuncOp op, + pointer ptr); + +@@ -651,7 +650,7 @@ + TRACE_EXIT(FALSE); + } + fbdevHWSaveScreen(pScreen, SCREEN_SAVER_ON); +- fbdevHWAdjustFrame(scrnIndex, 0, 0, 0); ++ fbdevHWAdjustFrame(FBDEVHWADJUSTFRAME_ARGS(0, 0)); + + + +@@ -799,18 +798,18 @@ + } + + static Bool +-VivCloseScreen(int scrnIndex, ScreenPtr pScreen) { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++VivCloseScreen(CLOSE_SCREEN_ARGS_DECL) { ++ CLOSE_SCREEN_DECL_ScrnInfoPtr; + VivPtr fPtr = GET_VIV_PTR(pScrn); + Bool ret = FALSE; + TRACE_ENTER(); + +- VivDRICloseScreen(pScreen); ++ VivDRICloseScreen(CLOSE_SCREEN_ARGS); + + if (fPtr->mFakeExa.mUseExaFlag) { + DEBUGP("UnLoading EXA"); + if (fPtr->mFakeExa.mIsInited && !DestroyExaLayer(pScreen)) { +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: DestroyExaLayer failed " + "in VivCloseScreen()\n"); + } +@@ -823,7 +822,7 @@ + + pScreen->CreateScreenResources = fPtr->CreateScreenResources; + pScreen->CloseScreen = fPtr->CloseScreen; +- ret = (*pScreen->CloseScreen)(scrnIndex, pScreen); ++ ret = (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + TRACE_EXIT(ret); + } + +diff -uNr xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/compat-api.h xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_util/compat-api.h +--- xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/compat-api.h 1969-12-31 17:00:00.000000000 -0700 ++++ xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_util/compat-api.h 2012-12-19 11:26:03.894917071 -0700 +@@ -0,0 +1,106 @@ ++/* ++ * Copyright 2012 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ * ++ * Author: Dave Airlie ++ */ ++ ++/* this file provides API compat between server post 1.13 and pre it, ++ it should be reused inside as many drivers as possible */ ++#ifndef COMPAT_API_H ++#define COMPAT_API_H ++ ++#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR ++#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] ++#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p ++#endif ++ ++#ifndef XF86_HAS_SCRN_CONV ++#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] ++#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] ++#endif ++ ++#ifndef XF86_SCRN_INTERFACE ++ ++#define SCRN_ARG_TYPE int ++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] ++ ++#define SCREEN_ARG_TYPE int ++#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] ++ ++#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv ++ ++#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask ++#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask ++ ++#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen ++#define CLOSE_SCREEN_ARGS scrnIndex, pScreen ++#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ ++#define FBDEVHWADJUSTFRAME_ARGS(x, y) scrnIndex, (x), (y), 0 ++ ++#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags ++ ++#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags ++ ++#define FREE_SCREEN_ARGS_DECL int arg, int flags ++#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 ++ ++#define VT_FUNC_ARGS_DECL int arg, int flags ++#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) ++ ++#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn->scrnIndex, b ++ ++#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) ++#else ++#define SCRN_ARG_TYPE ScrnInfoPtr ++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) ++ ++#define SCREEN_ARG_TYPE ScreenPtr ++#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) ++ ++#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv ++ ++#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask ++#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask ++ ++#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen ++#define CLOSE_SCREEN_ARGS pScreen ++#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ++#define FBDEVHWADJUSTFRAME_ARGS(x, y) pScrn, (x), (y) ++ ++#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y ++#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode ++ ++#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg ++#define FREE_SCREEN_ARGS(x) (x) ++ ++#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg ++#define VT_FUNC_ARGS(flags) pScrn ++ ++#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn, b ++ ++#define XF86_ENABLEDISABLEFB_ARG(x) (x) ++ ++#endif ++ ++#endif +diff -uNr xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/vivante_common.h xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_util/vivante_common.h +--- xserver-xorg-video-imx-viv-12.09.01/src/vivante_util/vivante_common.h 2012-08-21 03:51:17.000000000 -0600 ++++ xserver-xorg-video-imx-viv-12.09.01.NEW/src/vivante_util/vivante_common.h 2012-12-19 11:04:45.162911723 -0700 +@@ -76,6 +76,9 @@ + #include "xf86Crtc.h" + #include "cursorstr.h" + ++ /* System API compatability */ ++#include "compat-api.h" ++ + /*Debug*/ + #include "vivante_debug.h" + diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb index 2b0d0a0..798e450 100644 --- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_12.09.01.bb +++ b/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" LIC_FILES_CHKSUM = "file://src/vivante_fbdev/vivante.h;endline=19;md5=93a322f91ec495569dcbcfbb2a95454a" SRC_URI = "${FSL_MIRROR}/xserver-xorg-video-imx-viv-${PV}.tar.gz \ + file://fix-vivante-compile.patch \ file://Makefile.am-remove-prefixed-include-path.patch" SRC_URI[md5sum] = "1948119717aa01bed1f630be9ee7a708" SRC_URI[sha256sum] = "5b3be4b426d2d2803554df9e4d8919d1f9d17659c3153c71c6529f43c37e6ed1" -- 1.7.9.5