mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-27 00:10:29 +00:00
alarm/xf86-video-armsoc-odroid to 240.78c3cda-1
This commit is contained in:
parent
6c64563197
commit
bc442919ab
4 changed files with 147 additions and 51 deletions
|
@ -0,0 +1,33 @@
|
||||||
|
From 4e6cfc02a458f873015b7f73e93a39d3ae2ef366 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Jackson <ajax@redhat.com>
|
||||||
|
Date: Tue, 19 Jul 2016 10:21:03 -0400
|
||||||
|
Subject: [PATCH 1/2] Adapt Block/WakeupHandler signature for ABI 23
|
||||||
|
|
||||||
|
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
||||||
|
---
|
||||||
|
src/compat-api.h | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/compat-api.h b/src/compat-api.h
|
||||||
|
index fefbc59..78d3c91 100644
|
||||||
|
--- a/src/compat-api.h
|
||||||
|
+++ b/src/compat-api.h
|
||||||
|
@@ -77,9 +77,15 @@
|
||||||
|
|
||||||
|
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
||||||
|
|
||||||
|
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
|
||||||
|
+#define BLOCKHANDLER_ARGS_DECL \
|
||||||
|
+ ScreenPtr arg, pointer pTimeout
|
||||||
|
+#define BLOCKHANDLER_ARGS arg, pTimeout
|
||||||
|
+#else
|
||||||
|
#define BLOCKHANDLER_ARGS_DECL \
|
||||||
|
ScreenPtr arg, pointer pTimeout, pointer pReadmask
|
||||||
|
#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
|
||||||
|
#define CLOSE_SCREEN_ARGS pScreen
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
From b8d09aae2902c60e89f48a1f45e822b64c9242a8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
||||||
Date: Sun, 15 Feb 2015 11:16:26 -0700
|
|
||||||
Subject: [PATCH] compat for newer xorg
|
|
||||||
|
|
||||||
---
|
|
||||||
src/armsoc_dumb.c | 1 +
|
|
||||||
src/drmmode_display.c | 4 ++++
|
|
||||||
2 files changed, 5 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/armsoc_dumb.c b/src/armsoc_dumb.c
|
|
||||||
index 8f29b7a..879d77c 100644
|
|
||||||
--- a/src/armsoc_dumb.c
|
|
||||||
+++ b/src/armsoc_dumb.c
|
|
||||||
@@ -27,6 +27,7 @@
|
|
||||||
#include <errno.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
+#include <xorg-server.h>
|
|
||||||
#include <xf86.h>
|
|
||||||
#include <xf86drm.h>
|
|
||||||
#include <xf86drmMode.h>
|
|
||||||
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
|
|
||||||
index 85ce56f..1b47632 100644
|
|
||||||
--- a/src/drmmode_display.c
|
|
||||||
+++ b/src/drmmode_display.c
|
|
||||||
@@ -32,6 +32,10 @@
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
+
|
|
||||||
#include "xf86DDC.h"
|
|
||||||
#include "xf86RandR12.h"
|
|
||||||
|
|
||||||
--
|
|
||||||
2.5.2
|
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
From e63caa8a48715adfac9242ec4c42d36d18e4fdf2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Keith Packard <keithp@keithp.com>
|
||||||
|
Date: Tue, 19 Jul 2016 08:51:12 -0700
|
||||||
|
Subject: [PATCH 2/2] Use NotifyFd for drm fd
|
||||||
|
|
||||||
|
NotifyFd is available after API 22, and must be used after API 23.
|
||||||
|
|
||||||
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|
||||||
|
---
|
||||||
|
src/compat-api.h | 5 +++++
|
||||||
|
src/drmmode_display.c | 24 ++++++++++++++++++++++++
|
||||||
|
2 files changed, 29 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/compat-api.h b/src/compat-api.h
|
||||||
|
index 78d3c91..54f9f64 100644
|
||||||
|
--- a/src/compat-api.h
|
||||||
|
+++ b/src/compat-api.h
|
||||||
|
@@ -77,7 +77,12 @@
|
||||||
|
|
||||||
|
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
|
||||||
|
|
||||||
|
+#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(22,0)
|
||||||
|
+#define HAVE_NOTIFY_FD 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#if ABI_VIDEODRV_VERSION >= SET_ABI_VERSION(23, 0)
|
||||||
|
+#define RELOAD_CURSORS_DEPRECATED 1
|
||||||
|
#define BLOCKHANDLER_ARGS_DECL \
|
||||||
|
ScreenPtr arg, pointer pTimeout
|
||||||
|
#define BLOCKHANDLER_ARGS arg, pTimeout
|
||||||
|
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
|
||||||
|
index 1b47632..b64bf71 100644
|
||||||
|
--- a/src/drmmode_display.c
|
||||||
|
+++ b/src/drmmode_display.c
|
||||||
|
@@ -376,9 +376,11 @@ done_setting:
|
||||||
|
drmmode_output_dpms(output, DPMSModeOn);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if !RELOAD_CURSORS_DEPRECATED
|
||||||
|
/* if hw cursor is initialized, reload it */
|
||||||
|
if (drmmode->cursor)
|
||||||
|
xf86_reload_cursors(pScrn->pScreen);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
cleanup:
|
||||||
|
if (newcrtc)
|
||||||
|
@@ -1846,6 +1848,13 @@ drmmode_uevent_fini(ScrnInfoPtr pScrn)
|
||||||
|
TRACE_EXIT();
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if HAVE_NOTIFY_FD
|
||||||
|
+static void
|
||||||
|
+drmmode_notify_fd(int fd, int notify, void *data)
|
||||||
|
+{
|
||||||
|
+ drmHandleEvent(fd, &event_context);
|
||||||
|
+}
|
||||||
|
+#else
|
||||||
|
static void
|
||||||
|
drmmode_wakeup_handler(pointer data, int err, pointer p)
|
||||||
|
{
|
||||||
|
@@ -1861,6 +1870,7 @@ drmmode_wakeup_handler(pointer data, int err, pointer p)
|
||||||
|
if (FD_ISSET(drmmode->fd, read_mask))
|
||||||
|
drmHandleEvent(drmmode->fd, &event_context);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
void
|
||||||
|
drmmode_wait_for_event(ScrnInfoPtr pScrn)
|
||||||
|
@@ -1876,15 +1886,29 @@ drmmode_screen_init(ScrnInfoPtr pScrn)
|
||||||
|
|
||||||
|
drmmode_uevent_init(pScrn);
|
||||||
|
|
||||||
|
+#if HAVE_NOTIFY_FD
|
||||||
|
+ SetNotifyFd(drmmode->fd, drmmode_notify_fd, X_NOTIFY_READ, NULL);
|
||||||
|
+#else
|
||||||
|
AddGeneralSocket(drmmode->fd);
|
||||||
|
|
||||||
|
/* Register a wakeup handler to get informed on DRM events */
|
||||||
|
RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
|
||||||
|
drmmode_wakeup_handler, pScrn);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
drmmode_screen_fini(ScrnInfoPtr pScrn)
|
||||||
|
{
|
||||||
|
+ struct drmmode_rec *drmmode = drmmode_from_scrn(pScrn);
|
||||||
|
+
|
||||||
|
+#if HAVE_NOTIFY_FD
|
||||||
|
+ RemoveNotifyFd(drmmode->fd);
|
||||||
|
+#else
|
||||||
|
+ RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
|
||||||
|
+ drmmode_wakeup_handler, pScrn);
|
||||||
|
+ RemoveGeneralSocket(drmmode->fd);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
drmmode_uevent_fini(pScrn);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.11.0
|
||||||
|
|
|
@ -4,29 +4,31 @@
|
||||||
buildarch=4
|
buildarch=4
|
||||||
|
|
||||||
pkgname=xf86-video-armsoc-odroid
|
pkgname=xf86-video-armsoc-odroid
|
||||||
_commit=3bdf799bbb0d087cc1a206dd913ed1d10dec86a9
|
pkgver=240.78c3cda
|
||||||
pkgver=237.3bdf799
|
pkgrel=1
|
||||||
pkgrel=4
|
pkgdesc='X.org graphics driver for ARM graphics - Exynos ODROID'
|
||||||
arch=('armv7h')
|
arch=('armv7h')
|
||||||
url="https://github.com/mdrjr/xf86-video-armsoc/tree/r4p0"
|
url="https://github.com/mdrjr/xf86-video-armsoc/tree/r4p0"
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
makedepends=('git' 'pkgconfig' 'xorg-server-devel' 'resourceproto' 'scrnsaverproto')
|
makedepends=('git' 'xorg-server-devel' 'X-ABI-VIDEODRV_VERSION=23')
|
||||||
options=('!libtool')
|
conflicts=('xf86-video-armsoc' 'xorg-server<1.19' 'X-ABI-VIDEODRV_VERSION<23' 'X-ABI-VIDEODRV_VERSION>=24')
|
||||||
conflicts=(xf86-video-armsoc)
|
|
||||||
provides=(xf86-video-armsoc)
|
provides=(xf86-video-armsoc)
|
||||||
source=("$pkgname::git+https://github.com/mdrjr/xf86-video-armsoc.git#commit=${_commit}"
|
source=("$pkgname::git+https://github.com/mdrjr/xf86-video-armsoc.git#branch=r4p0"
|
||||||
'0001-compat-for-newer-xorg.patch')
|
'0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch'
|
||||||
|
'0002-Use-NotifyFd-for-drm-fd.patch')
|
||||||
md5sums=('SKIP'
|
md5sums=('SKIP'
|
||||||
'dd9885df7c3a5ec817a859c863860bc0')
|
'9d06b5add32485a340c771bb87f3c81c'
|
||||||
|
'742f19941f6ef38a344c26c5785b8b79')
|
||||||
|
|
||||||
pkgver() {
|
pkgver() {
|
||||||
cd $pkgname
|
cd $pkgname
|
||||||
echo $(git rev-list --count makepkg).$(git rev-parse --short makepkg)
|
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd $pkgname
|
cd $pkgname
|
||||||
git apply ../0001-compat-for-newer-xorg.patch
|
git apply ../0001-Adapt-Block-WakeupHandler-signature-for-ABI-23.patch
|
||||||
|
git apply ../0002-Use-NotifyFd-for-drm-fd.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
Loading…
Reference in a new issue