FreeBSD Bugzilla – Attachment 177239 Details for
Bug 214580
graphics/libdrm: Update to 2.4.74
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
update graphics/libdrm to 2.4.73
graphics_libdrm.patch (text/plain), 21.86 KB, created by
Matthew Rezny
on 2016-11-21 18:13:56 UTC
(
hide
)
Description:
update graphics/libdrm to 2.4.73
Filename:
MIME Type:
Creator:
Matthew Rezny
Created:
2016-11-21 18:13:56 UTC
Size:
21.86 KB
patch
obsolete
>Index: graphics/libdrm/Makefile >=================================================================== >--- graphics/libdrm/Makefile (revision 426717) >+++ graphics/libdrm/Makefile (working copy) >@@ -2,7 +2,7 @@ > # $FreeBSD$ > > PORTNAME= libdrm >-PORTVERSION= 2.4.66 >+PORTVERSION= 2.4.73 > PORTEPOCH= 1 > CATEGORIES= graphics x11 > MASTER_SITES= http://dri.freedesktop.org/libdrm/ >@@ -10,7 +10,9 @@ > MAINTAINER= x11@FreeBSD.org > COMMENT= Userspace interface to kernel Direct Rendering Module services > >+BUILD_DEPENDS= libdevq>=0.0.4:devel/libdevq > LIB_DEPENDS= libpciaccess.so:devel/libpciaccess \ >+ libdevq.so:devel/libdevq \ > libpthread-stubs.so:devel/libpthread-stubs > > USES= libtool pkgconfig tar:bzip2 >@@ -51,12 +53,19 @@ > .if ${ARCH} == amd64 || ${ARCH} == i386 > PLIST_SUB+= INTEL_DRIVER="" > PLIST_SUB+= RADEON_DRIVERS="" >+PLIST_SUB+= VC4_DRIVERS="@comment " > .elif ${ARCH} == ia64 || ${ARCH} == powerpc || ${ARCH} == powerpc64 > PLIST_SUB+= INTEL_DRIVER="@comment " > PLIST_SUB+= RADEON_DRIVERS="" >+PLIST_SUB+= VC4_DRIVERS="@comment " >+.elif ${ARCH} == arm6 || ${ARCH} == aarch64 >+PLIST_SUB+= INTEL_DRIVER="@comment " >+PLIST_SUB+= RADEON_DRIVERS="@comment " >+PLIST_SUB+= VC4_DRIVERS="" > .else > PLIST_SUB+= INTEL_DRIVER="@comment " > PLIST_SUB+= RADEON_DRIVERS="@comment " >+PLIST_SUB+= VC4_DRIVERS="@comment " > .endif > > # This variable is not for users. So use a non-default name, intended for >Index: graphics/libdrm/distinfo >=================================================================== >--- graphics/libdrm/distinfo (revision 426717) >+++ graphics/libdrm/distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (libdrm-2.4.66.tar.bz2) = 79cb8e988749794edfb2d777b298d5292eff353bbbb71ed813589e61d2bc2d76 >-SIZE (libdrm-2.4.66.tar.bz2) = 694574 >+TIMESTAMP = 1479391762 >+SHA256 (libdrm-2.4.73.tar.bz2) = 96bfd39242fe168017d95f22e141645a35591f5902a7d98c2fa4ca8c31df5e4d >+SIZE (libdrm-2.4.73.tar.bz2) = 777305 >Index: graphics/libdrm/files/Makefile.am >=================================================================== >--- graphics/libdrm/files/Makefile.am (nonexistent) >+++ graphics/libdrm/files/Makefile.am (working copy) >@@ -0,0 +1,14 @@ >+--- Makefile.am.orig 2016-06-23 14:29:40.575882000 +0200 >++++ Makefile.am 2016-06-23 14:38:48.752016000 +0200 >+@@ -108,9 +108,9 @@ >+ libdrm_la_LTLIBRARIES = libdrm.la >+ libdrm_ladir = $(libdir) >+ libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined >+-libdrm_la_LIBADD = @CLOCK_LIB@ -lm >++libdrm_la_LIBADD = @CLOCK_LIB@ -lm @LIBDEVQ_LIBS@ >+ >+-libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm >++libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm @LIBDEVQ_CFLAGS@ >+ AM_CFLAGS = \ >+ $(WARN_CFLAGS) \ >+ $(VALGRIND_CFLAGS) > >Property changes on: graphics/libdrm/files/Makefile.am >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/libdrm/files/configure.ac >=================================================================== >--- graphics/libdrm/files/configure.ac (nonexistent) >+++ graphics/libdrm/files/configure.ac (working copy) >@@ -0,0 +1,39 @@ >+--- configure.ac.orig 2016-04-28 02:52:47.000000000 +0200 >++++ configure.ac 2016-07-09 18:53:39.021028000 +0200 >+@@ -71,6 +71,11 @@ >+ [Enable support for using udev instead of mknod (default: disabled)])], >+ [UDEV=$enableval], [UDEV=no]) >+ >++AC_ARG_ENABLE([devq], >++ [AS_HELP_STRING([--enable-devq], >++ [Enable support for using devq for device detection (default: disabled)])], >++ [DEVQ=$enableval], [DEVQ=no]) >++ >+ AC_ARG_ENABLE(libkms, >+ AS_HELP_STRING([--disable-libkms], >+ [Disable KMS mm abstraction library (default: auto, enabled on supported platforms)]), >+@@ -313,6 +318,10 @@ >+ AC_DEFINE(UDEV, 1, [Have UDEV support]) >+ fi >+ >++if test "x$DEVQ" = xyes; then >++ AC_DEFINE(DEVQ, 1, [Have DEVQ support]) >++fi >++ >+ AC_CANONICAL_HOST >+ if test "x$LIBKMS" = xauto ; then >+ case $host_os in >+@@ -444,6 +453,13 @@ >+ fi >+ AM_CONDITIONAL(HAVE_LIBUDEV, [test "x$HAVE_LIBUDEV" = xyes]) >+ >++# For FreeBSD support >++PKG_CHECK_MODULES([LIBDEVQ], [libdevq-1.0 >= 0.0.4], [HAVE_LIBDEVQ=yes], [HAVE_LIBDEVQ=no]) >++if test "x$HAVE_LIBDEVQ" = xyes; then >++ AC_DEFINE(HAVE_LIBDEVQ, 1, [Have libdevq support]) >++fi >++AM_CONDITIONAL(HAVE_LIBDEVQ, [test "x$HAVE_LIBDEVQ" = xyes]) >++ >+ # xsltproc for docbook manpages >+ AC_ARG_ENABLE([manpages], >+ AS_HELP_STRING([--enable-manpages], [enable manpages @<:@default=auto@:>@]), > >Property changes on: graphics/libdrm/files/configure.ac >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/libdrm/files/extra-xf86drm.c >=================================================================== >--- graphics/libdrm/files/extra-xf86drm.c (revision 426717) >+++ graphics/libdrm/files/extra-xf86drm.c (working copy) >@@ -11,7 +11,7 @@ > @@ -174,7 +174,7 @@ > > do { >- ret = ioctl(fd, request, arg); >+ ret = ioctl(fd, request, arg); > - } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); > + } while (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == 512)); > return ret; >Index: graphics/libdrm/files/patch-Makefile.in >=================================================================== >--- graphics/libdrm/files/patch-Makefile.in (nonexistent) >+++ graphics/libdrm/files/patch-Makefile.in (working copy) >@@ -0,0 +1,13 @@ >+--- Makefile.in.orig 2016-06-28 12:57:42.345759000 +0200 >++++ Makefile.in 2016-06-28 12:58:17.744034000 +0200 >+@@ -553,8 +553,8 @@ >+ libdrm_la_LTLIBRARIES = libdrm.la >+ libdrm_ladir = $(libdir) >+ libdrm_la_LDFLAGS = -version-number 2:4:0 -no-undefined >+-libdrm_la_LIBADD = @CLOCK_LIB@ -lm >+-libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm >++libdrm_la_LIBADD = @CLOCK_LIB@ -lm @LIBDEVQ_LIBS@ >++libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm @LIBDEVQ_CFLAGS@ >+ AM_CFLAGS = \ >+ $(WARN_CFLAGS) \ >+ $(VALGRIND_CFLAGS) > >Property changes on: graphics/libdrm/files/patch-Makefile.in >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/libdrm/files/patch-config.h.in >=================================================================== >--- graphics/libdrm/files/patch-config.h.in (nonexistent) >+++ graphics/libdrm/files/patch-config.h.in (working copy) >@@ -0,0 +1,22 @@ >+--- config.h.in.orig 2016-06-24 22:01:22.827102000 +0200 >++++ config.h.in 2016-06-24 22:01:44.000000000 +0200 >+@@ -8,6 +8,9 @@ >+ /* Define to 1 if using `alloca.c'. */ >+ #undef C_ALLOCA >+ >++/* Have DEVQ support */ >++#undef DEVQ >++ >+ /* Define to 1 if you have `alloca', as a function or macro. */ >+ #undef HAVE_ALLOCA >+ >+@@ -48,6 +51,9 @@ >+ /* Define to 1 if you have the <inttypes.h> header file. */ >+ #undef HAVE_INTTYPES_H >+ >++/* Have libdevq support */ >++#undef HAVE_LIBDEVQ >++ >+ /* Enable if your compiler supports the Intel __sync_* atomic primitives */ >+ #undef HAVE_LIBDRM_ATOMIC_PRIMITIVES >+ > >Property changes on: graphics/libdrm/files/patch-config.h.in >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/libdrm/files/patch-configure >=================================================================== >--- graphics/libdrm/files/patch-configure (nonexistent) >+++ graphics/libdrm/files/patch-configure (working copy) >@@ -0,0 +1,182 @@ >+--- configure.orig 2016-07-09 18:52:55.554602000 +0200 >++++ configure 2016-07-09 18:54:17.173605000 +0200 >+@@ -646,6 +646,10 @@ >+ MANPAGES_STYLESHEET >+ BUILD_MANPAGES_FALSE >+ BUILD_MANPAGES_TRUE >++HAVE_LIBDEVQ_FALSE >++HAVE_LIBDEVQ_TRUE >++LIBDEVQ_LIBS >++LIBDEVQ_CFLAGS >+ HAVE_LIBUDEV_FALSE >+ HAVE_LIBUDEV_TRUE >+ LIBUDEV_LIBS >+@@ -840,6 +844,7 @@ >+ with_sysroot >+ enable_libtool_lock >+ enable_udev >++enable_devq >+ enable_libkms >+ enable_intel >+ enable_radeon >+@@ -882,6 +887,8 @@ >+ CAIRO_LIBS >+ LIBUDEV_CFLAGS >+ LIBUDEV_LIBS >++LIBDEVQ_CFLAGS >++LIBDEVQ_LIBS >+ VALGRIND_CFLAGS >+ VALGRIND_LIBS' >+ >+@@ -1516,6 +1523,8 @@ >+ --disable-libtool-lock avoid locking (might break parallel builds) >+ --enable-udev Enable support for using udev instead of mknod >+ (default: disabled) >++ --enable-devq Enable support for using devq for device detection >++ (default: disabled) >+ --disable-libkms Disable KMS mm abstraction library (default: auto, >+ enabled on supported platforms) >+ --disable-intel Enable support for intel's KMS API (default: auto, >+@@ -1596,6 +1605,10 @@ >+ C compiler flags for LIBUDEV, overriding pkg-config >+ LIBUDEV_LIBS >+ linker flags for LIBUDEV, overriding pkg-config >++ LIBDEVQ_CFLAGS >++ C compiler flags for LIBDEVQ, overriding pkg-config >++ LIBDEVQ_LIBS >++ linker flags for LIBDEVQ, overriding pkg-config >+ VALGRIND_CFLAGS >+ C compiler flags for VALGRIND, overriding pkg-config >+ VALGRIND_LIBS >+@@ -13384,6 +13397,14 @@ >+ fi >+ >+ >++# Check whether --enable-devq was given. >++if test "${enable_devq+set}" = set; then : >++ enableval=$enable_devq; DEVQ=$enableval >++else >++ DEVQ=no >++fi >++ >++ >+ # Check whether --enable-libkms was given. >+ if test "${enable_libkms+set}" = set; then : >+ enableval=$enable_libkms; LIBKMS=$enableval >+@@ -13902,6 +13923,12 @@ >+ >+ fi >+ >++if test "x$DEVQ" = xyes; then >++ >++$as_echo "#define DEVQ 1" >>confdefs.h >++ >++fi >++ >+ >+ if test "x$LIBKMS" = xauto ; then >+ case $host_os in >+@@ -14432,6 +14459,92 @@ >+ fi >+ >+ >++# For FreeBSD support >++ >++pkg_failed=no >++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDEVQ" >&5 >++$as_echo_n "checking for LIBDEVQ... " >&6; } >++ >++if test -n "$LIBDEVQ_CFLAGS"; then >++ pkg_cv_LIBDEVQ_CFLAGS="$LIBDEVQ_CFLAGS" >++ elif test -n "$PKG_CONFIG"; then >++ if test -n "$PKG_CONFIG" && \ >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdevq-1.0 >= 0.0.4\""; } >&5 >++ ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= 0.0.4") 2>&5 >++ ac_status=$? >++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >++ test $ac_status = 0; }; then >++ pkg_cv_LIBDEVQ_CFLAGS=`$PKG_CONFIG --cflags "libdevq-1.0 >= 0.0.4" 2>/dev/null` >++ test "x$?" != "x0" && pkg_failed=yes >++else >++ pkg_failed=yes >++fi >++ else >++ pkg_failed=untried >++fi >++if test -n "$LIBDEVQ_LIBS"; then >++ pkg_cv_LIBDEVQ_LIBS="$LIBDEVQ_LIBS" >++ elif test -n "$PKG_CONFIG"; then >++ if test -n "$PKG_CONFIG" && \ >++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdevq-1.0 >= 0.0.4\""; } >&5 >++ ($PKG_CONFIG --exists --print-errors "libdevq-1.0 >= 0.0.4") 2>&5 >++ ac_status=$? >++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 >++ test $ac_status = 0; }; then >++ pkg_cv_LIBDEVQ_LIBS=`$PKG_CONFIG --libs "libdevq-1.0 >= 0.0.4" 2>/dev/null` >++ test "x$?" != "x0" && pkg_failed=yes >++else >++ pkg_failed=yes >++fi >++ else >++ pkg_failed=untried >++fi >++ >++ >++ >++if test $pkg_failed = yes; then >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >++$as_echo "no" >&6; } >++ >++if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then >++ _pkg_short_errors_supported=yes >++else >++ _pkg_short_errors_supported=no >++fi >++ if test $_pkg_short_errors_supported = yes; then >++ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdevq-1.0 >= 0.0.4" 2>&1` >++ else >++ LIBDEVQ_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdevq-1.0 >= 0.0.4" 2>&1` >++ fi >++ # Put the nasty error message in config.log where it belongs >++ echo "$LIBDEVQ_PKG_ERRORS" >&5 >++ >++ HAVE_LIBDEVQ=no >++elif test $pkg_failed = untried; then >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 >++$as_echo "no" >&6; } >++ HAVE_LIBDEVQ=no >++else >++ LIBDEVQ_CFLAGS=$pkg_cv_LIBDEVQ_CFLAGS >++ LIBDEVQ_LIBS=$pkg_cv_LIBDEVQ_LIBS >++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 >++$as_echo "yes" >&6; } >++ HAVE_LIBDEVQ=yes >++fi >++if test "x$HAVE_LIBDEVQ" = xyes; then >++ >++$as_echo "#define HAVE_LIBDEVQ 1" >>confdefs.h >++ >++fi >++ if test "x$HAVE_LIBDEVQ" = xyes; then >++ HAVE_LIBDEVQ_TRUE= >++ HAVE_LIBDEVQ_FALSE='#' >++else >++ HAVE_LIBDEVQ_TRUE='#' >++ HAVE_LIBDEVQ_FALSE= >++fi >++ >++ >+ # xsltproc for docbook manpages >+ # Check whether --enable-manpages was given. >+ if test "${enable_manpages+set}" = set; then : >+@@ -14838,6 +14951,10 @@ >+ as_fn_error $? "conditional \"HAVE_LIBUDEV\" was never defined. >+ Usually this means the macro was only invoked conditionally." "$LINENO" 5 >+ fi >++if test -z "${HAVE_LIBDEVQ_TRUE}" && test -z "${HAVE_LIBDEVQ_FALSE}"; then >++ as_fn_error $? "conditional \"HAVE_LIBDEVQ\" was never defined. >++Usually this means the macro was only invoked conditionally." "$LINENO" 5 >++fi >+ if test -z "${BUILD_MANPAGES_TRUE}" && test -z "${BUILD_MANPAGES_FALSE}"; then >+ as_fn_error $? "conditional \"BUILD_MANPAGES\" was never defined. >+ Usually this means the macro was only invoked conditionally." "$LINENO" 5 > >Property changes on: graphics/libdrm/files/patch-configure >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c >=================================================================== >--- graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c (revision 426717) >+++ graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c (nonexistent) >@@ -1,10 +0,0 @@ >---- tests/kms/kms-universal-planes.c.orig 2016-02-15 12:05:56.305353000 +0100 >-+++ tests/kms/kms-universal-planes.c 2016-02-15 12:06:11.194126000 +0100 >-@@ -32,6 +32,7 @@ >- #include <stdio.h> >- #include <string.h> >- #include <unistd.h> >-+#include <sys/select.h> >- >- #include <drm_fourcc.h> >- #include "xf86drm.h" > >Property changes on: graphics/libdrm/files/patch-tests_kms_kms-universal-planes.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: graphics/libdrm/files/patch-xf86drm.c >=================================================================== >--- graphics/libdrm/files/patch-xf86drm.c (nonexistent) >+++ graphics/libdrm/files/patch-xf86drm.c (working copy) >@@ -0,0 +1,193 @@ >+--- xf86drm.c.orig 2016-07-24 20:50:03.999898000 +0200 >++++ xf86drm.c 2016-07-24 20:53:31.587058000 +0200 >+@@ -62,6 +62,10 @@ >+ #endif >+ #include <math.h> >+ >++#ifdef HAVE_LIBDEVQ >++#include "libdevq.h" >++#endif >++ >+ /* Not all systems have MAP_FAILED defined */ >+ #ifndef MAP_FAILED >+ #define MAP_FAILED ((void *)-1) >+@@ -82,8 +86,12 @@ >+ #define DRM_RENDER_MINOR_NAME "renderD" >+ #endif >+ >+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) >+-#define DRM_MAJOR 145 >++#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) >++#define DRM_MAJOR 0 >++#endif >++ >++#if defined(__DragonFly__) >++#define DRM_MAJOR 65 /* was 154 XXX needs checking */ >+ #endif >+ >+ #ifdef __NetBSD__ >+@@ -532,6 +540,7 @@ static int drmGetMinorType(int minor) >+ } >+ } >+ >++#if !defined(__FreeBSD__) && !defined(__DragonFly__) >+ static const char *drmGetMinorName(int type) >+ { >+ switch (type) { >+@@ -545,6 +554,7 @@ static const char *drmGetMinorName(int t >+ return NULL; >+ } >+ } >++#endif >+ >+ /** >+ * Open the device by bus ID. >+@@ -2817,6 +2827,15 @@ static char *drmGetMinorNameForFD(int fd >+ >+ out_close_dir: >+ closedir(sysdir); >++#elif defined(__FreeBSD__) || defined(__DragonFly__) >++ struct stat buf; >++ char name[64]; >++ >++ fstat(fd, &buf); >++ snprintf(name, sizeof(name), "/dev/%s", >++ devname(buf.st_rdev, S_IFCHR)); >++ >++ return strdup(name); >+ #else >+ #warning "Missing implementation of drmGetMinorNameForFD" >+ #endif >+@@ -2854,12 +2873,19 @@ static int drmParseSubsystemType(int maj >+ return DRM_BUS_PCI; >+ >+ return -EINVAL; >++#elif defined(__FreeBSD__) || defined(__DragonFly__) >++ /* XXX: Don't know how to get the subsystem type, hardcode for now. >++ * The code following the call to this function needs depends on >++ * information provided by the /pci subsystem on linux. No replacement >++ * found yet for FreeBSD. */ >++ return DRM_BUS_PCI; >+ #else >+ #warning "Missing implementation of drmParseSubsystemType" >+ return -EINVAL; >+ #endif >+ } >+ >++#if !defined(__FreeBSD__) && !defined(__DragonFly__) >+ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) >+ { >+ #ifdef __linux__ >+@@ -2901,6 +2927,66 @@ static int drmParsePciBusInfo(int maj, i >+ return -EINVAL; >+ #endif >+ } >++#else >++ >++/* >++ * XXX temporary workaround, because FreeBSD doesn't provide >++ * pcibus device sysctl trees for renderD and controlD nodes (yet) >++ */ >++static char * >++drmBSDDeviceNameHack(const char *path) >++{ >++ int start; >++ const char *errstr; >++ int number; >++ char hacked_path[PATH_MAX + 1]; >++ >++ if (strcmp(path, DRM_DIR_NAME "/controlD") > 0) >++ { >++ start = 17; >++ number = strtonum(&path[start], 0, 256, &errstr) - 64; >++ snprintf(hacked_path, PATH_MAX, DRM_DIR_NAME "/card%i", number); >++ }else if (strcmp(path, DRM_DIR_NAME "/renderD") > 0) >++ { >++ start = 16; >++ number = strtonum(&path[start], 0, 256, &errstr) - 128; >++ snprintf(hacked_path, PATH_MAX, DRM_DIR_NAME "/card%i", number); >++ }else >++ snprintf(hacked_path, PATH_MAX, "%s", path); >++ >++ return hacked_path; >++} >++ >++static int >++drmParsePciBusInfoBSD(const char *path, drmPciBusInfoPtr info) >++{ >++ int fd, ret; >++ int domain = 0, bus = 0, slot = 0, function = 0; >++ >++ char hacked_path[PATH_MAX + 1]; >++ >++ snprintf(hacked_path, PATH_MAX, "%s", drmBSDDeviceNameHack(path)); >++ >++ fd = open(hacked_path, O_RDONLY); >++ >++ if (fd < 0) >++ return -errno; >++ >++ ret = devq_device_get_pcibusaddr(fd, &domain, &bus, &slot, &function); >++ >++ if (ret < 0) >++ return -1; >++ >++ info->domain = (uint16_t) domain; >++ info->bus = (uint8_t) bus; >++ info->dev = (uint8_t) slot; >++ info->func = (uint8_t) function; >++ >++ close(fd); >++ >++ return 0; >++} >++#endif >+ >+ static int drmCompareBusInfo(drmDevicePtr a, drmDevicePtr b) >+ { >+@@ -2971,6 +3057,32 @@ static int drmParsePciDeviceInfo(const c >+ device->subdevice_id = config[46] | (config[47] << 8); >+ >+ return 0; >++#elif defined(__FreeBSD__) || defined(__DragonFly__) >++ >++ int fd, vendor_id = 0, device_id = 0, subvendor_id = 0, >++ subdevice_id = 0, revision_id = 0; >++ char path[PATH_MAX + 1]; >++ char hacked_path[PATH_MAX + 1]; >++ >++ snprintf(path, PATH_MAX, DRM_DIR_NAME "/%s", d_name); >++ >++ snprintf(hacked_path, PATH_MAX, "%s", drmBSDDeviceNameHack(path)); >++ >++ fd = open(hacked_path, O_RDONLY); >++ >++ if (fd < 0) >++ return -errno; >++ >++ devq_device_get_pciid_full_from_fd(fd, &vendor_id, &device_id, >++ &subvendor_id, &subdevice_id, &revision_id); >++ >++ device->vendor_id = (uint16_t) vendor_id; >++ device->device_id = (uint16_t) device_id; >++ device->subvendor_id = (uint16_t) subvendor_id; >++ device->subdevice_id = (uint16_t) subdevice_id; >++ device->revision_id = (uint8_t) revision_id; >++ >++ return 0; >+ #else >+ #warning "Missing implementation of drmParsePciDeviceInfo" >+ return -EINVAL; >+@@ -3029,7 +3141,12 @@ static int drmProcessPciDevice(drmDevice >+ >+ (*device)->businfo.pci = (drmPciBusInfoPtr)addr; >+ >++#if defined(__FreeBSD__) || defined(__DragonFly__) >++ ret = drmParsePciBusInfoBSD(node, (*device)->businfo.pci); >++#else >+ ret = drmParsePciBusInfo(maj, min, (*device)->businfo.pci); >++#endif >++ >+ if (ret) >+ goto free_device; >+ > >Property changes on: graphics/libdrm/files/patch-xf86drm.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: graphics/libdrm/pkg-plist >=================================================================== >--- graphics/libdrm/pkg-plist (revision 426717) >+++ graphics/libdrm/pkg-plist (working copy) >@@ -33,8 +33,13 @@ > include/libdrm/savage_drm.h > include/libdrm/sis_drm.h > include/libdrm/tegra_drm.h >+include/libdrm/vc4_drm.h >+%%VC4_DRIVERS%%include/libdrm/vc4_packet.h >+%%VC4_DRIVERS%%include/libdrm/vc4_gpq_defines.h > include/libdrm/via_drm.h >+include/libdrm/virtgpu_drm.h > %%KMS%%include/libkms/libkms.h >+include/libsync.h > include/xf86drm.h > include/xf86drmMode.h > lib/libdrm.so >@@ -52,6 +57,9 @@ > %%RADEON_DRIVERS%%lib/libdrm_radeon.so > %%RADEON_DRIVERS%%lib/libdrm_radeon.so.1 > %%RADEON_DRIVERS%%lib/libdrm_radeon.so.1.0.1 >+%%VC4_DRIVERS%%lib/libdrm_vc4.so >+%%VC4_DRIVERS%%lib/libdrm_vc4.so.1 >+%%VC4_DRIVERS%%lib/libdrm_vc4.so.1.0.0 > %%KMS%%lib/libkms.so > %%KMS%%lib/libkms.so.1 > %%KMS%%lib/libkms.so.1.0.0 >@@ -60,6 +68,7 @@ > %%INTEL_DRIVER%%libdata/pkgconfig/libdrm_intel.pc > %%NOUVEAU%%libdata/pkgconfig/libdrm_nouveau.pc > %%RADEON_DRIVERS%%libdata/pkgconfig/libdrm_radeon.pc >+%%VC4_DRIVERS%%libdata/pkgconfig/libdrm_vc4.pc > %%KMS%%libdata/pkgconfig/libkms.pc > %%MAN%%man/man3/drmAvailable.3.gz > %%MAN%%man/man3/drmHandleEvent.3.gz
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 214580
:
177085
|
177234
|
177238
|
177239
|
177652
|
178929