[Spice-devel] [PATCH] miniport+display: export FLUSH_{SURFACES, RELEASE} ports for use by AssertModeEnable

Alon Levy alevy at redhat.com
Wed Jul 6 05:34:33 PDT 2011


Revision 3 (V10) of the qxl device supports these added io ports which make sleep, resolution
change and logout simpler to implement with less vmexits from pov of the driver.
---
 display/driver.c     |    2 ++
 display/qxldd.h      |    2 ++
 include/qxl_driver.h |    2 ++
 miniport/qxl.c       |    2 ++
 4 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/display/driver.c b/display/driver.c
index 094e386..fd9902d 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -770,6 +770,8 @@ static BOOL PrepareHardware(PDev *pdev)
 
     pdev->create_primary_port = dev_info.create_primary_port;
     pdev->destroy_primary_port = dev_info.destroy_primary_port;
+    pdev->flush_surfaces_port = dev_info.flush_surfaces_port;
+    pdev->flush_release_port = dev_info.flush_release_port;
 
     pdev->primary_memory_start = dev_info.surface0_area;
     pdev->primary_memory_size = dev_info.surface0_area_size;
diff --git a/display/qxldd.h b/display/qxldd.h
index d5623c5..5511bad 100644
--- a/display/qxldd.h
+++ b/display/qxldd.h
@@ -317,6 +317,8 @@ typedef struct PDev {
     PUCHAR destroy_primary_async_port;
     PUCHAR destroy_surface_async_port;
     PUCHAR destroy_all_surfaces_async_port;
+    PUCHAR flush_surfaces_port;
+    PUCHAR flush_release_port;
 
     UINT8* primary_memory_start;
     UINT32 primary_memory_size;
diff --git a/include/qxl_driver.h b/include/qxl_driver.h
index f9a31f1..a341c43 100644
--- a/include/qxl_driver.h
+++ b/include/qxl_driver.h
@@ -61,6 +61,8 @@ typedef struct QXLDriverInfo {
     PUCHAR destroy_primary_async_port;
     PUCHAR destroy_surface_async_port;
     PUCHAR destroy_all_surfaces_async_port;
+    PUCHAR flush_surfaces_port;
+    PUCHAR flush_release_port;
     PEVENT display_event;
     PEVENT cursor_event;
     PEVENT sleep_event;
diff --git a/miniport/qxl.c b/miniport/qxl.c
index c7aba3f..a88668b 100644
--- a/miniport/qxl.c
+++ b/miniport/qxl.c
@@ -982,6 +982,8 @@ BOOLEAN StartIO(PVOID dev_extension, PVIDEO_REQUEST_PACKET packet)
                 dev_ext->io_port + QXL_IO_DESTROY_SURFACE_ASYNC;
             driver_info->destroy_all_surfaces_async_port =
                 dev_ext->io_port + QXL_IO_DESTROY_ALL_SURFACES_ASYNC;
+            driver_info->flush_surfaces_port = dev_ext->io_port + QXL_IO_FLUSH_SURFACES;
+            driver_info->flush_release_port = dev_ext->io_port + QXL_IO_FLUSH_RELEASE;
 
             driver_info->log_port = dev_ext->io_port + QXL_IO_LOG;
             driver_info->log_buf = dev_ext->ram_header->log_buf;
-- 
1.7.5.4



More information about the Spice-devel mailing list