[Spice-devel] [PATCH] export pci revision from miniport to display

Alon Levy alevy at redhat.com
Thu Jun 23 11:13:23 PDT 2011


---
 display/driver.c     |    1 +
 display/qxldd.h      |    2 ++
 include/qxl_driver.h |    2 ++
 miniport/qxl.c       |    4 ++++
 4 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/display/driver.c b/display/driver.c
index f82c744..2c88cc5 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -689,6 +689,7 @@ static BOOL PrepareHardware(PDev *pdev)
         return FALSE;
     }
 
+    pdev->pci_revision = dev_info.pci_revision;
     pdev->cmd_ring = dev_info.cmd_ring;
     pdev->cursor_ring = dev_info.cursor_ring;
     pdev->release_ring = dev_info.release_ring;
diff --git a/display/qxldd.h b/display/qxldd.h
index 0f90af1..fcfa752 100644
--- a/display/qxldd.h
+++ b/display/qxldd.h
@@ -323,6 +323,8 @@ typedef struct PDev {
 
     UINT32 n_surfaces;
     SurfaceInfo surface0_info;
+
+    UCHAR  pci_revision;
 } PDev;
 
 
diff --git a/include/qxl_driver.h b/include/qxl_driver.h
index b2e1c78..9827a13 100644
--- a/include/qxl_driver.h
+++ b/include/qxl_driver.h
@@ -96,6 +96,8 @@ typedef struct QXLDriverInfo {
     PUCHAR memslot_del_port;
     PUCHAR destroy_all_surfaces_port;
 
+    UCHAR  pci_revision;
+
     UINT32 dev_id;
 
     QXLSurfaceCreate *primary_surface_create;
diff --git a/miniport/qxl.c b/miniport/qxl.c
index 9d8ab36..f3ee090 100644
--- a/miniport/qxl.c
+++ b/miniport/qxl.c
@@ -66,6 +66,8 @@ typedef struct QXLExtension {
     PVOID io_base;
     PUCHAR io_port;
 
+    UCHAR pci_revision;
+
     QXLRom *rom;
     ULONG rom_size;
 
@@ -338,6 +340,7 @@ VP_STATUS Prob(QXLExtension *dev, VIDEO_PORT_CONFIG_INFO *conf_info,
                      __FUNCTION__, pci_conf.RevisionID, QXL_REVISION_STABLE_V06));
         return ERROR_INVALID_PARAMETER;
     }
+    dev->pci_revision = pci_conf.RevisionID;
 
     VideoPortZeroMemory(ranges, sizeof(VIDEO_ACCESS_RANGE) * n_ranges);
     if ((error = VideoPortGetAccessRanges(dev, 0, NULL, n_ranges,
@@ -941,6 +944,7 @@ BOOLEAN StartIO(PVOID dev_extension, PVIDEO_REQUEST_PACKET packet)
 
             driver_info = packet->OutputBuffer;
             driver_info->version = QXL_DRIVER_INFO_VERSION;
+            driver_info->pci_revision = dev_ext->pci_revision;
             driver_info->display_event = dev_ext->display_event;
             driver_info->cursor_event = dev_ext->cursor_event;
             driver_info->sleep_event = dev_ext->sleep_event;
-- 
1.7.5.4



More information about the Spice-devel mailing list