xf86-video-intel: 2 commits - src/drmmode_display.c src/i830_driver.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Mon Jun 29 13:01:32 PDT 2009


 src/drmmode_display.c |    7 ++++++-
 src/i830_driver.c     |    7 +++----
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 170cae0c8d58fc141de1d8a2f17a4328d39c1263
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Mon Jun 29 12:55:43 2009 -0700

    Only get the VBIOS in non-KMS mode
    
    In KMS mode, the kernel takes care of this for us, so don't bother.

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 23690cf..bd7a32c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1643,14 +1643,13 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    if (!i830_detect_chipset(pScrn))
        return FALSE;
 
-   if (i830_bios_init(pScrn))
-       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		  "VBIOS initialization failed.\n");
-
    if (pI830->use_drm_mode) {
        if (!I830DrmModeInit(pScrn))
 	   return FALSE;
    } else {
+       if (i830_bios_init(pScrn))
+	   xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		      "VBIOS initialization failed.\n");
       I830PreInitCrtcConfig(pScrn);
       if (!I830AccelMethodInit(pScrn))
          return FALSE;
commit 6511c082459789cf279e7a4528775a1c821ad8cc
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Mon Jun 29 12:53:51 2009 -0700

    Output error info if we fail to get DRM resources
    
    Useful for debugging.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8f45e84..f45d933 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -29,6 +29,8 @@
 #include "config.h"
 #endif
 
+#include <errno.h>
+
 #include "xorgVersion.h"
 
 #include "i830.h"
@@ -1103,8 +1105,11 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
 
 	drmmode->cpp = cpp;
 	drmmode->mode_res = drmModeGetResources(drmmode->fd);
-	if (!drmmode->mode_res)
+	if (!drmmode->mode_res) {
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+			   "failed to get resources: %s\n", strerror(errno));
 		return FALSE;
+	}
 
 	xf86CrtcSetSizeRange(pScrn, 320, 200, drmmode->mode_res->max_width,
 			     drmmode->mode_res->max_height);


More information about the xorg-commit mailing list