Reinstate buffer idle before applying relocations.

main
Thomas Hellstrom 2008-02-27 21:44:40 +01:00
parent 72983ff301
commit fd595fa4dc
1 changed files with 8 additions and 8 deletions

View File

@ -805,6 +805,7 @@ struct i915_relocatee_info {
unsigned page_offset; unsigned page_offset;
struct drm_bo_kmap_obj kmap; struct drm_bo_kmap_obj kmap;
int is_iomem; int is_iomem;
int idle;
}; };
struct drm_i915_validate_buffer { struct drm_i915_validate_buffer {
@ -861,13 +862,12 @@ int i915_apply_reloc(struct drm_file *file_priv, int num_buffers,
relocatee->data_page = NULL; relocatee->data_page = NULL;
relocatee->offset = new_cmd_offset; relocatee->offset = new_cmd_offset;
/* if (unlikely(!relocatee->idle)) {
* Note on buffer idle: ret = drm_bo_wait(relocatee->buf, 0, 0, 0);
* Since we're applying relocations, this part of the if (ret)
* buffer is obviously not used by the GPU and we don't return ret;
* need to wait for buffer idle. This is an important relocatee->idle = 1;
* consideration for user-space buffer pools. }
*/
ret = drm_bo_kmap(relocatee->buf, new_cmd_offset >> PAGE_SHIFT, ret = drm_bo_kmap(relocatee->buf, new_cmd_offset >> PAGE_SHIFT,
1, &relocatee->kmap); 1, &relocatee->kmap);