summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/qxl/qxl_irq.c1
-rw-r--r--drivers/gpu/drm/qxl/qxl_kms.c14
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c
index bc973731568..8149072e4c4 100644
--- a/drivers/gpu/drm/qxl/qxl_irq.c
+++ b/drivers/gpu/drm/qxl/qxl_irq.c
@@ -43,6 +43,7 @@ int qxl_irq_init(struct qxl_device *qdev)
atomic_set(&qdev->irq_received_io_cmd, 0);
qdev->irq_received_error = 0;
ret = drm_irq_install(qdev->ddev);
+ qdev->ram_header->int_mask = ~0;
if (unlikely(ret != 0)) {
DRM_ERROR("Failed installing irq: %d\n", ret);
return 1;
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index 56f6e0ad50d..49784411591 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -132,6 +132,13 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->mem_slots = kmalloc(qdev->n_mem_slots * sizeof(struct qxl_memslot), GFP_KERNEL);
+ idr_init(&qdev->buffer_idr);
+ idr_init(&qdev->release_idr);
+ mutex_init(&qdev->release_idr_mutex);
+
+ r = qxl_irq_init(qdev); /* must initialize irq before first async io */
+ if (r)
+ return r;
/*
* Note that virtual is surface0. We rely on the single ioremap done before.
*/
@@ -142,10 +149,6 @@ int qxl_device_init(struct qxl_device *qdev,
qdev->main_mem_slot,
(unsigned long)qdev->vram_base, qdev->rom->ram_header_offset);
- idr_init(&qdev->buffer_idr);
- idr_init(&qdev->release_idr);
- mutex_init(&qdev->release_idr_mutex);
-
return 0;
}
@@ -205,10 +208,7 @@ int qxl_driver_load(struct drm_device *dev, unsigned long flags)
goto out;
}
- if (unlikely(qxl_irq_init(qdev) != 0))
- goto out;
return 0;
-
out:
kfree(qdev);
return r;