summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/unichrome/via_fb.c2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_ioctl.c3
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tris.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_fb.c b/src/mesa/drivers/dri/unichrome/via_fb.c
index 122d3b17cc..241bf0b9a3 100644
--- a/src/mesa/drivers/dri/unichrome/via_fb.c
+++ b/src/mesa/drivers/dri/unichrome/via_fb.c
@@ -76,7 +76,7 @@ via_alloc_dma_buffer(viaContextPtr vmesa)
*/
init.func = VIA_DMA_INITIALIZED;
vmesa->useAgp =
- ( 0 == drmCommandWrite(vmesa->driFd, VIA_INIT_DMA,
+ ( 0 == drmCommandWrite(vmesa->driFd, DRM_VIA_DMA_INIT,
&init, sizeof(init)));
if (vmesa->useAgp)
printf("unichrome_dri.so: Using AGP.\n");
diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c
index bbb6651dee..1ea7b2fa80 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();
diff --git a/src/mesa/drivers/dri/unichrome/via_tris.c b/src/mesa/drivers/dri/unichrome/via_tris.c
index 022399f698..6fd5a2a64c 100644
--- a/src/mesa/drivers/dri/unichrome/via_tris.c
+++ b/src/mesa/drivers/dri/unichrome/via_tris.c
@@ -987,7 +987,7 @@ void viaFinishPrimitive(viaContextPtr vmesa)
/* KW: modified 0x1 to 0x4 below:
*/
- if ((vmesa->dmaLow & 0x1) || !vmesa->useAgp) {
+ if ((vmesa->dmaLow & 0x4) || !vmesa->useAgp) {
BEGIN_RING_NOCHECK( 1 );
OUT_RING( cmdA );
ADVANCE_RING();