diff options
author | David Herrmann <dh.herrmann@googlemail.com> | 2012-02-05 18:40:31 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@googlemail.com> | 2012-02-05 18:40:31 +0100 |
commit | 2b066f173c873642e62692911f098086e4f74938 (patch) | |
tree | a038d66d2dda86fad58b55e71a00caaeaaf99a7c /src/output.c | |
parent | 06286da4ef4481d0c116519962528d17f11f1133 (diff) |
output: drop drm-master on open() to avoid Xserver bugs
The xserver currently crashes if we switch to its VT and it cannot claim
drm-master. This normally does not happen as we drop drm-master on
VT-leave. However, after calling open() on the drm char-dev we are
automatically drm-master so we should drop it right away as our VT is
not guaranteed to be opened at this time.
There is currently no way to call open() on the drm char-dev without
getting drm-master so there is still a short time-period when we have no
active VT but are drm-master. Switching to X in this short time-period
will still kill the X-server but we are not responsible for horrible
X-server bugs so we ignore this 10ms time-span.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'src/output.c')
-rw-r--r-- | src/output.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/output.c b/src/output.c index cac848a..74e48c5 100644 --- a/src/output.c +++ b/src/output.c @@ -797,6 +797,7 @@ int kmscon_compositor_new(struct kmscon_compositor **out) ret = -errno; goto err_free; } + drmDropMaster(comp->drm_fd); comp->gbm = gbm_create_device(comp->drm_fd); if (!comp->gbm) { |