xserver: Branch 'master' - 3 commits

Adam Jackson ajax at kemper.freedesktop.org
Fri Oct 30 07:40:56 PDT 2015


 hw/xfree86/drivers/modesetting/drmmode_display.c |   22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

New commits:
commit 7d1e4783853f9830344d101ceab087feb19995be
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Thu Oct 29 14:58:11 2015 +0100

    modesetting: Remove XF86_CRTC_VERSION checks
    
    The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the
    out-of-tree driver. Within the tree, we can rely on:
        xf86Crtc.h:#define XF86_CRTC_VERSION 6
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 2684bae..4421578 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -462,11 +462,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
         crtc->y = saved_y;
         crtc->rotation = saved_rotation;
         crtc->mode = saved_mode;
-    }
-#if defined(XF86_CRTC_VERSION) && XF86_CRTC_VERSION >= 3
-    else
+    } else
         crtc->active = TRUE;
-#endif
 
     free(output_ids);
 
@@ -1789,9 +1786,7 @@ drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
     drmmode_clones_init(pScrn, drmmode, mode_res);
 
     drmModeFreeResources(mode_res);
-#if XF86_CRTC_VERSION >= 5
     xf86ProviderSetup(pScrn, NULL, "modesetting");
-#endif
 
     xf86InitialConfiguration(pScrn, TRUE);
 
commit 45c83a266d18eb515313aa3f1a4d7ff6af53be5d
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Thu Oct 29 14:58:10 2015 +0100

    modesetting: Free output_ids in drmmode_set_mode_major()
    
    We calloc() output_ids. Let's free() it, too.
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index f86c1f8..2684bae 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -340,7 +340,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
     int saved_x, saved_y;
     Rotation saved_rotation;
     DisplayModeRec saved_mode;
-    uint32_t *output_ids;
+    uint32_t *output_ids = NULL;
     int output_count = 0;
     Bool ret = TRUE;
     int i;
@@ -468,6 +468,8 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
         crtc->active = TRUE;
 #endif
 
+    free(output_ids);
+
     return ret;
 }
 
commit 2674d424020bd71d4f99b8d8de8b0b21aa490d54
Author: Daniel Martin <consume.noise at gmail.com>
Date:   Thu Oct 29 14:58:09 2015 +0100

    modesetting: Handle failures in setting a CRTC to a DRM mode properly
    
    This fixes a bug where running the card out of PPLL's when hotplugging
    another monitor would result in all of the displays going blank and
    failing to work properly until X was restarted or the user switched to
    another VT.
    
    [Michel Dänzer: Pass errno instead of -ret to strerror()]
    [Daniel Martin: Add \n to log message]
    
    Picked from xf86-video-ati
        7186a87 Handle failures in setting a CRTC to a DRM mode properly
    
    Signed-off-by: Daniel Martin <consume.noise at gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 736bfc4..f86c1f8 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -421,12 +421,13 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
             fb_id = drmmode_crtc->rotate_fb_id;
             x = y = 0;
         }
-        ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
-                             fb_id, x, y, output_ids, output_count, &kmode);
-        if (ret)
+        if (drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+                           fb_id, x, y, output_ids, output_count, &kmode)) {
             xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
-                       "failed to set mode: %s", strerror(-ret));
-        else
+                       "failed to set mode: %s\n", strerror(errno));
+            ret = FALSE;
+            goto done;
+        } else
             ret = TRUE;
 
         if (crtc->scrn->pScreen)


More information about the xorg-commit mailing list