aboutsummaryrefslogtreecommitdiff
path: root/x11-drivers
diff options
context:
space:
mode:
authorJohannes M Dieterich <jmd@FreeBSD.org>2017-02-11 01:40:29 +0000
committerJohannes M Dieterich <jmd@FreeBSD.org>2017-02-11 01:40:29 +0000
commit17cbf1c9806786730e9d60f665465cb68139b432 (patch)
tree2f90f4ea93b049cb937c5f91175100cd667ea7dc /x11-drivers
parenta059025239c310cdf33f7361ab123341522dcd10 (diff)
downloadports-17cbf1c9806786730e9d60f665465cb68139b432.tar.gz
ports-17cbf1c9806786730e9d60f665465cb68139b432.zip
x11-drivers/xf86-video-amdgpu: Add the amdgpu driver for Xorg. Currently and temporarily requires FreeBSDDesktop kernel fork of 12-CURRENT.
Reviewed by: rene (mentor), swills (mentor), kwm (x11@) Approved by: rene (mentor), swills (mentor) Differential Revision: https://reviews.freebsd.org/D9377
Notes
Notes: svn path=/head/; revision=433830
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/Makefile1
-rw-r--r--x11-drivers/xf86-video-amdgpu/Makefile35
-rw-r--r--x11-drivers/xf86-video-amdgpu/distinfo3
-rw-r--r--x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c47
-rw-r--r--x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c11
-rw-r--r--x11-drivers/xf86-video-amdgpu/pkg-descr9
6 files changed, 106 insertions, 0 deletions
diff --git a/x11-drivers/Makefile b/x11-drivers/Makefile
index d039c1560a18..75dc1b312b91 100644
--- a/x11-drivers/Makefile
+++ b/x11-drivers/Makefile
@@ -18,6 +18,7 @@
SUBDIR += xf86-input-vmmouse
SUBDIR += xf86-input-void
SUBDIR += xf86-input-wacom
+ SUBDIR += xf86-video-amdgpu
SUBDIR += xf86-video-apm
SUBDIR += xf86-video-ark
SUBDIR += xf86-video-ast
diff --git a/x11-drivers/xf86-video-amdgpu/Makefile b/x11-drivers/xf86-video-amdgpu/Makefile
new file mode 100644
index 000000000000..3dd391ed98a9
--- /dev/null
+++ b/x11-drivers/xf86-video-amdgpu/Makefile
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+# this port is for future amdgpu kernel support testing.
+
+PORTNAME= xf86-video-amdgpu
+PORTVERSION= 1.2.0
+CATEGORIES= x11-drivers
+
+MAINTAINER= x11@FreeBSD.org
+COMMENT= X.Org amdgpu display driver
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libdrm_amdgpu.so:graphics/libdrm
+
+USE_GL= gbm
+XORG_CAT= driver
+INSTALL_TARGET= install-strip
+# No amdgpu kernel driver on non-x86 and PC98.
+ONLY_FOR_ARCHS= i386 amd64
+
+CONFIGURE_ARGS+=--disable-udev
+
+.include <bsd.port.options.mk>
+
+.if (${OSVERSION} < 1200019)
+IGNORE= not support on 11.x or older, no kernel support
+.endif
+
+PLIST_FILES= lib/xorg/modules/drivers/amdgpu_drv.so \
+ man/man4/amdgpu.4x.gz \
+ share/X11/xorg.conf.d/10-amdgpu.conf
+
+.include <bsd.port.mk>
diff --git a/x11-drivers/xf86-video-amdgpu/distinfo b/x11-drivers/xf86-video-amdgpu/distinfo
new file mode 100644
index 000000000000..b54020c428ee
--- /dev/null
+++ b/x11-drivers/xf86-video-amdgpu/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1479963082
+SHA256 (xorg/driver/xf86-video-amdgpu-1.2.0.tar.bz2) = 275b1aac5f127f55ba3d7480a1df89eace1d02650e24e46908067fc875e76c8f
+SIZE (xorg/driver/xf86-video-amdgpu-1.2.0.tar.bz2) = 388108
diff --git a/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c
new file mode 100644
index 000000000000..bbf1c20c91ac
--- /dev/null
+++ b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__drm__queue.c
@@ -0,0 +1,47 @@
+--- src/amdgpu_drm_queue.c.orig 2016-09-20 08:19:15 UTC
++++ src/amdgpu_drm_queue.c
+@@ -61,7 +61,7 @@ amdgpu_drm_queue_handler(int fd, unsigne
+ unsigned int usec, void *user_ptr)
+ {
+ uintptr_t seq = (uintptr_t)user_ptr;
+- struct amdgpu_drm_queue_entry *e, *tmp;
++ struct amdgpu_drm_queue_entry *e = NULL, *tmp;
+
+ xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) {
+ if (e->seq == seq) {
+@@ -133,7 +133,7 @@ amdgpu_drm_abort_one(struct amdgpu_drm_q
+ void
+ amdgpu_drm_abort_client(ClientPtr client)
+ {
+- struct amdgpu_drm_queue_entry *e;
++ struct amdgpu_drm_queue_entry *e = NULL;
+
+ xorg_list_for_each_entry(e, &amdgpu_drm_queue, list) {
+ if (e->client == client)
+@@ -147,7 +147,7 @@ amdgpu_drm_abort_client(ClientPtr client
+ void
+ amdgpu_drm_abort_entry(uintptr_t seq)
+ {
+- struct amdgpu_drm_queue_entry *e, *tmp;
++ struct amdgpu_drm_queue_entry *e = NULL, *tmp;
+
+ xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) {
+ if (e->seq == seq) {
+@@ -163,7 +163,7 @@ amdgpu_drm_abort_entry(uintptr_t seq)
+ void
+ amdgpu_drm_abort_id(uint64_t id)
+ {
+- struct amdgpu_drm_queue_entry *e, *tmp;
++ struct amdgpu_drm_queue_entry *e = NULL, *tmp;
+
+ xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) {
+ if (e->id == id) {
+@@ -191,7 +191,7 @@ amdgpu_drm_queue_init()
+ void
+ amdgpu_drm_queue_close(ScrnInfoPtr scrn)
+ {
+- struct amdgpu_drm_queue_entry *e, *tmp;
++ struct amdgpu_drm_queue_entry *e = NULL, *tmp;
+
+ xorg_list_for_each_entry_safe(e, tmp, &amdgpu_drm_queue, list) {
+ if (e->crtc->scrn == scrn)
diff --git a/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c
new file mode 100644
index 000000000000..885b2058eef4
--- /dev/null
+++ b/x11-drivers/xf86-video-amdgpu/files/patch-src_amdgpu__kms.c
@@ -0,0 +1,11 @@
+--- src/amdgpu_kms.c.orig 2016-11-17 06:07:48 UTC
++++ src/amdgpu_kms.c
+@@ -723,7 +723,7 @@ amdgpu_dirty_update(ScrnInfoPtr scrn)
+ {
+ AMDGPUInfoPtr info = AMDGPUPTR(scrn);
+ ScreenPtr screen = scrn->pScreen;
+- PixmapDirtyUpdatePtr ent;
++ PixmapDirtyUpdatePtr ent = NULL;
+ RegionPtr region;
+
+ xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
diff --git a/x11-drivers/xf86-video-amdgpu/pkg-descr b/x11-drivers/xf86-video-amdgpu/pkg-descr
new file mode 100644
index 000000000000..1ebf6a0d2a8b
--- /dev/null
+++ b/x11-drivers/xf86-video-amdgpu/pkg-descr
@@ -0,0 +1,9 @@
+This package contains the X.Org xf86-video-amdgpu driver.
+
+The amdgpu driver supports AMD Radeon chipsets: OLAND, HAINAN, TAHITI, PITCAIRN,
+VERDE, BONAIRE, KABINI, MULLINS, KAVERI, HAWAII, TOPAZ, TONGA, CARRIZO, FIJI,
+STONEY, POLARIS11, POLARIS10
+This driver relies on amdgpu KMS functionality currently only provided by the
+FreeBSDDesktop kernel fork. Once support is stable, it will be merged to HEAD.
+
+WWW: https://www.x.org/wiki/RadeonFeature/