summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-07-17 14:00:25 +1000
committerBen Skeggs <skeggsb@gmail.com>2007-07-17 14:00:25 +1000
commit94da101b675916aeaf751df28bea4af67b2bb175 (patch)
tree57e12d6fd74fdc8d27cde57f8108f31adc4726a6
parent2d774b83d573f4a91fdf19ff6beba5ed78f1fd5b (diff)
downloadxorg-driver-xf86-video-nouveau-94da101b675916aeaf751df28bea4af67b2bb175.tar.gz
NV50: Get NV_MEMORY_TO_MEMORY_FORMAT working.
-rw-r--r--src/nv_exa.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nv_exa.c b/src/nv_exa.c
index d4ed90f..353e8a5 100644
--- a/src/nv_exa.c
+++ b/src/nv_exa.c
@@ -299,6 +299,17 @@ NVAccelDownloadM2MF(ScrnInfoPtr pScrn, char *dst, uint64_t src_offset,
}
/*XXX: and hw limitations? */
+ if (pNv->Architecture >= NV_ARCH_50) {
+ NVDmaStart(pNv, NvSubMemFormat, 0x200, 1);
+ NVDmaNext (pNv, 1);
+ NVDmaStart(pNv, NvSubMemFormat, 0x21c, 1);
+ NVDmaNext (pNv, 1);
+ /* probably high-order bits of address */
+ NVDmaStart(pNv, NvSubMemFormat, 0x238, 2);
+ NVDmaNext (pNv, 0);
+ NVDmaNext (pNv, 0);
+ }
+
NVDmaStart(pNv, NvSubMemFormat,
NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);
NVDmaNext (pNv, (uint32_t)src_offset);
@@ -401,6 +412,17 @@ NVAccelUploadM2MF(ScrnInfoPtr pScrn, uint64_t dst_offset, const char *src,
}
}
+ if (pNv->Architecture >= NV_ARCH_50) {
+ NVDmaStart(pNv, NvSubMemFormat, 0x200, 1);
+ NVDmaNext (pNv, 1);
+ NVDmaStart(pNv, NvSubMemFormat, 0x21c, 1);
+ NVDmaNext (pNv, 1);
+ /* probably high-order bits of address */
+ NVDmaStart(pNv, NvSubMemFormat, 0x238, 2);
+ NVDmaNext (pNv, 0);
+ NVDmaNext (pNv, 0);
+ }
+
/* DMA to VRAM */
NVDmaStart(pNv, NvSubMemFormat,
NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);