summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2013-07-17 15:28:54 +0300
committerAlon Levy <alevy@redhat.com>2013-07-17 18:24:06 +0300
commit1c46e6fe756fce0ed87b23fd74e10d9e47380a5d (patch)
tree6689d946f6fbf81c9a9e8b59d713834e6802e21e
parent843bb391f01665ce21756b05d05b221c4246877a (diff)
miniport: disable surfaces by default
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. RHBZ: 985408 (cherry picked from commit 154c477005c8f5001262123ddc043adba1b4bf0e)
-rw-r--r--miniport/qxl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/miniport/qxl.c b/miniport/qxl.c
index 69d1b16..33efac7 100644
--- a/miniport/qxl.c
+++ b/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;
}