drm/ttm: Handle in memory region copies
Subsystems (3)
PATCH 1/1 drm/ttm: Handle in memory region copies
Reviewed-by Thomas Hellström <[email protected]>
Signed-off-by Jakob Bornecrantz <[email protected]>
Cc Dave Airlie <[email protected]>
--- drivers/gpu/drm/ttm/ttm_bo_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_bo_util.c +3 -1
@@ -342,7 +342,9 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,if (old_iomap ==NULL && ttm ==NULL ) goto out2; -if (ttm->state == tt_unpopulated) { +/* TTM might be null for moves within the same region. +*/ +if (ttm && ttm->state == tt_unpopulated) { ret = ttm->bdev->driver->ttm_tt_populate (ttm);if (ret) {/* if we fail here don't nuke the mm node
Signature · 1 line
1.8.1.2
Quoted 14 lines · Jakob Bornecrantz
Reviewed-by Thomas Hellström <[email protected]>Signed-off-by Jakob Bornecrantz <[email protected]>Cc Dave Airlie <[email protected]>--- drivers/gpu/drm/ttm/ttm_bo_util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_bo_util.c +0
-0
drivers/gpu/drm/ttm/ttm_bo_util.c int ttm_bo_move_memcpy(struct ttm_buffer_object *bo, · line 350
Quoted 10 lines
drivers/gpu/drm/ttm/ttm_bo_util.c +3
-1@@ -342,7 +342,9 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,if (old_iomap ==NULL && ttm ==NULL ) goto out2; -if (ttm->state == tt_unpopulated) { +/* TTM might be null for moves within the same region. +*/ +if (ttm && ttm->state == tt_unpopulated) { ret = ttm->bdev->driver->ttm_tt_populate (ttm);if (ret) {/* if we fail here don't nuke the mm node
LGTM. There are a couple of other fixes needed in this function as well.
/Thomas
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel