aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/unichrome/via_ioctl.c
diff options
context:
space:
mode:
authorThomas Hellström <[email protected]>2005-01-06 13:51:37 +0000
committerThomas Hellström <[email protected]>2005-01-06 13:51:37 +0000
commit4c1d373ce17ad0831a986c9e88f65425e5dab4f4 (patch)
treea30296ffc0cd3d7b883745c3a3bec88d91b11309 /src/mesa/drivers/dri/unichrome/via_ioctl.c
parentdd1ef7c0d78fdb2dd6587c87394680c6e8c79648 (diff)
Small Unichrome fixes:
1. Unlock hardware before aborting and dumping DMA buffers. Otherwise display system may deadlock. 2. Fix DMA init IOCTL call that got mixed up in one of the previous commits. 3. Fix AGP command alignment
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_ioctl.c')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index bbb6651deef..1ea7b2fa806 100644
--- a/src/mesa/drivers/dri/unichrome/via_ioctl.c
+++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c
@@ -458,6 +458,7 @@ static int fire_buffer(viaContextPtr vmesa)
&bSiz, sizeof(bSiz));
} while (ret == -EAGAIN);
if (ret) {
+ UNLOCK_HARDWARE(vmesa);
fprintf(stderr, "%s: DRM_VIA_CMDBUF_SIZE returned %d\n", __FUNCTION__, ret);
abort();
return ret;
@@ -470,6 +471,7 @@ static int fire_buffer(viaContextPtr vmesa)
&bufI, sizeof(bufI));
} while (ret == -EAGAIN);
if (ret) {
+ UNLOCK_HARDWARE(vmesa);
fprintf(stderr, "%s: DRM_VIA_CMDBUFFER returned %d\n", __FUNCTION__, ret);
abort();
/* If this fails, the original code fell back to the PCI path.
@@ -485,6 +487,7 @@ static int fire_buffer(viaContextPtr vmesa)
ret = drmCommandWrite(vmesa->driFd, DRM_VIA_PCICMD, &bufI, sizeof(bufI));
if (ret) {
+ UNLOCK_HARDWARE(vmesa);
dump_dma(vmesa);
fprintf(stderr, "%s: DRM_VIA_PCICMD returned %d\n", __FUNCTION__, ret);
abort();