aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo_util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 4834c463c38b..15b86a94949d 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -350,10 +350,13 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,
350 goto out2; 350 goto out2;
351 351
352 /* 352 /*
353 * Move nonexistent data. NOP. 353 * Don't move nonexistent data. Clear destination instead.
354 */ 354 */
355 if (old_iomap == NULL && ttm == NULL) 355 if (old_iomap == NULL &&
356 (ttm == NULL || ttm->state == tt_unpopulated)) {
357 memset_io(new_iomap, 0, new_mem->num_pages*PAGE_SIZE);
356 goto out2; 358 goto out2;
359 }
357 360
358 /* 361 /*
359 * TTM might be null for moves within the same region. 362 * TTM might be null for moves within the same region.