[Spice-devel] [PATCH 3/3] miniport: halve QXL_IO_UPDATE_IRQ calls
Alon Levy
alevy at redhat.com
Mon Jul 29 06:15:00 PDT 2013
RHBZ: 856246
---
miniport/qxl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/miniport/qxl.c b/miniport/qxl.c
index f5d6b48..629fbdb 100644
--- a/miniport/qxl.c
+++ b/miniport/qxl.c
@@ -1298,7 +1298,7 @@ err:
VOID InterruptCallback(PVOID dev_extension, PVOID Context)
{
QXLExtension *dev_ext = dev_extension;
- UINT32 pending = VideoPortInterlockedExchange(&dev_ext->ram_header->int_pending, 0);
+ UINT32 pending = (UINT32)Context;
if (pending & QXL_INTERRUPT_DISPLAY) {
VideoPortSetEvent(dev_ext, dev_ext->display_event);
@@ -1316,14 +1316,14 @@ VOID InterruptCallback(PVOID dev_extension, PVOID Context)
BOOLEAN Interrupt(PVOID dev_extension)
{
QXLExtension *dev_ext = dev_extension;
+ UINT32 pending;
- if (!(dev_ext->ram_header->int_pending & dev_ext->ram_header->int_mask)) {
+ pending = VideoPortInterlockedExchange(&dev_ext->ram_header->int_pending, 0);
+ if (!(pending & dev_ext->ram_header->int_mask)) {
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)) {
+ if (!VideoPortQueueDpc(dev_extension, InterruptCallback, (void *)pending)) {
VideoPortLogError(dev_extension, NULL, E_UNEXPECTED, QXLERR_INT_DELIVERY);
dev_ext->ram_header->int_mask = WIN_QXL_INT_MASK;
VideoPortWritePortUchar((PUCHAR)dev_ext->io_base + QXL_IO_UPDATE_IRQ, 0);
--
1.8.3.1
More information about the Spice-devel
mailing list