diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-02 15:54:20 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-11-02 15:56:05 +0000 |
commit | e62b0cbf958d1ad95e4522973253a1ae5c1a4da9 (patch) | |
tree | f3db136220c7a1058e248484e763877f57696ded /src/sna/sna_driver.c | |
parent | e1a63de8991a6586b83c06bcb3369208871cf43d (diff) |
sna: Add a small delay during startup if another master is still active
There exists a race with plymouthd that can cause the drm device to
reject us as the rightful master, and so cause X to fail to load. Try
waiting for a couple of seconds for whatever it was to close before
giving in.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r-- | src/sna/sna_driver.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c index b7bd84a3..055c71c2 100644 --- a/src/sna/sna_driver.c +++ b/src/sna/sna_driver.c @@ -995,10 +995,13 @@ static Bool sna_enter_vt(VT_FUNC_ARGS_DECL) DBG(("%s\n", __FUNCTION__)); if (drmSetMaster(sna->kgem.fd)) { - xf86DrvMsg(scrn->scrnIndex, X_ERROR, - "drmSetMaster failed: %s\n", - strerror(errno)); - return FALSE; + sleep(2); /* XXX wait for the current master to decease */ + if (drmSetMaster(sna->kgem.fd)) { + xf86DrvMsg(scrn->scrnIndex, X_ERROR, + "drmSetMaster failed: %s\n", + strerror(errno)); + return FALSE; + } } if (!xf86SetDesiredModes(scrn)) |