[PATCH radeon] Fix "Unable to retrieve master" with with X backend.

Darxus darxus at chaosreigns.com
Wed May 23 19:37:35 PDT 2012


Fix case where, if weston was run with --xserver while using the X backend
without root priveledges, it would give an "Unable to retrieve master"
error and fail when it tried to launch X.

---
 src/radeon_kms.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index db3de74..8595744 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1119,10 +1119,12 @@ Bool RADEONScreenInit_KMS(int scrnIndex, ScreenPtr pScreen,
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
 		   "RADEONScreenInit_KMS 10\n");
 		   
-    ret = drmSetMaster(info->dri->drmFD);
-    if (ret) {
-        ErrorF("Unable to retrieve master\n");
-        return FALSE;
+    if (!info->xwl_screen) {
+	ret = drmSetMaster(info->dri->drmFD);
+	if (ret) {
+	    ErrorF("Unable to retrieve master\n");
+	    return FALSE;
+	}
     }
     xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
 		   "RADEONScreenInit_KMS 11\n");
@@ -1368,9 +1370,11 @@ Bool RADEONEnterVT_KMS(int scrnIndex, int flags)
 		   "RADEONEnterVT_KMS\n");
 
 
-    ret = drmSetMaster(info->dri->drmFD);
-    if (ret)
-	ErrorF("Unable to retrieve master\n");
+    if (!info->xwl_screen) {
+	ret = drmSetMaster(info->dri->drmFD);
+	if (ret)
+	    ErrorF("Unable to retrieve master\n");
+    }
     info->accel_state->XInited3D = FALSE;
     info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN;
 
-- 
1.7.5.4



More information about the wayland-devel mailing list