[Spice-commits] 3 commits - xddm/display xddm/miniport

Alon Levy alon at kemper.freedesktop.org
Tue Jul 30 06:30:28 PDT 2013


 xddm/display/driver.c |    5 +++++
 xddm/miniport/qxl.c   |   12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 49feefa95d3595f04355c4aed53ec5bf26551046
Author: Alon Levy <alevy at redhat.com>
Date:   Mon Jul 29 16:10:09 2013 +0300

    miniport: halve QXL_IO_UPDATE_IRQ calls
    
    QXL_IO_UPDATE_IRQ causes the device to check int_mask and int_pending
    and issue an interrupt if that is required. Since we just zeroed
    int_mask, no interrupt will ever be issued. Since we issue another
    QXL_IO_UPDATE_IRQ in the interrupt routine DPC right after resetting
    int_mask any pending interrupt will be raised then.
    
    RHBZ: 856246

diff --git a/xddm/miniport/qxl.c b/xddm/miniport/qxl.c
index f5d6b48..ce37f07 100644
--- a/xddm/miniport/qxl.c
+++ b/xddm/miniport/qxl.c
@@ -1321,7 +1321,6 @@ BOOLEAN Interrupt(PVOID dev_extension)
         return FALSE;
     }
     dev_ext->ram_header->int_mask = 0;
-    VideoPortWritePortUchar((PUCHAR)dev_ext->io_base + QXL_IO_UPDATE_IRQ, 0);
 
     if (!VideoPortQueueDpc(dev_extension, InterruptCallback, NULL)) {
         VideoPortLogError(dev_extension, NULL, E_UNEXPECTED, QXLERR_INT_DELIVERY);
commit 06e3a524af721ba5fdc12bbf58c0b6749103319d
Author: Alon Levy <alevy at redhat.com>
Date:   Mon Jul 29 15:23:50 2013 +0300

    miniport: use a limited interrupt mask

diff --git a/xddm/miniport/qxl.c b/xddm/miniport/qxl.c
index 33efac7..f5d6b48 100644
--- a/xddm/miniport/qxl.c
+++ b/xddm/miniport/qxl.c
@@ -26,6 +26,10 @@
 #endif
 #include "minimal_snprintf.h"
 
+#define WIN_QXL_INT_MASK ((QXL_INTERRUPT_DISPLAY) | \
+                          (QXL_INTERRUPT_CURSOR) | \
+                          (QXL_INTERRUPT_IO_CMD))
+
 VP_STATUS FindAdapter(PVOID dev_extension,
                       PVOID reserved,
                       PWSTR arg_str,
@@ -828,7 +832,7 @@ void HWReset(QXLExtension *dev_ext);
  * when returning from sleep we don't want to do a redundant QXL_IO_RESET */
 static void ResetDeviceWithoutIO(QXLExtension *dev_ext)
 {
-    dev_ext->ram_header->int_mask = ~0;
+    dev_ext->ram_header->int_mask = WIN_QXL_INT_MASK;
     CreateMemSlots(dev_ext);
 }
 
@@ -1305,8 +1309,7 @@ VOID InterruptCallback(PVOID dev_extension, PVOID Context)
     if (pending & QXL_INTERRUPT_IO_CMD) {
         VideoPortSetEvent(dev_ext, dev_ext->io_cmd_event);
     }
-
-    dev_ext->ram_header->int_mask = ~0;
+    dev_ext->ram_header->int_mask = WIN_QXL_INT_MASK;
     VideoPortWritePortUchar((PUCHAR)dev_ext->io_base + QXL_IO_UPDATE_IRQ, 0);
 }
 
@@ -1322,7 +1325,7 @@ BOOLEAN Interrupt(PVOID dev_extension)
 
     if (!VideoPortQueueDpc(dev_extension, InterruptCallback, NULL)) {
         VideoPortLogError(dev_extension, NULL, E_UNEXPECTED, QXLERR_INT_DELIVERY);
-        dev_ext->ram_header->int_mask = ~0;
+        dev_ext->ram_header->int_mask = WIN_QXL_INT_MASK;
         VideoPortWritePortUchar((PUCHAR)dev_ext->io_base + QXL_IO_UPDATE_IRQ, 0);
     }
     return TRUE;
commit dfa00f06737ddbdc0621eee17d043da976e4cb4f
Author: Alon Levy <alevy at redhat.com>
Date:   Fri Jul 26 21:10:40 2013 +0300

    display/driver: DrvDeleteDeviceBitmap: log if pdev disabled
    
    Alternative is to leak, and this happens regularely. Perhaps we should
    be keeping track and destroying these surfaces later (in case no reset
    happens in the middle, which destroys all off screen surfaces anyway).

diff --git a/xddm/display/driver.c b/xddm/display/driver.c
index b8050de..aa4fe42 100644
--- a/xddm/display/driver.c
+++ b/xddm/display/driver.c
@@ -1464,6 +1464,11 @@ VOID APIENTRY DrvDeleteDeviceBitmap(DHSURF dhsurf)
 
     DEBUG_PRINT((pdev, 3, "%s: %p: %d\n", __FUNCTION__, pdev, surface_id));
 
+    if (!pdev->enabled) {
+        DEBUG_PRINT((pdev, 3, "%s: device disabled, still destroying\n",
+                    __FUNCTION__));
+    }
+
     ASSERT(pdev, surface_id < pdev->n_surfaces);
 
     DeleteDeviceBitmap(surface->u.pdev, surface_id,


More information about the Spice-commits mailing list