pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

xf86-video-ati-dfbsd: Import xf86-video-ati-7.9.0 as wip/xf86-video-ati-dfbsd



Module Name:	pkgsrc-wip
Committed By:	David Shao <davshao%gmail.com@localhost>
Pushed By:	dshao
Date:		Thu Mar 23 17:04:23 2017 -0700
Changeset:	ec37b9817841524345ba08e5e6f80256a4ec2c88

Modified Files:
	Makefile
Added Files:
	xf86-video-ati-dfbsd/DESCR
	xf86-video-ati-dfbsd/Makefile
	xf86-video-ati-dfbsd/PLIST
	xf86-video-ati-dfbsd/TODO
	xf86-video-ati-dfbsd/distinfo
	xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c

Log Message:
xf86-video-ati-dfbsd: Import xf86-video-ati-7.9.0 as wip/xf86-video-ati-dfbsd

Patches to load kernel module radeonkms.ko on FreeBSD and DragonFly.

Adds debug option.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ec37b9817841524345ba08e5e6f80256a4ec2c88

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 xf86-video-ati-dfbsd/DESCR                         |  1 +
 xf86-video-ati-dfbsd/Makefile                      | 54 ++++++++++++++++++++
 xf86-video-ati-dfbsd/PLIST                         |  6 +++
 xf86-video-ati-dfbsd/TODO                          |  5 ++
 xf86-video-ati-dfbsd/distinfo                      |  7 +++
 .../patches/patch-src_radeon__kms.c                | 59 ++++++++++++++++++++++
 7 files changed, 133 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index e97452ca2e..9a635a0a7a 100644
--- a/Makefile
+++ b/Makefile
@@ -4412,6 +4412,7 @@ SUBDIR+=	xesam-glib
 SUBDIR+=	xf86-input-mouse-dfbsd
 SUBDIR+=	xf86-input-synaptics
 SUBDIR+=	xf86-input-vboxmouse
+SUBDIR+=	xf86-video-ati-dfbsd
 SUBDIR+=	xf86-video-geode
 SUBDIR+=	xf86-video-intel-devel-dfbsd
 SUBDIR+=	xf86-video-intel-dfbsd
diff --git a/xf86-video-ati-dfbsd/DESCR b/xf86-video-ati-dfbsd/DESCR
new file mode 100644
index 0000000000..8300629834
--- /dev/null
+++ b/xf86-video-ati-dfbsd/DESCR
@@ -0,0 +1 @@
+This is the video driver for ATI Radeon cards for the modular Xorg server.
diff --git a/xf86-video-ati-dfbsd/Makefile b/xf86-video-ati-dfbsd/Makefile
new file mode 100644
index 0000000000..bb7fa74dbf
--- /dev/null
+++ b/xf86-video-ati-dfbsd/Makefile
@@ -0,0 +1,54 @@
+# $NetBSD: Makefile,v 1.42 2017/03/16 12:04:25 wiz Exp $
+
+DISTNAME=	xf86-video-ati-7.9.0
+CATEGORIES=	x11
+MASTER_SITES=	${MASTER_SITE_XORG:=driver/}
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	joerg%NetBSD.org@localhost
+HOMEPAGE=	http://xorg.freedesktop.org/
+COMMENT=	Modular Xorg ATI Radeon video driver
+
+CONFLICTS+=	xf86-video-ati6-[0-9]*
+
+USE_LIBTOOL=	YES
+GNU_CONFIGURE=	YES
+USE_TOOLS+=	gmake pkg-config
+
+.include "../../mk/bsd.prefs.mk"
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.xf86-video-ati
+PKG_SUPPORTED_OPTIONS=  debug	
+
+.include "../../mk/bsd.options.mk"
+
+CONFIGURE_ARGS+=	--enable-glamor
+
+# Debug flags recommended for server and drivers by:
+# https://www.x.org/wiki/Development/Documentation/ServerDebugging/
+.if !empty(PKG_OPTIONS:Mdebug)
+CFLAGS+=		-O0 -g3
+.endif
+
+CONFIGURE_ENV.SunOS+=	DRIVER_MAN_SUFFIX=4
+
+.include "../../devel/xorg-util-macros/buildlink3.mk"
+
+BUILDLINK_API_DEPENDS.modular-xorg-server+=	modular-xorg-server>=1.18.1
+.include "../../x11/modular-xorg-server/buildlink3.mk"
+
+.include "../../devel/zlib/buildlink3.mk"
+.include "../../x11/fontsproto/buildlink3.mk"
+.include "../../x11/glproto/buildlink3.mk"
+BUILDLINK_API_DEPENDS.libdrm+=	libdrm>=2.4.58
+.include "../../x11/libdrm/buildlink3.mk"
+.include "../../x11/randrproto/buildlink3.mk"
+.include "../../x11/renderproto/buildlink3.mk"
+.include "../../x11/videoproto/buildlink3.mk"
+.include "../../x11/xf86driproto/buildlink3.mk"
+.include "../../x11/xf86miscproto/buildlink3.mk"
+.include "../../x11/xextproto/buildlink3.mk"
+.include "../../x11/xineramaproto/buildlink3.mk"
+.include "../../x11/xproto/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/xf86-video-ati-dfbsd/PLIST b/xf86-video-ati-dfbsd/PLIST
new file mode 100644
index 0000000000..9ce90f3662
--- /dev/null
+++ b/xf86-video-ati-dfbsd/PLIST
@@ -0,0 +1,6 @@
+@comment $NetBSD: PLIST,v 1.5 2017/03/16 12:04:25 wiz Exp $
+lib/xorg/modules/drivers/ati_drv.la
+lib/xorg/modules/drivers/radeon_drv.la
+man/man4/ati.4
+man/man4/radeon.4
+share/X11/xorg.conf.d/10-radeon.conf
diff --git a/xf86-video-ati-dfbsd/TODO b/xf86-video-ati-dfbsd/TODO
new file mode 100644
index 0000000000..74e3087a79
--- /dev/null
+++ b/xf86-video-ati-dfbsd/TODO
@@ -0,0 +1,5 @@
+Copy port to x11/xf86-video-ati, do not install from wip.
+
+DragonFly and FreeBSD patches to load radeonkms.ko kernel module.
+
+Implements debug option.
diff --git a/xf86-video-ati-dfbsd/distinfo b/xf86-video-ati-dfbsd/distinfo
new file mode 100644
index 0000000000..ad2c161cf2
--- /dev/null
+++ b/xf86-video-ati-dfbsd/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.30 2017/03/16 12:04:25 wiz Exp $
+
+SHA1 (xf86-video-ati-7.9.0.tar.bz2) = 86ee6db1d7dcdeb1948aeb7965be8102c18be46b
+RMD160 (xf86-video-ati-7.9.0.tar.bz2) = b9e6650008e4c43e45f7a603b7431bc296dc1475
+SHA512 (xf86-video-ati-7.9.0.tar.bz2) = 125e035da6581520d677c56474653ed75aa6d168bf5450cc973248416b5ada3114ea14d0615b44c58029bb1702609453ab532a506273df2a5dd99dd2af4a9d43
+Size (xf86-video-ati-7.9.0.tar.bz2) = 848502 bytes
+SHA1 (patch-src_radeon__kms.c) = 2865ae6d8953f8e2f8eecf9d690b97498ebb313d
diff --git a/xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c b/xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c
new file mode 100644
index 0000000000..bbe25bd83f
--- /dev/null
+++ b/xf86-video-ati-dfbsd/patches/patch-src_radeon__kms.c
@@ -0,0 +1,59 @@
+$NetBSD$
+
+From DragonFly dports since otherwise radeonkms.ko not loaded.
+
+--- src/radeon_kms.c.orig	2017-03-16 07:43:58.000000000 +0000
++++ src/radeon_kms.c
+@@ -30,6 +30,10 @@
+ 
+ #include <errno.h>
+ #include <sys/ioctl.h>
++#if defined(__FreeBSD__) || defined(__DragonFly__)
++#include <sys/param.h>
++#include <sys/linker.h>
++#endif
+ /* Driver data structures */
+ #include "radeon.h"
+ #include "radeon_drm_queue.h"
+@@ -824,7 +828,11 @@ static void
+ radeon_dirty_update(ScrnInfoPtr scrn)
+ {
+ 	ScreenPtr screen = scrn->pScreen;
++#if defined(__FreeBSD__) || defined(__DragonFly__)
++	PixmapDirtyUpdatePtr ent = NULL;
++#else
+ 	PixmapDirtyUpdatePtr ent;
++#endif
+ 	RegionPtr region;
+ 
+ 	xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) {
+@@ -1401,7 +1409,11 @@ static int radeon_get_drm_master_fd(Scrn
+ #endif
+     struct pci_device *dev = info->PciInfo;
+     char *busid;
++#if defined(__FreeBSD__) || defined(__DragonFly__)
++    int fd, err;
++#else
+     int fd;
++#endif
+ 
+ #ifdef XF86_PDEV_SERVER_FD
+     if (pRADEONEnt->platform_dev) {
+@@ -1415,6 +1427,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(__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,


Home | Main Index | Thread Index | Old Index