summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2017-02-02 18:54:44 +0000
committerwiz <wiz@pkgsrc.org>2017-02-02 18:54:44 +0000
commit081664400d1a3aeba6773c7182a577ddde8d933c (patch)
treee477674d448e5aaab0d04d3b60f275629736d7a8
parent09bd22212c6ec738fd721710260efe6ab98fa7cb (diff)
downloadpkgsrc-081664400d1a3aeba6773c7182a577ddde8d933c.tar.gz
Updated xf86-video-ati to 7.8.0nb1:
Add patch from PR 50067 by David Shao, which comes from FreeBSD ports/Dragonfly overlay, to improve the situation on FreeBSD and Dragonfly.
-rw-r--r--x11/xf86-video-ati/Makefile3
-rw-r--r--x11/xf86-video-ati/distinfo3
-rw-r--r--x11/xf86-video-ati/patches/patch-src_radeon__kms.c59
3 files changed, 63 insertions, 2 deletions
diff --git a/x11/xf86-video-ati/Makefile b/x11/xf86-video-ati/Makefile
index b938a35e196..04587dce42f 100644
--- a/x11/xf86-video-ati/Makefile
+++ b/x11/xf86-video-ati/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.40 2016/11/17 20:57:54 wiz Exp $
+# $NetBSD: Makefile,v 1.41 2017/02/02 18:54:44 wiz Exp $
DISTNAME= xf86-video-ati-7.8.0
+PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XORG:=driver/}
EXTRACT_SUFX= .tar.bz2
diff --git a/x11/xf86-video-ati/distinfo b/x11/xf86-video-ati/distinfo
index b645df51564..6b3ca469699 100644
--- a/x11/xf86-video-ati/distinfo
+++ b/x11/xf86-video-ati/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.28 2016/11/17 20:57:54 wiz Exp $
+$NetBSD: distinfo,v 1.29 2017/02/02 18:54:44 wiz Exp $
SHA1 (xf86-video-ati-7.8.0.tar.bz2) = 30c4470d1252eade1d5c5998e42b66b0ac80a638
RMD160 (xf86-video-ati-7.8.0.tar.bz2) = f5c6d63a33690fa7e035175a541cb33fef0c4fac
SHA512 (xf86-video-ati-7.8.0.tar.bz2) = e09b7aca819656359d32b11f4314f2ad77b7a28d481b2cf17ea62f2e2385f9b40f568d5c76360c800c60c00671f0262277cdefde4c0744f2ed9b3b2fa90a37a9
Size (xf86-video-ati-7.8.0.tar.bz2) = 845702 bytes
+SHA1 (patch-src_radeon__kms.c) = 61bbcb37bf986982cd27520eb48babac342e4fe0
diff --git a/x11/xf86-video-ati/patches/patch-src_radeon__kms.c b/x11/xf86-video-ati/patches/patch-src_radeon__kms.c
new file mode 100644
index 00000000000..73e2d1c951a
--- /dev/null
+++ b/x11/xf86-video-ati/patches/patch-src_radeon__kms.c
@@ -0,0 +1,59 @@
+$NetBSD: patch-src_radeon__kms.c,v 1.4 2017/02/02 18:54:44 wiz Exp $
+
+From FreeBSD ports / DragonFly dports
+PR 50067
+
+--- src/radeon_kms.c.orig 2016-11-17 02:23:37.000000000 +0000
++++ src/radeon_kms.c
+@@ -30,6 +30,12 @@
+
+ #include <errno.h>
+ #include <sys/ioctl.h>
++
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++#include <sys/param.h>
++#include <sys/linker.h>
++#endif
++
+ /* Driver data structures */
+ #include "radeon.h"
+ #include "radeon_drm_queue.h"
+@@ -811,7 +817,7 @@ radeon_dirty_update(ScrnInfoPtr scrn)
+ {
+ RADEONInfoPtr info = RADEONPTR(scrn);
+ ScreenPtr screen = scrn->pScreen;
+- PixmapDirtyUpdatePtr ent;
++ PixmapDirtyUpdatePtr ent = NULL;
+ RegionPtr region;
+
+ xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
+@@ -1391,7 +1397,11 @@ static int radeon_get_drm_master_fd(Scrn
+ #endif
+ struct pci_device *dev = info->PciInfo;
+ char *busid;
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++ int fd, err;
++#else
+ int fd;
++#endif
+
+ #ifdef XF86_PDEV_SERVER_FD
+ if (pRADEONEnt->platform_dev) {
+@@ -1405,6 +1415,17 @@ static int radeon_get_drm_master_fd(Scrn
+ XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d",
+ dev->domain, dev->bus, dev->dev, dev->func);
+
++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
++ err = kldload("radeonkms");
++ if (err == -1 && errno != EEXIST) {
++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++ "[drm] Failed to load kernel module for %s: %s\n",
++ busid, strerror(errno));
++ free(busid);
++ return -1;
++ }
++#endif
++
+ fd = drmOpen(NULL, busid);
+ if (fd == -1)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,