diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-20 08:51:05 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-03-20 08:52:12 +0000 |
commit | 7cf0676ff868e7d8cdbfb264e5822250b1f59882 (patch) | |
tree | 668eb6ae8609c7b56fba61bb9cff13b4d9da4cab | |
parent | 9f4c121974abcec77e7f920e3258a337260200b3 (diff) |
intel: Do not close server fds
If we are given an fd by the Xserver, then it is not our responsibility
to close it during CloseScreen.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Hans de Goede <hdegoede@redhat.com>
-rw-r--r-- | src/intel_device.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index adcd6c01..a55f62b2 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -312,20 +312,18 @@ int intel_open_device(int entity_num, if (dev == NULL) goto err_close; + /* If hosted under a system compositor, just pretend to be master */ + if (hosted()) + master_count++; + dev->fd = fd; - dev->open_count = 0; + dev->open_count = master_count; dev->master_count = master_count; dev->master_node = path; dev->render_node = find_render_node(fd); if (dev->render_node == NULL) dev->render_node = dev->master_node; - /* If hosted under a system compositor, just pretend to be master */ - if (hosted()) { - dev->open_count++; - dev->master_count++; - } - xf86GetEntityPrivate(entity_num, intel_device_key)->ptr = dev; return fd; |