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

libdrm: Changes to 'upstream-experimental'



 amdgpu/amdgpu-symbol-check   |    1 
 amdgpu/amdgpu.h              |   18 +++++++++++++++++
 amdgpu/amdgpu_gpu_info.c     |   15 ++++++++++++++
 configure.ac                 |    4 +--
 etnaviv/etnaviv-symbol-check |    1 
 etnaviv/etnaviv_cmd_stream.c |   33 +++++++++++++++++++++++++++----
 etnaviv/etnaviv_drm.h        |    8 +++++++
 etnaviv/etnaviv_drmif.h      |    2 +
 exynos/exynos_drmif.h        |    8 +++++++
 include/drm/drm.h            |    3 +-
 include/drm/drm_mode.h       |   45 +++++++++++++++++++++++++++++--------------
 intel/intel_bufmgr_gem.c     |    1 
 man/drm-kms.xml              |    4 +--
 man/drm-memory.xml           |    4 +--
 man/drm.xml                  |    6 ++---
 man/drmAvailable.xml         |    4 +--
 man/drmHandleEvent.xml       |    4 +--
 man/drmModeGetResources.xml  |    4 +--
 xf86drm.h                    |    9 +++++++-
 xf86drmMode.c                |   24 +++++++++++++++-------
 20 files changed, 154 insertions(+), 44 deletions(-)

New commits:
commit f02719c5246d301a50d7e0356bf3fe61b1e945a1
Author: Christian Gmeiner <christian.gmeiner@gmail.com>
Date:   Sat Apr 15 00:45:57 2017 +0200

    configure.ac: bump version for release
    
    Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>

diff --git a/configure.ac b/configure.ac
index a67480c..e5158b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 
 AC_PREREQ([2.63])
 AC_INIT([libdrm],
-        [2.4.79],
+        [2.4.80],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
         [libdrm])
 

commit 2f902a6844124291e8f4458ecae98543bd9a2802
Author: Philipp Zabel <p.zabel@pengutronix.de>
Date:   Mon Apr 10 11:15:53 2017 +0200

    etnaviv: add fence fd support
    
    Add etna_cmd_stream_flush2 with in-fence fd and out-fence fd support for
    explicit fencing.
    
    v3: added etna_cmd_stream_flush2 to etnaviv/etnaviv-symbol-check
    
    v2: renamed etna_cmd_stream_flush_explicit to etna_cmd_stream_flush2
    
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
    Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

diff --git a/etnaviv/etnaviv-symbol-check b/etnaviv/etnaviv-symbol-check
index 22afd16..0e2030e 100755
--- a/etnaviv/etnaviv-symbol-check
+++ b/etnaviv/etnaviv-symbol-check
@@ -39,6 +39,7 @@ etna_cmd_stream_new
 etna_cmd_stream_del
 etna_cmd_stream_timestamp
 etna_cmd_stream_flush
+etna_cmd_stream_flush2
 etna_cmd_stream_finish
 etna_cmd_stream_reloc
 EOF
diff --git a/etnaviv/etnaviv_cmd_stream.c b/etnaviv/etnaviv_cmd_stream.c
index 9ce3f36..3c7b0ed 100644
--- a/etnaviv/etnaviv_cmd_stream.c
+++ b/etnaviv/etnaviv_cmd_stream.c
@@ -177,7 +177,8 @@ static uint32_t bo2idx(struct etna_cmd_stream *stream, struct etna_bo *bo,
 	return idx;
 }
 
-static void flush(struct etna_cmd_stream *stream)
+static void flush(struct etna_cmd_stream *stream, int in_fence_fd,
+		  int *out_fence_fd)
 {
 	struct etna_cmd_stream_priv *priv = etna_cmd_stream_priv(stream);
 	int ret, id = priv->pipe->id;
@@ -194,8 +195,22 @@ static void flush(struct etna_cmd_stream *stream)
 		.stream_size = stream->offset * 4, /* in bytes */
 	};
 
+	if (in_fence_fd != -1) {
+		req.flags |= ETNA_SUBMIT_FENCE_FD_IN | ETNA_SUBMIT_NO_IMPLICIT;
+		req.fence_fd = in_fence_fd;
+	}
+
+	if (out_fence_fd)
+		req.flags |= ETNA_SUBMIT_FENCE_FD_OUT;
+
+	/*
+	 * Pass the complete submit structure only if flags are set. Otherwise,
+	 * only pass the fields up to, but not including the flags field for
+	 * backwards compatiblity with older kernels.
+	 */
 	ret = drmCommandWriteRead(gpu->dev->fd, DRM_ETNAVIV_GEM_SUBMIT,
-			&req, sizeof(req));
+			&req, req.flags ? sizeof(req) :
+			offsetof(struct drm_etnaviv_gem_submit, flags));
 
 	if (ret)
 		ERROR_MSG("submit failed: %d (%s)", ret, strerror(errno));
@@ -208,11 +223,21 @@ static void flush(struct etna_cmd_stream *stream)
 		bo->current_stream = NULL;
 		etna_bo_del(bo);
 	}
+
+	if (out_fence_fd)
+		*out_fence_fd = req.fence_fd;
 }
 
 void etna_cmd_stream_flush(struct etna_cmd_stream *stream)
 {
-	flush(stream);
+	flush(stream, -1, NULL);
+	reset_buffer(stream);
+}
+
+void etna_cmd_stream_flush2(struct etna_cmd_stream *stream, int in_fence_fd,
+			    int *out_fence_fd)
+{
+	flush(stream, in_fence_fd, out_fence_fd);
 	reset_buffer(stream);
 }
 
@@ -220,7 +245,7 @@ void etna_cmd_stream_finish(struct etna_cmd_stream *stream)
 {
 	struct etna_cmd_stream_priv *priv = etna_cmd_stream_priv(stream);
 
-	flush(stream);
+	flush(stream, -1, NULL);
 	etna_pipe_wait(priv->pipe, priv->last_timestamp, 5000);
 	reset_buffer(stream);
 }
diff --git a/etnaviv/etnaviv_drmif.h b/etnaviv/etnaviv_drmif.h
index 8119baa..87704ac 100644
--- a/etnaviv/etnaviv_drmif.h
+++ b/etnaviv/etnaviv_drmif.h
@@ -142,6 +142,8 @@ struct etna_cmd_stream *etna_cmd_stream_new(struct etna_pipe *pipe, uint32_t siz
 void etna_cmd_stream_del(struct etna_cmd_stream *stream);
 uint32_t etna_cmd_stream_timestamp(struct etna_cmd_stream *stream);
 void etna_cmd_stream_flush(struct etna_cmd_stream *stream);
+void etna_cmd_stream_flush2(struct etna_cmd_stream *stream, int in_fence_fd,
+			    int *out_fence_fd);
 void etna_cmd_stream_finish(struct etna_cmd_stream *stream);
 
 static inline uint32_t etna_cmd_stream_avail(struct etna_cmd_stream *stream)

commit 26e51e413be72256d4d416f8a9b9d04a78bfbf18
Author: Philipp Zabel <p.zabel@pengutronix.de>
Date:   Mon Apr 10 11:15:52 2017 +0200

    etnaviv: sync uapi header
    
    Import the etnaviv header changes from kernel commits 9ad59fea162c
    ("drm/etnaviv: submit support for in-fences") and 78ec187f64fa
    ("drm/etnaviv: submit support for out-fences") for fence fd support.
    
    The drm_etnaviv_gem_submit structure was extended to include a flags
    field, new flags for in-fence and out-fence fds and an input/output
    fence fd field.
    
    This is one-way backwards compatible because old userspace code passing
    a short structure not including the flags field to new kernels will
    cause the remaining fields to be zero-filled. New userspace code must
    make sure to only pass the short structure to old kernels, though.
    
    Not generated using make headers_install, since the drm/etnaviv_drm.h
    uapi header is not installed yet by the kernel.
    Copied from the airlied/drm-next commit 78ec187f64fa.
    
    v2: improved commit message
    
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
    Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

diff --git a/etnaviv/etnaviv_drm.h b/etnaviv/etnaviv_drm.h
index 2584c1c..76f6f78 100644
--- a/etnaviv/etnaviv_drm.h
+++ b/etnaviv/etnaviv_drm.h
@@ -154,6 +154,12 @@ struct drm_etnaviv_gem_submit_bo {
  * one or more cmdstream buffers.  This allows for conditional execution
  * (context-restore), and IB buffers needed for per tile/bin draw cmds.
  */
+#define ETNA_SUBMIT_NO_IMPLICIT         0x0001
+#define ETNA_SUBMIT_FENCE_FD_IN         0x0002
+#define ETNA_SUBMIT_FENCE_FD_OUT        0x0004
+#define ETNA_SUBMIT_FLAGS		(ETNA_SUBMIT_NO_IMPLICIT | \
+					 ETNA_SUBMIT_FENCE_FD_IN | \
+					 ETNA_SUBMIT_FENCE_FD_OUT)
 #define ETNA_PIPE_3D      0x00
 #define ETNA_PIPE_2D      0x01
 #define ETNA_PIPE_VG      0x02
@@ -167,6 +173,8 @@ struct drm_etnaviv_gem_submit {
 	__u64 bos;            /* in, ptr to array of submit_bo's */
 	__u64 relocs;         /* in, ptr to array of submit_reloc's */
 	__u64 stream;         /* in, ptr to cmdstream */
+	__u32 flags;          /* in, mask of ETNA_SUBMIT_x */
+	__s32 fence_fd;       /* in/out, fence fd (see ETNA_SUBMIT_FENCE_FD_x) */
 };
 
 /* The normal way to synchronize with the GPU is just to CPU_PREP on

commit 3f1df25e0b6ebff8841647dff867b62d66dc40d7
Author: Eric Engestrom <eric@engestrom.ch>
Date:   Sun Apr 9 22:48:46 2017 +0100

    intel: remove dead code
    
    Signed-off-by: Eric Engestrom <eric@engestrom.ch>

diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index e260f2d..45a26da 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -659,7 +659,6 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo)
 	} else {
 		return false;
 	}
-	return (ret == 0 && busy.busy);
 }
 
 static int

commit 47521438eb5c3f01c0bbae79c85ddbe8a5435a98
Author: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Date:   Wed Apr 5 16:22:24 2017 +0200

    exynos: add C++ support to exynos_drmif header
    
    Add the usual extern "C" when compiling in C++ mode.
    
    Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

diff --git a/exynos/exynos_drmif.h b/exynos/exynos_drmif.h
index 626e399..154439b 100644
--- a/exynos/exynos_drmif.h
+++ b/exynos/exynos_drmif.h
@@ -31,6 +31,10 @@
 #include <stdint.h>
 #include "exynos_drm.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 struct exynos_device {
 	int fd;
 };
@@ -109,4 +113,8 @@ int exynos_handle_event(struct exynos_device *dev,
 				struct exynos_event_context *ctx);
 
 
+#if defined(__cplusplus)
+}
+#endif
+
 #endif /* EXYNOS_DRMIF_H_ */

commit c9c77c37175be1a8f30e34d30f32a9f3f3df0dce
Author: Marek Olšák <marek.olsak@amd.com>
Date:   Sat Apr 8 21:58:46 2017 +0200

    configure.ac: bump version for release

diff --git a/configure.ac b/configure.ac
index 37022fe..a67480c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 
 AC_PREREQ([2.63])
 AC_INIT([libdrm],
-        [2.4.78],
+        [2.4.79],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
         [libdrm])
 

commit 047aba169731b32ca80b612e6e0d71e4b4e11937
Author: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Date:   Tue Apr 4 16:34:56 2017 +0200

    amdgpu: allow to query GPU sensor related information
    
    This exposes amdgpu_query_sensor_info().
    
    v2: - add amdgpu_query_sensor_info() to the symbols list
    
    Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>

diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
index 8e06474..4d1ae65 100755
--- a/amdgpu/amdgpu-symbol-check
+++ b/amdgpu/amdgpu-symbol-check
@@ -46,6 +46,7 @@ amdgpu_query_heap_info
 amdgpu_query_hw_ip_count
 amdgpu_query_hw_ip_info
 amdgpu_query_info
+amdgpu_query_sensor_info
 amdgpu_read_mm_registers
 amdgpu_va_range_alloc
 amdgpu_va_range_free
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index 6b2ded8..55884b2 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -1059,6 +1059,24 @@ int amdgpu_query_gds_info(amdgpu_device_handle dev,
 			struct amdgpu_gds_resource_info *gds_info);
 
 /**
+ * Query information about sensor.
+ *
+ * The return size is query-specific and depends on the "sensor_type"
+ * parameter. No more than "size" bytes is returned.
+ *
+ * \param   dev         - \c [in] Device handle. See #amdgpu_device_initialize()
+ * \param   sensor_type - \c [in] AMDGPU_INFO_SENSOR_*
+ * \param   size        - \c [in] Size of the returned value.
+ * \param   value       - \c [out] Pointer to the return value.
+ *
+ * \return   0 on success\n
+ *          <0 - Negative POSIX Error code
+ *
+*/
+int amdgpu_query_sensor_info(amdgpu_device_handle dev, unsigned sensor_type,
+			     unsigned size, void *value);
+
+/**
  * Read a set of consecutive memory-mapped registers.
  * Not all registers are allowed to be read by userspace.
  *
diff --git a/amdgpu/amdgpu_gpu_info.c b/amdgpu/amdgpu_gpu_info.c
index c5f5f6f..f4b94c9 100644
--- a/amdgpu/amdgpu_gpu_info.c
+++ b/amdgpu/amdgpu_gpu_info.c
@@ -318,3 +318,18 @@ int amdgpu_query_gds_info(amdgpu_device_handle dev,
 
 	return 0;
 }
+
+int amdgpu_query_sensor_info(amdgpu_device_handle dev, unsigned sensor_type,
+			     unsigned size, void *value)
+{
+	struct drm_amdgpu_info request;
+
+	memset(&request, 0, sizeof(request));
+	request.return_pointer = (uintptr_t)value;
+	request.return_size = size;
+	request.query = AMDGPU_INFO_SENSOR;
+	request.sensor_info.type = sensor_type;
+
+	return drmCommandWrite(dev->fd, DRM_AMDGPU_INFO, &request,
+			       sizeof(struct drm_amdgpu_info));
+}

commit 1142f9b30fd5c3b2ca93069bee757418ba497895
Author: Daniel Stone <daniels@collabora.com>
Date:   Fri Apr 7 09:10:15 2017 +0100

    configure.ac: bump version for release

diff --git a/configure.ac b/configure.ac
index 7b9369b..37022fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 
 AC_PREREQ([2.63])
 AC_INIT([libdrm],
-        [2.4.77],
+        [2.4.78],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=DRI],
         [libdrm])
 

commit 890d43a6a8d091211b82dd432af5e0a38472ffa6
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Mon Aug 17 16:21:24 2015 +0300

    Add CRTC ID to vblank event
    
    When using the atomic API, one request can span multiple CRTCs, however
    one event is generated per CRTC. As we cannot disambiguate the CRTC with
    user data (since we only have one piece of user data to pass in), newer
    kernels can include the CRTC ID in the page flip event.
    
    Add a new vfunc to dispatch vblank events carrying a CRTC ID to clients
    who negotiate a higher interface version.
    
    [daniels: Rebased, include new cap, call page_flip_handler if it is set
              but page_flip_handler2 isn't even on newer contexts, write a
    	  commit message.]
    
    v2: Split into separate commit.
    
    Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Maarten Lankhorst <maarten.lankhorst@intel.com>

diff --git a/xf86drm.h b/xf86drm.h
index 0d92701..d75ca8c 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -728,7 +728,7 @@ extern void drmMsg(const char *format, ...) DRM_PRINTFLIKE(1, 2);
 extern int drmSetMaster(int fd);
 extern int drmDropMaster(int fd);
 
-#define DRM_EVENT_CONTEXT_VERSION 2
+#define DRM_EVENT_CONTEXT_VERSION 3
 
 typedef struct _drmEventContext {
 
@@ -748,6 +748,13 @@ typedef struct _drmEventContext {
 				  unsigned int tv_usec,
 				  void *user_data);
 
+	void (*page_flip_handler2)(int fd,
+				   unsigned int sequence,
+				   unsigned int tv_sec,
+				   unsigned int tv_usec,
+				   unsigned int crtc_id,
+				   void *user_data);
+
 } drmEventContext, *drmEventContextPtr;
 
 extern int drmHandleEvent(int fd, drmEventContextPtr evctx);
diff --git a/xf86drmMode.c b/xf86drmMode.c
index 0266bc1..d3bc20e 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -889,6 +889,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
 	int len, i;
 	struct drm_event *e;
 	struct drm_event_vblank *vblank;
+	void *user_data;
 
 	/* The DRM read semantics guarantees that we always get only
 	 * complete events. */
@@ -915,15 +916,22 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
 					      U642VOID (vblank->user_data));
 			break;
 		case DRM_EVENT_FLIP_COMPLETE:
-			if (evctx->version < 2 ||
-			    evctx->page_flip_handler == NULL)
-				break;
 			vblank = (struct drm_event_vblank *) e;
-			evctx->page_flip_handler(fd,
-						 vblank->sequence,
-						 vblank->tv_sec,
-						 vblank->tv_usec,
-						 U642VOID (vblank->user_data));
+			user_data = U642VOID (vblank->user_data);
+
+			if (evctx->version >= 3 && evctx->page_flip_handler2)
+				evctx->page_flip_handler2(fd,
+							 vblank->sequence,
+							 vblank->tv_sec,
+							 vblank->tv_usec,
+							 vblank->crtc_id,
+							 user_data);
+			else if (evctx->version >= 2 && evctx->page_flip_handler)
+				evctx->page_flip_handler(fd,
+							 vblank->sequence,
+							 vblank->tv_sec,
+							 vblank->tv_usec,
+							 user_data);
 			break;
 		default:
 			break;

commit e379c6a137bba5c40d9a126b71a667b4d7f5697a
Author: Daniel Stone <daniels@collabora.com>
Date:   Tue Apr 4 21:38:56 2017 +0100

    Headers: Sync drm{,_mode}.h with the kernel
    
    Generated using make headers_install, based on drm-misc-next commit
    5db06a8a98f515f67446a69c57577c4c363ec65d.
    
    This clarifies the comments around modifiers such that they are
    per-framebuffer rather than per-plane, adds the beginnings of aspect
    ratio mode flags, link status properties, and updates the 'reserved'
    field from vblank events to include the CRTC ID.
    
    v2: Split into separate patch, pull in full kernel changes.
    v3: Undo revert of connector-type enums, since it is not actually
        harmful.
    
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

diff --git a/include/drm/drm.h b/include/drm/drm.h
index f6fd5c2..1e7a4bc 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -641,6 +641,7 @@ struct drm_gem_open {
 #define DRM_CAP_CURSOR_HEIGHT		0x9
 #define DRM_CAP_ADDFB2_MODIFIERS	0x10
 #define DRM_CAP_PAGE_FLIP_TARGET	0x11
+#define DRM_CAP_CRTC_IN_VBLANK_EVENT	0x12
 
 /** DRM_IOCTL_GET_CAP ioctl argument type */
 struct drm_get_cap {
@@ -845,7 +846,7 @@ struct drm_event_vblank {
 	__u32 tv_sec;
 	__u32 tv_usec;
 	__u32 sequence;
-	__u32 reserved;
+	__u32 crtc_id; /* 0 on older kernels that do not support this */
 };
 
 /* typedef area */
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index df0e350..70571af 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -47,7 +47,15 @@ extern "C" {
 #define DRM_MODE_TYPE_DRIVER	(1<<6)
 
 /* Video mode flags */
-/* bit compatible with the xorg definitions. */
+/* bit compatible with the xrandr RR_ definitions (bits 0-13)
+ *
+ * ABI warning: Existing userspace really expects
+ * the mode flags to match the xrandr definitions. Any
+ * changes that don't match the xrandr definitions will
+ * likely need a new client cap or some other mechanism
+ * to avoid breaking existing userspace. This includes
+ * allocating new flags in the previously unused bits!
+ */
 #define DRM_MODE_FLAG_PHSYNC			(1<<0)
 #define DRM_MODE_FLAG_NHSYNC			(1<<1)
 #define DRM_MODE_FLAG_PVSYNC			(1<<2)
@@ -107,6 +115,10 @@ extern "C" {
 #define DRM_MODE_DIRTY_ON       1
 #define DRM_MODE_DIRTY_ANNOTATE 2
 
+/* Link Status options */
+#define DRM_MODE_LINK_STATUS_GOOD	0
+#define DRM_MODE_LINK_STATUS_BAD	1
+
 struct drm_mode_modeinfo {
 	__u32 clock;
 	__u16 hdisplay;
@@ -220,14 +232,16 @@ struct drm_mode_get_encoder {
 
 /* This is for connectors with multiple signal types. */
 /* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
-#define DRM_MODE_SUBCONNECTOR_Automatic	0
-#define DRM_MODE_SUBCONNECTOR_Unknown	0
-#define DRM_MODE_SUBCONNECTOR_DVID	3
-#define DRM_MODE_SUBCONNECTOR_DVIA	4
-#define DRM_MODE_SUBCONNECTOR_Composite	5
-#define DRM_MODE_SUBCONNECTOR_SVIDEO	6
-#define DRM_MODE_SUBCONNECTOR_Component	8
-#define DRM_MODE_SUBCONNECTOR_SCART	9
+enum drm_mode_subconnector {
+	DRM_MODE_SUBCONNECTOR_Automatic = 0,
+	DRM_MODE_SUBCONNECTOR_Unknown = 0,
+	DRM_MODE_SUBCONNECTOR_DVID = 3,
+	DRM_MODE_SUBCONNECTOR_DVIA = 4,
+	DRM_MODE_SUBCONNECTOR_Composite = 5,
+	DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
+	DRM_MODE_SUBCONNECTOR_Component = 8,
+	DRM_MODE_SUBCONNECTOR_SCART = 9,
+};
 
 #define DRM_MODE_CONNECTOR_Unknown	0
 #define DRM_MODE_CONNECTOR_VGA		1
@@ -392,17 +406,20 @@ struct drm_mode_fb_cmd2 {
 	 * offsets[1].  Note that offsets[0] will generally
 	 * be 0 (but this is not required).
 	 *
-	 * To accommodate tiled, compressed, etc formats, a per-plane
+	 * To accommodate tiled, compressed, etc formats, a
 	 * modifier can be specified.  The default value of zero
 	 * indicates "native" format as specified by the fourcc.
-	 * Vendor specific modifier token.  This allows, for example,
-	 * different tiling/swizzling pattern on different planes.
-	 * See discussion above of DRM_FORMAT_MOD_xxx.
+	 * Vendor specific modifier token.  Note that even though
+	 * it looks like we have a modifier per-plane, we in fact
+	 * do not. The modifier for each plane must be identical.
+	 * Thus all combinations of different data layouts for
+	 * multi plane formats must be enumerated as separate
+	 * modifiers.
 	 */
 	__u32 handles[4];
 	__u32 pitches[4]; /* pitch for each plane */
 	__u32 offsets[4]; /* offset of each plane */
-	__u64 modifier[4]; /* ie, tiling, compressed (per plane) */
+	__u64 modifier[4]; /* ie, tiling, compress */
 };
 
 #define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01

commit 0010d312dbf0dae05652b75cdef7cd361f686623
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Wed Apr 5 17:21:29 2017 +0100

    configure.ac: pthread-stubs is not a thing on GNU/kFreeBSD
    
    As mentioned on the xcb mailing list, the platform uses the GLIBC
    forwarding mechanism.
    
    https://lists.freedesktop.org/archives/xcb/2016-November/010896.html
    
    Reported-by: Andreas Boll <andreas.boll.dev@gmail.com>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>

diff --git a/configure.ac b/configure.ac
index 036f65a..7b9369b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ LT_INIT([disable-static])
 dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
 dnl project. Even then there's a notable issue as described in the project README
 case "$host_os" in
-linux* | cygwin* | darwin* | solaris* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
     pthread_stubs_possible="no"
     ;;
 * )

commit 10ca5e13a8357dfa5562102ae94b9fa7f535f4df
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Tue Apr 4 18:05:53 2017 +0100

    man: fix bug report instructions (third time's the charm)
    
    Compile- and run-tested this time.
    
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>

diff --git a/man/drm-kms.xml b/man/drm-kms.xml
index dc471bf..eb04c26 100644
--- a/man/drm-kms.xml
+++ b/man/drm-kms.xml
@@ -309,7 +309,7 @@ static int modeset_find_crtc(int fd, drmModeRes *res, drmModeConnector *conn)
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&amp;component=libdrm
       under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
diff --git a/man/drm-memory.xml b/man/drm-memory.xml
index aab7ee7..3aa7cf2 100644
--- a/man/drm-memory.xml
+++ b/man/drm-memory.xml
@@ -410,7 +410,7 @@ memset(map, 0, creq.size);
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&amp;component=libdrm
       under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
diff --git a/man/drm.xml b/man/drm.xml
index 22bf0aa..1f55966 100644
--- a/man/drm.xml
+++ b/man/drm.xml
@@ -119,7 +119,7 @@
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&amp;component=libdrm
       under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
diff --git a/man/drmAvailable.xml b/man/drmAvailable.xml
index 4442a0a..1e5d787 100644
--- a/man/drmAvailable.xml
+++ b/man/drmAvailable.xml
@@ -61,7 +61,7 @@
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&amp;component=libdrm
       under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
diff --git a/man/drmHandleEvent.xml b/man/drmHandleEvent.xml
index 7064c1d..8330442 100644
--- a/man/drmHandleEvent.xml
+++ b/man/drmHandleEvent.xml
@@ -86,7 +86,7 @@ typedef struct _drmEventContext {
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&amp;component=libdrm
       under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
diff --git a/man/drmModeGetResources.xml b/man/drmModeGetResources.xml
index a18f9c5..0ab6a68 100644
--- a/man/drmModeGetResources.xml
+++ b/man/drmModeGetResources.xml
@@ -116,7 +116,7 @@ typedef struct _drmModeRes {
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&amp;component=libdrm
       under the "DRI" product, component "libdrm"</para>
   </refsect1>
 

commit 294be2616e1eda4e558253ae498f1503be347028
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Tue Apr 4 17:37:02 2017 +0100

    man: fix bug report instructions (for real this time)
    
    /me derped, component libdrm doesn't exist under Mesa because it's in DRI.
    While at it, give the full URL and make it https.
    
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>

diff --git a/man/drm-kms.xml b/man/drm-kms.xml
index 4423ade..dc471bf 100644
--- a/man/drm-kms.xml
+++ b/man/drm-kms.xml
@@ -309,8 +309,8 @@ static int modeset_find_crtc(int fd, drmModeRes *res, drmModeConnector *conn)
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
-          as the component.</para>
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drm-memory.xml b/man/drm-memory.xml
index daca9cf..aab7ee7 100644
--- a/man/drm-memory.xml
+++ b/man/drm-memory.xml
@@ -410,8 +410,8 @@ memset(map, 0, creq.size);
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
-          as the component.</para>
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drm.xml b/man/drm.xml
index bd35416..22bf0aa 100644
--- a/man/drm.xml
+++ b/man/drm.xml
@@ -119,8 +119,8 @@
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
-          as the component.</para>
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drmAvailable.xml b/man/drmAvailable.xml
index 37a5b49..4442a0a 100644
--- a/man/drmAvailable.xml
+++ b/man/drmAvailable.xml
@@ -61,8 +61,8 @@
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
-          as the component.</para>
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drmHandleEvent.xml b/man/drmHandleEvent.xml
index 1de566b..7064c1d 100644
--- a/man/drmHandleEvent.xml
+++ b/man/drmHandleEvent.xml
@@ -86,8 +86,8 @@ typedef struct _drmEventContext {
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
-          as the component.</para>
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drmModeGetResources.xml b/man/drmModeGetResources.xml
index aba3422..a18f9c5 100644
--- a/man/drmModeGetResources.xml
+++ b/man/drmModeGetResources.xml
@@ -116,8 +116,8 @@ typedef struct _drmModeRes {
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
-          as the component.</para>
+      https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
+      under the "DRI" product, component "libdrm"</para>
   </refsect1>
 
   <refsect1>

commit 33312e42a777d23f00febc0ece83c91429ef4bf9
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Tue Apr 4 17:09:01 2017 +0100

    man: fix bug report instruction
    
    Component "libdrm" doesn't exist (anymore?)
    
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>

diff --git a/man/drm-kms.xml b/man/drm-kms.xml
index ae38dc8..4423ade 100644
--- a/man/drm-kms.xml
+++ b/man/drm-kms.xml
@@ -309,8 +309,8 @@ static int modeset_find_crtc(int fd, drmModeRes *res, drmModeConnector *conn)
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other" or
-          "libdrm" as the component.</para>
+          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
+          as the component.</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drm-memory.xml b/man/drm-memory.xml
index 6b4f075..daca9cf 100644
--- a/man/drm-memory.xml
+++ b/man/drm-memory.xml
@@ -410,8 +410,8 @@ memset(map, 0, creq.size);
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other" or
-          "libdrm" as the component.</para>
+          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
+          as the component.</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drm.xml b/man/drm.xml
index 07f1771..bd35416 100644
--- a/man/drm.xml
+++ b/man/drm.xml
@@ -119,8 +119,8 @@
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this manual should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other" or
-          "libdrm" as the component.</para>
+          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
+          as the component.</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drmAvailable.xml b/man/drmAvailable.xml
index 55bef94..37a5b49 100644
--- a/man/drmAvailable.xml
+++ b/man/drmAvailable.xml
@@ -61,8 +61,8 @@
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other" or
-          "libdrm" as the component.</para>
+          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
+          as the component.</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drmHandleEvent.xml b/man/drmHandleEvent.xml
index b1006e5..1de566b 100644
--- a/man/drmHandleEvent.xml
+++ b/man/drmHandleEvent.xml
@@ -86,8 +86,8 @@ typedef struct _drmEventContext {
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other" or
-          "libdrm" as the component.</para>
+          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
+          as the component.</para>
   </refsect1>
 
   <refsect1>
diff --git a/man/drmModeGetResources.xml b/man/drmModeGetResources.xml
index 2f5e8c2..aba3422 100644
--- a/man/drmModeGetResources.xml
+++ b/man/drmModeGetResources.xml
@@ -116,8 +116,8 @@ typedef struct _drmModeRes {
   <refsect1>
     <title>Reporting Bugs</title>
     <para>Bugs in this function should be reported to
-          http://bugs.freedesktop.org under the "Mesa" product, with "Other" or
-          "libdrm" as the component.</para>
+          http://bugs.freedesktop.org under the "Mesa" product, with "Other"
+          as the component.</para>
   </refsect1>
 
   <refsect1>

commit 64423a70361eec1b855022550b1c13cc4807ce0e
Author: Eric Engestrom <eric.engestrom@imgtec.com>
Date:   Tue Apr 4 16:58:46 2017 +0100

    man/drm(7): fix typo
    
    Reported-by: Oliver Kisielius <oliver.kisielius@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100559
    Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>

diff --git a/man/drm.xml b/man/drm.xml
index 5a49fe1..07f1771 100644
--- a/man/drm.xml
+++ b/man/drm.xml
@@ -50,7 +50,7 @@
 
     <para>In earlier days, the kernel framework was solely used to provide raw
           hardware access to priviledged user-space processes which implement
-          all the hardware abstraction layers. But more and more tasks where
+          all the hardware abstraction layers. But more and more tasks were
           moved into the kernel. All these interfaces are based on
           <citerefentry><refentrytitle>ioctl</refentrytitle><manvolnum>2</manvolnum></citerefentry>
           commands on the DRM character device. The <emphasis>libdrm</emphasis>


Reply to: