diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-08 19:06:39 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-08 19:06:39 +0100 |
commit | a0ed808d05a7965366e329a6e8f4e538350b9c23 (patch) | |
tree | f55aae7fce246cf28a1e544759676718c25e8a2c | |
parent | bf8f46d4c64eb5b66814223f7e5ddb8d8e7a555e (diff) |
Don't create a ttm just to copy from.
-rw-r--r-- | linux-core/drm_bo.c | 3 | ||||
-rw-r--r-- | linux-core/drm_bo_move.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/linux-core/drm_bo.c b/linux-core/drm_bo.c index 728afb41..e3ecaf45 100644 --- a/linux-core/drm_bo.c +++ b/linux-core/drm_bo.c @@ -164,8 +164,7 @@ static int drm_bo_handle_move_mem(drm_buffer_object_t *bo, if (ret) return ret; - if ((!(old_man->flags & _DRM_FLAG_MEMTYPE_FIXED) || - !(new_man->flags & _DRM_FLAG_MEMTYPE_FIXED)) && + if (!(new_man->flags & _DRM_FLAG_MEMTYPE_FIXED) && (bo->ttm == NULL)) ret = drm_bo_add_ttm(bo); if (ret) diff --git a/linux-core/drm_bo_move.c b/linux-core/drm_bo_move.c index 4ed3392d..9bfb3ef1 100644 --- a/linux-core/drm_bo_move.c +++ b/linux-core/drm_bo_move.c @@ -219,6 +219,8 @@ int drm_bo_move_memcpy(drm_buffer_object_t *bo, if (old_iomap == NULL && new_iomap == NULL) goto out2; + if (old_iomap == NULL && ttm == NULL) + goto out2; add = 0; dir = 1; |