summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-09-21 14:54:34 +0300
committerAlon Levy <alevy@redhat.com>2011-09-21 14:54:34 +0300
commit0ba9e87062d68bae763130d027370bd3803a72c0 (patch)
treef8d07ac3a8593afafbf495421220eb021a645ff0
parent90e361409112a5e3b739abf027bc9e46e0a4846a (diff)
display: add pdev->use_async
-rw-r--r--display/driver.c1
-rw-r--r--display/qxldd.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/display/driver.c b/display/driver.c
index de1f714..5c4578c 100644
--- a/display/driver.c
+++ b/display/driver.c
@@ -719,6 +719,7 @@ static BOOL PrepareHardware(PDev *pdev)
}
pdev->pci_revision = dev_info.pci_revision;
+ pdev->use_async = (pdev->pci_revision >= QXL_REVISION_STABLE_V10);
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 6482e8a..c1a509f 100644
--- a/display/qxldd.h
+++ b/display/qxldd.h
@@ -287,6 +287,7 @@ typedef struct PDev {
HSEMAPHORE io_sem;
PUCHAR memslot_del_port;
PUCHAR flush_release_port;
+ UINT32 use_async;
UINT8* primary_memory_start;
UINT32 primary_memory_size;
@@ -448,7 +449,7 @@ static _inline RingItem *RingGetTail(PDev *pdev, Ring *ring)
*/
static _inline void async_io(PDev *pdev, asyncable_t op, UCHAR val)
{
- if (pdev->pci_revision >= QXL_REVISION_STABLE_V10) {
+ if (pdev->use_async) {
EngAcquireSemaphore(pdev->io_sem);
WRITE_PORT_UCHAR(pdev->asyncable[op][ASYNC], val);
WAIT_FOR_EVENT(pdev, pdev->io_cmd_event, NULL);