summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2007-08-06 00:13:35 +1000
committerBen Skeggs <skeggsb@gmail.com>2007-08-06 00:13:35 +1000
commit047aa7e0a6ecce59c9be8d36c51f082c0ddaafe8 (patch)
treef13d1740915043a4e73fb9f91b26454113ddcb83
parent68070ff7309c8b1cf149490dcf537892b0bf44bc (diff)
downloadxorg-driver-xf86-video-nouveau-047aa7e0a6ecce59c9be8d36c51f082c0ddaafe8.tar.gz
Clamp NV_MEMORY_TO_MEMORY_FORMAT_LINE_COUNT to 2047 lines.
At least NV40 can't handle values larger than this. Patch fixes hang when visiting opengl.org.
-rw-r--r--src/nv_exa.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nv_exa.c b/src/nv_exa.c
index 56443ba..700a49a 100644
--- a/src/nv_exa.c
+++ b/src/nv_exa.c
@@ -297,7 +297,10 @@ NVAccelDownloadM2MF(ScrnInfoPtr pScrn, char *dst, uint64_t src_offset,
if (lc > line_count)
lc = line_count;
}
- /*XXX: and hw limitations? */
+
+ /* HW limitations */
+ if (lc > 2047)
+ lc = 2047;
NVDmaStart(pNv, NvSubMemFormat,
NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8);
@@ -387,7 +390,10 @@ NVAccelUploadM2MF(ScrnInfoPtr pScrn, uint64_t dst_offset, const char *src,
if (lc > line_count)
lc = line_count;
}
- /*XXX: and hw limitations? */
+
+ /* HW limitations */
+ if (lc > 2047)
+ lc = 2047;
/* Upload to GART */
if (src_pitch == line_len) {