drm: Branch 'master' - 3 commits

[email protected] (Thierry Reding)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 xf86drmMode.c |    2 +-
 xf86drmMode.h |   19 +++++++++++--------
 2 files changed, 12 insertions(+), 9 deletions(-)

New commits:
commit ecc2a097294dcc773dbe5e2a989f180bedb89b69
Author: Thierry Reding <[email protected]>
Date:   Mon Apr 13 11:36:59 2015 +0200

    xf86drm: Fix type-punned pointer build warning
    
          CC       libdrm_la-xf86drmMode.lo
        ../xf86drmMode.c: In function 'drmHandleEvent':
        ../xf86drmMode.c:854:15: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
           e = (struct drm_event *)(&buffer[i]);
                       ^
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99350
    Reviewed-by: Emil Velikov <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>

diff --git a/xf86drmMode.c b/xf86drmMode.c
index fb22f68..0266bc1 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -901,7 +901,7 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
 
 	i = 0;
 	while (i < len) {
-		e = (struct drm_event *) &buffer[i];
+		e = (struct drm_event *)(buffer + i);
 		switch (e->type) {
 		case DRM_EVENT_VBLANK:
 			if (evctx->version < 1 ||
commit 4bfbe4c69e95ae3aaaa151f3ffcdd1d3e112214b
Author: Thierry Reding <[email protected]>
Date:   Wed Dec 17 11:53:31 2014 +0100

    xf86drmMode.h: Add DisplayPort MST and DPI encoders/connectors
    
    This brings xf86drmMode.h in sync with include/drm/drm_mode.h.
    Eventually we really should only have a single set of definitions rather
    than duplicating this in two files.
    
    v2: add DPI encoder and connector types introduced in Linux v4.7
    
    Reviewed-by: Emil Velikov <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>

diff --git a/xf86drmMode.h b/xf86drmMode.h
index 00ad81d..5b390d9 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -130,6 +130,8 @@ extern "C" {
 #define DRM_MODE_ENCODER_TVDAC   4
 #define DRM_MODE_ENCODER_VIRTUAL 5
 #define DRM_MODE_ENCODER_DSI     6
+#define DRM_MODE_ENCODER_DPMST   7
+#define DRM_MODE_ENCODER_DPI     8
 
 #define DRM_MODE_SUBCONNECTOR_Automatic 0
 #define DRM_MODE_SUBCONNECTOR_Unknown   0
@@ -157,6 +159,7 @@ extern "C" {
 #define DRM_MODE_CONNECTOR_eDP          14
 #define DRM_MODE_CONNECTOR_VIRTUAL      15
 #define DRM_MODE_CONNECTOR_DSI          16
+#define DRM_MODE_CONNECTOR_DPI          17
 
 #define DRM_MODE_PROP_PENDING   (1<<0)
 #define DRM_MODE_PROP_RANGE     (1<<1)
commit ab50ffbc703573c08e3053555414a6c4d7d778e8
Author: Thierry Reding <[email protected]>
Date:   Wed Dec 17 11:52:40 2014 +0100

    xf86drmMode.h: Use consistent padding
    
    Reviewed-by: Emil Velikov <[email protected]>
    Signed-off-by: Thierry Reding <[email protected]>

diff --git a/xf86drmMode.h b/xf86drmMode.h
index b684967..00ad81d 100644
--- a/xf86drmMode.h
+++ b/xf86drmMode.h
@@ -123,13 +123,13 @@ extern "C" {
 #define DRM_MODE_DITHERING_OFF  0
 #define DRM_MODE_DITHERING_ON   1
 
-#define DRM_MODE_ENCODER_NONE   0
-#define DRM_MODE_ENCODER_DAC    1
-#define DRM_MODE_ENCODER_TMDS   2
-#define DRM_MODE_ENCODER_LVDS   3
-#define DRM_MODE_ENCODER_TVDAC  4
+#define DRM_MODE_ENCODER_NONE    0
+#define DRM_MODE_ENCODER_DAC     1
+#define DRM_MODE_ENCODER_TMDS    2
+#define DRM_MODE_ENCODER_LVDS    3
+#define DRM_MODE_ENCODER_TVDAC   4
 #define DRM_MODE_ENCODER_VIRTUAL 5
-#define DRM_MODE_ENCODER_DSI	6
+#define DRM_MODE_ENCODER_DSI     6
 
 #define DRM_MODE_SUBCONNECTOR_Automatic 0
 #define DRM_MODE_SUBCONNECTOR_Unknown   0
@@ -153,8 +153,8 @@ extern "C" {
 #define DRM_MODE_CONNECTOR_DisplayPort  10
 #define DRM_MODE_CONNECTOR_HDMIA        11
 #define DRM_MODE_CONNECTOR_HDMIB        12
-#define DRM_MODE_CONNECTOR_TV		13
-#define DRM_MODE_CONNECTOR_eDP		14
+#define DRM_MODE_CONNECTOR_TV           13
+#define DRM_MODE_CONNECTOR_eDP          14
 #define DRM_MODE_CONNECTOR_VIRTUAL      15
 #define DRM_MODE_CONNECTOR_DSI          16
 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.