summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Ross <gordon.w.ross@gmail.com>2016-11-28 14:49:23 -0500
committerGordon Ross <gordon.w.ross@gmail.com>2016-11-28 17:22:01 -0500
commitc7ad24849ce1fe4d3bcf41389f2b24585733e964 (patch)
tree4aaeab9d4483bfb60f950fe63d7f001aee4dfc06
parent349c94e7ad697613dd7950717e2b3b8c4ba5e404 (diff)
downloadillumos-gfx-drm-c7ad24849ce1fe4d3bcf41389f2b24585733e964.tar.gz
7632 Update to libdrm-2.4.73
-rw-r--r--usr/src/common/libdrm/Check-patches4
-rw-r--r--usr/src/common/libdrm/Makefile4
-rw-r--r--usr/src/common/libdrm/Makefile.drm2
-rw-r--r--usr/src/common/libdrm/patches/incl-drm-drm-h.patch25
-rw-r--r--usr/src/common/libdrm/patches/intel-drm.patch10
-rw-r--r--usr/src/pkg/manifests/x11-library-libdrm.mf4
-rw-r--r--usr/src/uts/common/drm/drm.h21
-rw-r--r--usr/src/uts/common/drm/drm_mode.h49
8 files changed, 92 insertions, 27 deletions
diff --git a/usr/src/common/libdrm/Check-patches b/usr/src/common/libdrm/Check-patches
index 4bf0a24..cb2460c 100644
--- a/usr/src/common/libdrm/Check-patches
+++ b/usr/src/common/libdrm/Check-patches
@@ -52,8 +52,8 @@
# One big patch might be easier than all this...
# but for now the patches are split up as shown below.
-ref=libdrm-2.4.71-ref
-dir=libdrm-2.4.71
+ref=libdrm-2.4.73-ref
+dir=libdrm-2.4.73
# You make this directory by hand. Not doing this automatically
# because I want to make srue you to know it's being written into.
diff --git a/usr/src/common/libdrm/Makefile b/usr/src/common/libdrm/Makefile
index 6846ecd..c648b8f 100644
--- a/usr/src/common/libdrm/Makefile
+++ b/usr/src/common/libdrm/Makefile
@@ -22,12 +22,12 @@ include $(SRC)/Makefile.master
FETCH= $(SRC)/tools/userland-fetch
# See also: ./Makefile.drm LIBDRM_VERS
-LIBDRM_VERS=2.4.71
+LIBDRM_VERS=2.4.73
LIBDRM_DIR=libdrm-$(LIBDRM_VERS)
LIBDRM_ARCHIVE=$(LIBDRM_DIR).tar.bz2
LIBDRM_URL=http://dri.freedesktop.org/libdrm/$(LIBDRM_ARCHIVE)
-LIBDRM_HASH=sha256:c66287ddeee5f46ea8f8880b94b80acb3bbc33ba6321d17767eef145046df9b8
+LIBDRM_HASH=sha256:96bfd39242fe168017d95f22e141645a35591f5902a7d98c2fa4ca8c31df5e4d
def all install install_h: .patched check
diff --git a/usr/src/common/libdrm/Makefile.drm b/usr/src/common/libdrm/Makefile.drm
index 737866a..7694568 100644
--- a/usr/src/common/libdrm/Makefile.drm
+++ b/usr/src/common/libdrm/Makefile.drm
@@ -17,7 +17,7 @@
#
# See also: ./Makefile LIBDRM_VERS and
# $SRC/pkg/manifests/x11-library-libdrm.mf
-LIBDRM_VERS=2.4.71
+LIBDRM_VERS=2.4.73
LIBDRM_CMN_DIR=$(SRC)/common/libdrm/libdrm-$(LIBDRM_VERS)
diff --git a/usr/src/common/libdrm/patches/incl-drm-drm-h.patch b/usr/src/common/libdrm/patches/incl-drm-drm-h.patch
index 152523a..0c38211 100644
--- a/usr/src/common/libdrm/patches/incl-drm-drm-h.patch
+++ b/usr/src/common/libdrm/patches/incl-drm-drm-h.patch
@@ -25,21 +25,26 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
-diff --git a/include/drm/drm.h b/include/drm/drm.h
+diff -u ... libdrm-2.4.73/include/drm/drm.h
index 8adb9d5..f9bedd0 100644
---- a/include/drm/drm.h 2016-04-28 03:44:16.000000000 +0300
-+++ b/include/drm/drm.h 2016-05-24 10:27:22.341573589 +0300
-@@ -55,10 +55,36 @@
+--- libdrm-2.4.73-ref/include/drm/drm.h Mon Nov 14 14:46:05 2016
++++ libdrm-2.4.73/include/drm/drm.h Mon Nov 28 14:32:21 2016
+@@ -55,14 +55,40 @@
typedef int64_t __s64;
typedef uint64_t __u64;
typedef size_t __kernel_size_t;
+#if defined(__SOLARIS__) || defined(__sun)
+#include <sys/types32.h>
+typedef unsigned long long drm_handle_t;
-+#else
++#else /* __SOLARIS__ or __sun */
typedef unsigned long drm_handle_t;
-+#endif
++#endif /* __SOLARIS__ or __sun */
+-#endif
++#endif /* One of the BSDs */
+
+ #if defined(__cplusplus)
+ extern "C" {
#endif
+/* Solaris-specific. */
@@ -66,7 +71,7 @@ index 8adb9d5..f9bedd0 100644
#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
-@@ -181,7 +207,8 @@
+@@ -185,7 +211,8 @@
_DRM_SHM = 2, /**< shared, cached */
_DRM_AGP = 3, /**< AGP/GART */
_DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */
@@ -76,7 +81,7 @@ index 8adb9d5..f9bedd0 100644
};
/**
-@@ -210,12 +237,13 @@
+@@ -214,12 +241,13 @@
* \sa drmAddMap().
*/
struct drm_map {
@@ -93,7 +98,7 @@ index 8adb9d5..f9bedd0 100644
int mtrr; /**< MTRR slot used */
/* Private data */
};
-@@ -322,18 +350,22 @@
+@@ -326,18 +354,22 @@
*
* \sa drmAddBufs().
*/
@@ -123,7 +128,7 @@ index 8adb9d5..f9bedd0 100644
unsigned long agp_start; /**<
* Start address of where the AGP buffers are
* in the AGP aperture
-@@ -379,6 +411,7 @@
+@@ -383,6 +415,7 @@
void *virtual; /**< Mmap'd area in user-virtual */
#endif
struct drm_buf_pub *list; /**< Buffer information */
diff --git a/usr/src/common/libdrm/patches/intel-drm.patch b/usr/src/common/libdrm/patches/intel-drm.patch
index be07ed1..7049f56 100644
--- a/usr/src/common/libdrm/patches/intel-drm.patch
+++ b/usr/src/common/libdrm/patches/intel-drm.patch
@@ -1,8 +1,7 @@
-diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
-index 0a4012b..cb463be 100644
---- a/intel/intel_bufmgr_gem.c
-+++ b/intel/intel_bufmgr_gem.c
-@@ -3268,13 +3268,24 @@ drm_intel_bufmgr_gem_set_aub_annotations(drm_intel_bo *bo,
+diff ... libdrm-2.4.73/intel/intel_bufmgr_gem.c
+--- libdrm-2.4.73-ref/intel/intel_bufmgr_gem.c Mon Nov 14 14:48:04 2016
++++ libdrm-2.4.73/intel/intel_bufmgr_gem.c Mon Nov 28 14:37:11 2016
+@@ -3352,6 +3352,16 @@
static pthread_mutex_t bufmgr_list_mutex = PTHREAD_MUTEX_INITIALIZER;
static drmMMListHead bufmgr_list = { &bufmgr_list, &bufmgr_list };
@@ -19,6 +18,7 @@ index 0a4012b..cb463be 100644
static drm_intel_bufmgr_gem *
drm_intel_bufmgr_gem_find(int fd)
{
+@@ -3358,7 +3368,8 @@
drm_intel_bufmgr_gem *bufmgr_gem;
DRMLISTFOREACHENTRY(bufmgr_gem, &bufmgr_list, managers) {
diff --git a/usr/src/pkg/manifests/x11-library-libdrm.mf b/usr/src/pkg/manifests/x11-library-libdrm.mf
index 5641dcf..7abbf93 100644
--- a/usr/src/pkg/manifests/x11-library-libdrm.mf
+++ b/usr/src/pkg/manifests/x11-library-libdrm.mf
@@ -14,12 +14,12 @@
#
set name=pkg.fmri \
- value=pkg:/x11/library/libdrm@2.4.71,$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
+ value=pkg:/x11/library/libdrm@2.4.73,$(PKGVERS_BUILTON)-$(PKGVERS_BRANCH)
set name=pkg.description value="Direct Rendering Manager (DRM) Libraries"
set name=pkg.summary value="DRM Libraries"
set name=info.classification value=System/X11
set name=info.source-url \
- value=http://dri.freedesktop.org/libdrm-2.4.71.tar.bz2
+ value=http://dri.freedesktop.org/libdrm-2.4.73.tar.bz2
set name=info.upstream-url value=http://dri.freedesktop.org
#
dir path=usr group=sys
diff --git a/usr/src/uts/common/drm/drm.h b/usr/src/uts/common/drm/drm.h
index a6f50af..cebbae3 100644
--- a/usr/src/uts/common/drm/drm.h
+++ b/usr/src/uts/common/drm/drm.h
@@ -58,10 +58,14 @@ typedef size_t __kernel_size_t;
#if defined(__SOLARIS__) || defined(__sun)
#include <sys/types32.h>
typedef unsigned long long drm_handle_t;
-#else
+#else /* __SOLARIS__ or __sun */
typedef unsigned long drm_handle_t;
-#endif
+#endif /* __SOLARIS__ or __sun */
+
+#endif /* One of the BSDs */
+#if defined(__cplusplus)
+extern "C" {
#endif
/* Solaris-specific. */
@@ -669,6 +673,7 @@ struct drm_gem_open {
#define DRM_CAP_CURSOR_WIDTH 0x8
#define DRM_CAP_CURSOR_HEIGHT 0x9
#define DRM_CAP_ADDFB2_MODIFIERS 0x10
+#define DRM_CAP_PAGE_FLIP_TARGET 0x11
/** DRM_IOCTL_GET_CAP ioctl argument type */
struct drm_get_cap {
@@ -718,8 +723,16 @@ struct drm_prime_handle {
__s32 fd;
};
+#if defined(__cplusplus)
+}
+#endif
+
#include "drm_mode.h"
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
#define DRM_IOCTL_BASE 'd'
#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
@@ -911,4 +924,8 @@ typedef struct drm_agp_info drm_agp_info_t;
typedef struct drm_scatter_gather drm_scatter_gather_t;
typedef struct drm_set_version drm_set_version_t;
+#if defined(__cplusplus)
+}
+#endif
+
#endif
diff --git a/usr/src/uts/common/drm/drm_mode.h b/usr/src/uts/common/drm/drm_mode.h
index 7a7856e..df0e350 100644
--- a/usr/src/uts/common/drm/drm_mode.h
+++ b/usr/src/uts/common/drm/drm_mode.h
@@ -29,6 +29,10 @@
#include "drm.h"
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
#define DRM_DISPLAY_INFO_LEN 32
#define DRM_CONNECTOR_NAME_LEN 32
#define DRM_DISPLAY_MODE_LEN 32
@@ -202,6 +206,7 @@ struct drm_mode_get_plane_res {
#define DRM_MODE_ENCODER_VIRTUAL 5
#define DRM_MODE_ENCODER_DSI 6
#define DRM_MODE_ENCODER_DPMST 7
+#define DRM_MODE_ENCODER_DPI 8
struct drm_mode_get_encoder {
__u32 encoder_id;
@@ -241,6 +246,7 @@ struct drm_mode_get_encoder {
#define DRM_MODE_CONNECTOR_eDP 14
#define DRM_MODE_CONNECTOR_VIRTUAL 15
#define DRM_MODE_CONNECTOR_DSI 16
+#define DRM_MODE_CONNECTOR_DPI 17
struct drm_mode_get_connector {
@@ -514,7 +520,13 @@ struct drm_color_lut {
#define DRM_MODE_PAGE_FLIP_EVENT 0x01
#define DRM_MODE_PAGE_FLIP_ASYNC 0x02
-#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC)
+#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
+#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8
+#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | \
+ DRM_MODE_PAGE_FLIP_TARGET_RELATIVE)
+#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | \
+ DRM_MODE_PAGE_FLIP_ASYNC | \
+ DRM_MODE_PAGE_FLIP_TARGET)
/*
* Request a page flip on the specified crtc.
@@ -537,8 +549,7 @@ struct drm_color_lut {
* 'as soon as possible', meaning that it not delay waiting for vblank.
* This may cause tearing on the screen.
*
- * The reserved field must be zero until we figure out something
- * clever to use it for.
+ * The reserved field must be zero.
*/
struct drm_mode_crtc_page_flip {
@@ -549,6 +560,34 @@ struct drm_mode_crtc_page_flip {
__u64 user_data;
};
+/*
+ * Request a page flip on the specified crtc.
+ *
+ * Same as struct drm_mode_crtc_page_flip, but supports new flags and
+ * re-purposes the reserved field:
+ *
+ * The sequence field must be zero unless either of the
+ * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is specified. When
+ * the ABSOLUTE flag is specified, the sequence field denotes the absolute
+ * vblank sequence when the flip should take effect. When the RELATIVE
+ * flag is specified, the sequence field denotes the relative (to the
+ * current one when the ioctl is called) vblank sequence when the flip
+ * should take effect. NOTE: DRM_IOCTL_WAIT_VBLANK must still be used to
+ * make sure the vblank sequence before the target one has passed before
+ * calling this ioctl. The purpose of the
+ * DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE/RELATIVE flags is merely to clarify
+ * the target for when code dealing with a page flip runs during a
+ * vertical blank period.
+ */
+
+struct drm_mode_crtc_page_flip_target {
+ __u32 crtc_id;
+ __u32 fb_id;
+ __u32 flags;
+ __u32 sequence;
+ __u64 user_data;
+};
+
/* create a dumb scanout buffer */
struct drm_mode_create_dumb {
__u32 height;
@@ -621,4 +660,8 @@ struct drm_mode_destroy_blob {
__u32 blob_id;
};
+#if defined(__cplusplus)
+}
+#endif
+
#endif