[Spice-devel] [PATCH qxl-win] miniport: disable surfaces by default

Alon Levy alevy at redhat.com
Wed Jul 17 06:04:51 PDT 2013


Change the registry checking logic we already have, instead of enabling
surfaces by default we now disable surfaces by default. They can be
enabled without driver change by creating a registry key name
"SurfacesEnabled" of type DWORD with any value under the adapter key.

To find the adapter key, one way is looking for the key under which
there is a value of name "QxlDeviceID" after a successfull startup of
the qxl driver.
---
 xddm/miniport/qxl.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/xddm/miniport/qxl.c b/xddm/miniport/qxl.c
index 69d1b16..33efac7 100644
--- a/xddm/miniport/qxl.c
+++ b/xddm/miniport/qxl.c
@@ -1046,16 +1046,18 @@ static UINT8 check_non_primary_surfaces_registry_key(QXLExtension *dev_ext)
 
     ret = VideoPortGetRegistryParameters(
               dev_ext,
-              L"DisableSurfaces",
+              L"SurfacesEnabled",
               FALSE,
               QXLRegistryCallback,
               &key_ret);
     if (ret == ERROR_INVALID_PARAMETER) {
-        dev_ext->create_non_primary_surfaces = 1;
-        DEBUG_PRINT((dev_ext, 0, "%s: CreateNonPrimarySurfaces key doesn't exist, default to 1\n",
+        dev_ext->create_non_primary_surfaces = 0;
+        DEBUG_PRINT((dev_ext, 0, "%s: SurfacesEnabled key doesn't exist, disabling surfaces\n",
                     __FUNCTION__));
     } else {
-        dev_ext->create_non_primary_surfaces = 0;
+        dev_ext->create_non_primary_surfaces = 1;
+        DEBUG_PRINT((dev_ext, 0, "%s: SurfacesEnabled key exists, enabling surfaces\n",
+                    __FUNCTION__));
     }
     return dev_ext->create_non_primary_surfaces;
 }
-- 
1.8.3.1



More information about the Spice-devel mailing list