summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-08-06 18:13:13 +0200
committerStephane Marchesin <marchesin@icps.u-strasbg.fr>2007-08-06 18:14:44 +0200
commit2eab8453d73b4e7fd6c2d772d595ca5e8fa8c975 (patch)
treec52fa82b947aae6918a99223c9d210b71a2e1968
parent71076f7947ec71b7a0f363c23f5a51ef09cdd9c0 (diff)
downloadxorg-driver-xf86-video-nouveau-2eab8453d73b4e7fd6c2d772d595ca5e8fa8c975.tar.gz
Fix UTS/DFS when gart is smaller than transfer size.
-rw-r--r--src/nv_exa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nv_exa.c b/src/nv_exa.c
index d62c1e8..a2ca92f 100644
--- a/src/nv_exa.c
+++ b/src/nv_exa.c
@@ -335,6 +335,7 @@ NVAccelDownloadM2MF(ScrnInfoPtr pScrn, char *dst, uint64_t src_offset,
}
line_count -= lc;
+ src_offset += lc * src_pitch;
}
return TRUE;
@@ -429,6 +430,7 @@ NVAccelUploadM2MF(ScrnInfoPtr pScrn, uint64_t dst_offset, const char *src,
if (!NVNotifierWaitStatus(pScrn, pNv->Notifier0, 0, 0))
return FALSE;
+ dst_offset += lc * dst_pitch;
line_count -= lc;
}
@@ -449,12 +451,14 @@ static Bool NVUploadToScreen(PixmapPtr pDst,
cpp = pDst->drawable.bitsPerPixel >> 3;
if (pNv->GARTScratch) {
+ ErrorF("in UTSGart (%dx%d)\n",w,h);
dst_offset += (y * dst_pitch) + (x * cpp);
if (NVAccelUploadM2MF(pScrn, dst_offset, src, dst_pitch,
src_pitch, w * cpp, h))
return TRUE;
}
+ ErrorF("in UTSMemcpy (%dx%d)\n",w,h);
dst = pDst->devPrivate.ptr + (y * dst_pitch) + (x * cpp);
exaWaitSync(pDst->drawable.pScreen);
if (NVAccelMemcpyRect(dst, src, h, dst_pitch, src_pitch, w*cpp))