output: fix dropping master priviledges on wakeup
If wakeup fails we should drop master priviledges again, otherwise we might break other applications. Also remove the SetMaster call on compositor initialization. It is redundant and not needed by us. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
parent
84248b0ac7
commit
bb727640e9
4
TODO
4
TODO
@ -18,10 +18,6 @@ Output Subsystem:
|
||||
- Retrieve DRI card from udev or at least make kmscon_compositor_new() accept a
|
||||
path to the DRI card so the user can have udev provide the path.
|
||||
|
||||
- Check whether drmSetMaster() is needed. It can only be called with root
|
||||
priviledges and all my tests worked without it. What are the benefits of
|
||||
calling this?
|
||||
|
||||
- Whats the difference between connector and encoder? Or why are encoders
|
||||
needed at all? The output selection logic simply tries to find the first
|
||||
encoder that provides an available crtc. Should we replace this logic with an
|
||||
|
@ -810,13 +810,6 @@ static int compositor_init(struct kmscon_compositor *comp)
|
||||
if (comp->drm_fd < 0)
|
||||
return -errno;
|
||||
|
||||
/* TODO: When do we need this? */
|
||||
/*ret = drmSetMaster(comp->drm_fd);
|
||||
if (ret) {
|
||||
ret = -EACCES;
|
||||
goto err_drm;
|
||||
}*/
|
||||
|
||||
comp->gbm = gbm_create_device(comp->drm_fd);
|
||||
if (!comp->gbm) {
|
||||
ret = -EFAULT;
|
||||
@ -974,6 +967,8 @@ int kmscon_compositor_wake_up(struct kmscon_compositor *comp)
|
||||
return ret;
|
||||
|
||||
comp->state = COMPOSITOR_ASLEEP;
|
||||
drmDropMaster(comp->drm_fd);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user