aboutsummaryrefslogtreecommitdiff
path: root/linux-core/via_dmablit.c
diff options
context:
space:
mode:
authorThomas Hellstrom <unichrome@shipmail.org>2005-11-15 11:20:47 +0000
committerThomas Hellstrom <unichrome@shipmail.org>2005-11-15 11:20:47 +0000
commitc8261e3d2486050dcd76fb769f6806982260df96 (patch)
tree5975cfa7e2c23ecf8ca96d15144df02e7bb57fc0 /linux-core/via_dmablit.c
parentc575b7e19ec83e663af91b431ac8c0a9e16a3a5d (diff)
Loosen via dmablit alignment checks somewhat. Adapt stride check to maximum
sceen size for EXA.
Diffstat (limited to 'linux-core/via_dmablit.c')
-rw-r--r--linux-core/via_dmablit.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux-core/via_dmablit.c b/linux-core/via_dmablit.c
index 6e04cb57..2b025a21 100644
--- a/linux-core/via_dmablit.c
+++ b/linux-core/via_dmablit.c
@@ -596,8 +596,9 @@ via_build_sg_info(drm_device_t *dev, drm_via_sg_info_t *vsg, drm_via_dmablit_t *
*/
if (((xfer->mem_stride - xfer->line_length) >= PAGE_SIZE) ||
- (xfer->mem_stride > 2048)) {
- DRM_ERROR("Too large system memory stride.\n");
+ (xfer->mem_stride > 2048*4)) {
+ DRM_ERROR("Too large system memory stride. Stride: %d, "
+ "Length: %d\n", xfer->mem_stride, xfer->line_length);
return DRM_ERR(EINVAL);
}
@@ -630,7 +631,8 @@ via_build_sg_info(drm_device_t *dev, drm_via_sg_info_t *vsg, drm_via_dmablit_t *
return DRM_ERR(EINVAL);
}
#else
- if ((((unsigned long)xfer->mem_addr & 15) || ((unsigned long)xfer->fb_addr & 15))) {
+ if ((((unsigned long)xfer->mem_addr & 15) || ((unsigned long)xfer->fb_addr & 3)) ||
+ (xfer->mem_stride & 15) || (xfer->fb_stride & 3)) {
DRM_ERROR("Invalid DRM bitblt alignment.\n");
return DRM_ERR(EINVAL);
}