[Spice-devel,qxl-win] miniport: fix broken support for revision 2

Submitted by Alon Levy on Aug. 3, 2011, 9:24 p.m.

Details

Message ID 1312381462-12821-1-git-send-email-alevy@redhat.com
State New, archived
Headers show

Not browsing as part of any series.

Commit Message

Alon Levy Aug. 3, 2011, 9:24 p.m.
The io port range test was too large, requiring support for the
new io ports introduced in revision 3. The purpose was just the opposite,
to only require the revision 2 range, and use the revision 3 range only
if it is reported.

This fix is the minimal - it would probably be a good idea to also check
that the io range for rev 3 is correct otherwise fall back to rev 2.
---
 miniport/qxl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch hide | download patch | download mbox

diff --git a/miniport/qxl.c b/miniport/qxl.c
index 4271104..c27b7a0 100644
--- a/miniport/qxl.c
+++ b/miniport/qxl.c
@@ -180,7 +180,7 @@  VP_STATUS InitIO(QXLExtension *dev, PVIDEO_ACCESS_RANGE range)
     PAGED_CODE();
     DEBUG_PRINT((dev, 0, "%s\n", __FUNCTION__));
 
-    if (range->RangeLength < QXL_IO_RANGE_SIZE
+    if (range->RangeLength < QXL_IO_DESTROY_ALL_SURFACES + 1
         || !range->RangeInIoSpace) {
         DEBUG_PRINT((dev, 0, "%s: bad io range\n", __FUNCTION__));
         return ERROR_INVALID_DATA;