Blame SOURCES/fix-progress-bar-colors.patch

400165
From 167e74e56df055f419c960657eb66d73802a54f1 Mon Sep 17 00:00:00 2001
400165
From: Ray Strode <rstrode@redhat.com>
400165
Date: Mon, 20 Jun 2016 11:06:49 -0400
400165
Subject: [PATCH] drm: don't pick up drm master implicitly
400165
400165
If a client opens the drm device, they're given drm master
400165
implicitly. We already explicitly take DRM master when we need it,
400165
so that featuer is unneeded.
400165
400165
Furthermore, it's actively harmful, since fbdev won't let you change
400165
the color palette of the terminal if drm master is held.
400165
400165
This commit makes sure to drop master as soon as we get it from
400165
open().
400165
---
400165
 src/plugins/renderers/drm/plugin.c | 2 ++
400165
 1 file changed, 2 insertions(+)
400165
400165
diff --git a/src/plugins/renderers/drm/plugin.c b/src/plugins/renderers/drm/plugin.c
400165
index 6677279..ebfe864 100644
400165
--- a/src/plugins/renderers/drm/plugin.c
400165
+++ b/src/plugins/renderers/drm/plugin.c
400165
@@ -462,60 +462,62 @@ load_driver (ply_renderer_backend_t *backend)
400165
   int device_fd;
400165
 
400165
   ply_trace ("Opening '%s'", backend->device_name);
400165
   device_fd = open (backend->device_name, O_RDWR);
400165
 
400165
   if (device_fd < 0)
400165
     {
400165
       ply_trace ("open failed: %m");
400165
       return false;
400165
     }
400165
 
400165
   backend->driver_interface = ply_renderer_generic_driver_get_interface (device_fd);
400165
   backend->driver_supports_mapping_console = false;
400165
 
400165
   if (backend->driver_interface == NULL)
400165
     {
400165
       close (device_fd);
400165
       return false;
400165
     }
400165
 
400165
   backend->driver = backend->driver_interface->create_driver (device_fd);
400165
 
400165
   if (backend->driver == NULL)
400165
     {
400165
       close (device_fd);
400165
       return false;
400165
     }
400165
 
400165
   backend->device_fd = device_fd;
400165
 
400165
+  drmDropMaster (device_fd);
400165
+
400165
   return true;
400165
 }
400165
 
400165
 static void
400165
 unload_driver (ply_renderer_backend_t *backend)
400165
 {
400165
   if (backend->driver == NULL)
400165
     return;
400165
 
400165
   ply_trace ("unloading driver");
400165
   assert (backend->driver_interface != NULL);
400165
 
400165
   backend->driver_interface->destroy_driver (backend->driver);
400165
   backend->driver = NULL;
400165
 
400165
   backend->driver_interface = NULL;
400165
 
400165
   if (backend->device_fd >= 0)
400165
     {
400165
       drmClose (backend->device_fd);
400165
       backend->device_fd = -1;
400165
     }
400165
 }
400165
 
400165
 static bool
400165
 open_device (ply_renderer_backend_t *backend)
400165
 {
400165
   assert (backend != NULL);
400165
   assert (backend->device_name != NULL);
400165
 
400165
-- 
400165
2.7.4
400165