From d16284687ddeffde32a561b8c67b2e2e3d66aeaa Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Wed, 10 Apr 2013 23:05:40 -0700 Subject: [PATCH] xfree86: Revert workaround for drm race condition. Revert 70739e817b2d64bc020ea491f23a3574bdb6155e and mostly revert c31eac647a9ecf0fb20dc98266cadf0ba923ba14. Further investigation shows the encountered race condition is between lightdm and plymouth-splash, as implemented in the Ubuntu distribution within the limitations of upstart's job coordination logic, and can (and should) be fixed within those limiations. Not in xserver itself. This leaves some of the diagnostic improvements from the recent patch series, in case others run into a similar situation. Signed-off-by: Bryce Harrington Signed-off-by: Peter Hutterer --- hw/xfree86/os-support/linux/lnx_platform.c | 28 ++++------------------ 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c index 9b92d0cd3..bd060c96e 100644 --- a/hw/xfree86/os-support/linux/lnx_platform.c +++ b/hw/xfree86/os-support/linux/lnx_platform.c @@ -26,35 +26,17 @@ get_drm_info(struct OdevAttributes *attribs, char *path) char *buf; int fd; int err = 0; - int tries = 0; fd = open(path, O_RDWR, O_CLOEXEC); if (fd == -1) return FALSE; - while (tries++ < 200) { - sv.drm_di_major = 1; - sv.drm_di_minor = 4; - sv.drm_dd_major = -1; /* Don't care */ - sv.drm_dd_minor = -1; /* Don't care */ + sv.drm_di_major = 1; + sv.drm_di_minor = 4; + sv.drm_dd_major = -1; /* Don't care */ + sv.drm_dd_minor = -1; /* Don't care */ - err = drmSetInterfaceVersion(fd, &sv); - if (!err) { - if (tries > 1) - LogMessage(X_INFO, "setversion 1.4 succeeded on try #%d\n", tries); - break; - } if (err == -EACCES) { - if (tries % 500 == 0) - LogMessage(X_INFO, "waiting on drm device...\n"); - } else { - break; - } - - usleep(10000); - - if (!drmSetMaster(fd)) - LogMessage(X_INFO, "drmSetMaster succeeded\n"); - } + err = drmSetInterfaceVersion(fd, &sv); if (err) { ErrorF("setversion 1.4 failed: %s\n", strerror(-err)); goto out;