summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-03-20 08:51:05 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-03-20 08:52:12 +0000
commit7cf0676ff868e7d8cdbfb264e5822250b1f59882 (patch)
tree668eb6ae8609c7b56fba61bb9cff13b4d9da4cab
parent9f4c121974abcec77e7f920e3258a337260200b3 (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.c12
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;