From: Dave Airlie <[email protected]>

These asserts stop us increasing the size of privates after create screen
resources has been called, however for dynamic screens we need to be able
to increase private size as new drivers are loaded.

In theory any object allocated by an older driver won't try and use newer
privates and any object allocated by a new driver should be okay.

pixmaps are a bit of an exception as they have their own allocator path,
but the next patch will fix that up.

Signed-off-by: Dave Airlie <[email protected]>
---
 dix/privates.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dix/privates.c b/dix/privates.c
index c2bdeae..af6d327 100644
--- a/dix/privates.c
+++ b/dix/privates.c
@@ -210,8 +210,9 @@ dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType 
type, unsigned size)
          */
         for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++)
             if (xselinux_private[t]) {
-                if (!allocated_early[t])
-                    assert(!keys[t].created);
+                if (!allocated_early[t]) {
+                  /*                    assert(!keys[t].created);*/
+                }
                 else if (!allocated_early[t] (dixReallocPrivates, bytes))
                     return FALSE;
             }
@@ -233,8 +234,9 @@ dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType 
type, unsigned size)
     }
     else {
         /* Resize if we can, or make sure nothing's allocated if we can't */
-        if (!allocated_early[type])
-            assert(!keys[type].created);
+        if (!allocated_early[type]) {
+          /*            assert(!keys[type].created);*/
+        }
         else if (!allocated_early[type] (dixReallocPrivates, bytes))
             return FALSE;
         offset = keys[type].offset;
-- 
1.7.10.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to