diff options
author | Dave Airlie <airlied@linux.ie> | 2008-03-06 05:26:23 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-03-06 05:26:23 +1000 |
commit | e00dea812ddb9b483de9f58f7a7aa7105427512d (patch) | |
tree | 9ffef663b16a3c444ea9a294d635be4e81e6fe99 /shared-core | |
parent | f78cdac8e512642db1aaf09bf9178e23ede25586 (diff) | |
parent | 12574590cdf7871755d1939463ca6898251fd0d1 (diff) |
Merge branch 'master' of ../../drm into modesetting-101
Conflicts:
linux-core/drmP.h
linux-core/drm_drv.c
linux-core/drm_proc.c
linux-core/drm_stub.c
linux-core/drm_sysfs.c
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index 13332d24..8237e145 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -805,6 +805,7 @@ struct i915_relocatee_info { struct drm_bo_kmap_obj kmap; int is_iomem; int idle; + int evicted; }; struct drm_i915_validate_buffer { @@ -877,6 +878,12 @@ int i915_apply_reloc(struct drm_file *file_priv, int num_buffers, relocatee->data_page = drm_bmo_virtual(&relocatee->kmap, &relocatee->is_iomem); relocatee->page_offset = (relocatee->offset & PAGE_MASK); + + if (!relocatee->evicted && + relocatee->buf->mem.flags & DRM_BO_FLAG_CACHED_MAPPED) { + drm_bo_evict_cached(relocatee->buf); + relocatee->evicted = 1; + } } val = buffers[buf_index].buffer->offset; |