diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-12 17:47:57 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-02-12 17:47:57 +0100 |
commit | f02f83ee08a2bb87700544a9b67f475532e84af4 (patch) | |
tree | 1156b778f46f1de2ffc4541a0253cb6389c8163e /linux-core/i915_buffer.c | |
parent | 85ee2a8d044cd4d8de4894a794151af9471648e3 (diff) |
Cleanup and fix support for pinned buffers.
Diffstat (limited to 'linux-core/i915_buffer.c')
-rw-r--r-- | linux-core/i915_buffer.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/linux-core/i915_buffer.c b/linux-core/i915_buffer.c index a357a53e..7655902f 100644 --- a/linux-core/i915_buffer.c +++ b/linux-core/i915_buffer.c @@ -154,9 +154,9 @@ static void i915_emit_copy_blit(drm_device_t *dev, } static int i915_move_blit(drm_buffer_object_t *bo, - int evict, - int no_wait, - drm_bo_mem_reg_t *new_mem) + int evict, + int no_wait, + drm_bo_mem_reg_t *new_mem) { drm_bo_mem_reg_t *old_mem = &bo->mem; int dir = 0; @@ -203,7 +203,7 @@ static int i915_move_flip(drm_buffer_object_t *bo, DRM_BO_FLAG_CACHED | DRM_BO_FLAG_FORCE_CACHING; - ret = drm_bo_mem_space(dev, &tmp_mem, no_wait); + ret = drm_bo_mem_space(bo, &tmp_mem, no_wait); if (ret) return ret; @@ -238,10 +238,12 @@ int i915_move(drm_buffer_object_t *bo, return drm_bo_move_memcpy(bo, evict, no_wait, new_mem); } else if (new_mem->mem_type == DRM_BO_MEM_LOCAL) { if (i915_move_flip(bo, evict, no_wait, new_mem)) - return drm_bo_move_memcpy(bo, evict, no_wait, new_mem); + return drm_bo_move_memcpy(bo, evict, no_wait, + new_mem); } else { - if (i915_move_blit(bo, evict, no_wait, new_mem)) - return drm_bo_move_memcpy(bo, evict, no_wait, new_mem); + if (i915_move_blit(bo, evict, no_wait, new_mem)) + return drm_bo_move_memcpy(bo, evict, no_wait, + new_mem); } return 0; } |