diff options
Diffstat (limited to 'pcr')
3 files changed, 215 insertions, 6 deletions
diff --git a/pcr/xf86-video-fbturbo-git/0001-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch b/pcr/xf86-video-fbturbo-git/0001-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch new file mode 100644 index 000000000..f3da538a2 --- /dev/null +++ b/pcr/xf86-video-fbturbo-git/0001-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch @@ -0,0 +1,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 + diff --git a/pcr/xf86-video-fbturbo-git/0002-GCC-8-fix.patch b/pcr/xf86-video-fbturbo-git/0002-GCC-8-fix.patch new file mode 100644 index 000000000..c7e01ad77 --- /dev/null +++ b/pcr/xf86-video-fbturbo-git/0002-GCC-8-fix.patch @@ -0,0 +1,34 @@ +From b0110d28c675dfc68ae8567c0b1712b187c7e61a Mon Sep 17 00:00:00 2001 +From: Kevin Mihelich <kevin@archlinuxarm.org> +Date: Thu, 17 May 2018 12:53:53 -0600 +Subject: [PATCH 2/2] GCC 8 fix + +--- + src/fbdev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/fbdev.c b/src/fbdev.c +index 23ec855..76ca968 100644 +--- a/src/fbdev.c ++++ b/src/fbdev.c +@@ -1093,7 +1093,7 @@ FBDevScreenInit(SCREEN_INIT_ARGS_DECL) + fPtr->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = FBDevCloseScreen; + +-#if XV ++#ifdef XV + fPtr->SunxiVideo_private = NULL; + if (xf86ReturnOptValBool(fPtr->Options, OPTION_XV_OVERLAY, TRUE) && + fPtr->sunxi_disp_private) { +@@ -1183,7 +1183,7 @@ FBDevCloseScreen(CLOSE_SCREEN_ARGS_DECL) + fPtr->SunxiDispHardwareCursor_private = NULL; + } + +-#if XV ++#ifdef XV + if (fPtr->SunxiVideo_private) { + SunxiVideo_Close(pScreen); + free(fPtr->SunxiVideo_private); +-- +2.16.2 + diff --git a/pcr/xf86-video-fbturbo-git/PKGBUILD b/pcr/xf86-video-fbturbo-git/PKGBUILD index 47fc292f6..3c96b298e 100644 --- a/pcr/xf86-video-fbturbo-git/PKGBUILD +++ b/pcr/xf86-video-fbturbo-git/PKGBUILD @@ -5,28 +5,46 @@ pkgname=xf86-video-fbturbo-git _gitname=xf86-video-fbturbo pkgver=199.f9a6ed7 -pkgrel=2 +pkgrel=3 pkgdesc="X.org MALI video driver" arch=('armv7h') url="https://github.com/ssvb/xf86-video-fbturbo" license=('MIT') -makedepends=('git' 'xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=20') +makedepends=('xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=24.0' 'git') backup=('etc/X11/xorg.conf.d/99-fbturbo.conf') -conflicts=('xorg-server<1.16' 'X-ABI-VIDEODRV_VERSION<20' 'X-ABI-VIDEODRV_VERSION>=21') +conflicts=('xorg-server<1.20' 'X-ABI-VIDEODRV_VERSION<24' 'X-ABI-VIDEODRV_VERSION>=25') options=('!libtool') provides=('xf86-video-fbturbo') source=('git+https://github.com/ssvb/xf86-video-fbturbo' + '0001-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch' + '0002-GCC-8-fix.patch' '99-fbturbo.conf') -md5sums=('SKIP' - '61f1c9f7cf878ebc19a09fbe70d24ab3') +sha256sums=('SKIP' + '64e13e2beaca64feea8a1f6e052522d80964a39226db4abb4130b3adb53cac6f' + 'a88445ee108183530632818976105aa0c71b40350e004adcc4a40a0f37ae1a1e' + '9922d04c530c59de833c735baa342c490ed148102c9d418fcb0175f3552b0090') pkgver() { - cd "${SRCDEST}/${_gitname}" + cd "${srcdir}/${_gitname}" echo $(git rev-list --count master).$(git rev-parse --short master) } +prepare() { + cd "${srcdir}/${_gitname}" + patch -p1 -i ../0001-Use-own-thunk-functions-instead-of-fbdevHW-Weak.patch + patch -p1 -i ../0002-GCC-8-fix.patch +} + build() { cd "${srcdir}/${_gitname}" + + # Since pacman 5.0.2-2, hardened flags are now enabled in makepkg.conf + # With them, module fail to load with undefined symbol. + # See https://bugs.archlinux.org/task/55102 / https://bugs.archlinux.org/task/54845 + export CFLAGS=${CFLAGS/-fno-plt} + export CXXFLAGS=${CXXFLAGS/-fno-plt} + export LDFLAGS=${LDFLAGS/,-z,now} + ./autogen.sh ./configure --prefix=/usr make |