diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo_vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 08a3c324242e..60fcef1593dd 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c | |||
@@ -316,7 +316,7 @@ static void ttm_bo_vm_close(struct vm_area_struct *vma) | |||
316 | 316 | ||
317 | static int ttm_bo_vm_access_kmap(struct ttm_buffer_object *bo, | 317 | static int ttm_bo_vm_access_kmap(struct ttm_buffer_object *bo, |
318 | unsigned long offset, | 318 | unsigned long offset, |
319 | void *buf, int len, int write) | 319 | uint8_t *buf, int len, int write) |
320 | { | 320 | { |
321 | unsigned long page = offset >> PAGE_SHIFT; | 321 | unsigned long page = offset >> PAGE_SHIFT; |
322 | unsigned long bytes_left = len; | 322 | unsigned long bytes_left = len; |
@@ -345,6 +345,7 @@ static int ttm_bo_vm_access_kmap(struct ttm_buffer_object *bo, | |||
345 | ttm_bo_kunmap(&map); | 345 | ttm_bo_kunmap(&map); |
346 | 346 | ||
347 | page++; | 347 | page++; |
348 | buf += bytes; | ||
348 | bytes_left -= bytes; | 349 | bytes_left -= bytes; |
349 | offset = 0; | 350 | offset = 0; |
350 | } while (bytes_left); | 351 | } while (bytes_left); |