diff options
author | Dave Airlie <airlied@linux.ie> | 2009-09-25 19:03:39 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-09-25 19:03:39 -0400 |
commit | c5e617e2f84225a28823a3e19951273b9f59eb27 (patch) | |
tree | c35741880d286b2bf29c0409ccba6bd784dc4efa /drivers/gpu/drm/radeon | |
parent | 2f67c6e0220e5311bb14895d32852250b2d9652b (diff) |
drm/radeon/kms: fix for the extra pages copying.
Thanks to Michel for pointing this out to me, this is
why I need to get more sleep, over complicate this a bit.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_cs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index dea8acf88865..5ab2cf96a264 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -303,13 +303,11 @@ int radeon_cs_finish_pages(struct radeon_cs_parser *p) | |||
303 | int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx) | 303 | int radeon_cs_update_pages(struct radeon_cs_parser *p, int pg_idx) |
304 | { | 304 | { |
305 | int new_page; | 305 | int new_page; |
306 | int num_extra_pages; | ||
307 | struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx]; | 306 | struct radeon_cs_chunk *ibc = &p->chunks[p->chunk_ib_idx]; |
308 | int i; | 307 | int i; |
309 | int size = PAGE_SIZE; | 308 | int size = PAGE_SIZE; |
310 | 309 | ||
311 | num_extra_pages = (pg_idx - ibc->last_copied_page - 1); | 310 | for (i = ibc->last_copied_page + 1; i < pg_idx; i++) { |
312 | for (i = ibc->last_copied_page + 1; i < ibc->last_copied_page + num_extra_pages; i++) { | ||
313 | if (DRM_COPY_FROM_USER(p->ib->ptr + (i * (PAGE_SIZE/4)), | 311 | if (DRM_COPY_FROM_USER(p->ib->ptr + (i * (PAGE_SIZE/4)), |
314 | ibc->user_ptr + (i * PAGE_SIZE), | 312 | ibc->user_ptr + (i * PAGE_SIZE), |
315 | PAGE_SIZE)) { | 313 | PAGE_SIZE)) { |