summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_evict.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-07-31 16:59:56 -0700
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-05 19:04:08 +0200
commita70a3148b0c61cb7c588ea650db785b261b378a3 (patch)
tree63d9dbfe3c2ef436411b4e9aeb58abe99a78c9a0 /drivers/gpu/drm/i915/i915_gem_evict.c
parent31a46c9c092afc6558e7be7eaa42eb9bd4d3de8b (diff)
downloadlinux-a70a3148b0c61cb7c588ea650db785b261b378a3.tar.bz2
drm/i915: Make proper functions for VMs
Earlier in the conversion sequence we attempted to quickly wedge in the transitional interface as static inlines. Now that we're sure these interfaces are sane, for easier debug and to decrease code size (since many of these functions may be called quite a bit), make them real functions While at it, kill off the set_color interface. We'll always have the VMA, or easily get to it. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_evict.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_evict.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index df61f338dea1..33d85a4447a6 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -34,7 +34,9 @@
static bool
mark_free(struct drm_i915_gem_object *obj, struct list_head *unwind)
{
- struct i915_vma *vma = __i915_gem_obj_to_vma(obj);
+ struct drm_device *dev = obj->base.dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ struct i915_vma *vma = i915_gem_obj_to_vma(obj, &dev_priv->gtt.base);
if (obj->pin_count)
return false;
@@ -109,7 +111,7 @@ none:
obj = list_first_entry(&unwind_list,
struct drm_i915_gem_object,
exec_list);
- vma = __i915_gem_obj_to_vma(obj);
+ vma = i915_gem_obj_to_vma(obj, &dev_priv->gtt.base);
ret = drm_mm_scan_remove_block(&vma->node);
BUG_ON(ret);
@@ -130,7 +132,7 @@ found:
obj = list_first_entry(&unwind_list,
struct drm_i915_gem_object,
exec_list);
- vma = __i915_gem_obj_to_vma(obj);
+ vma = i915_gem_obj_to_vma(obj, &dev_priv->gtt.base);
if (drm_mm_scan_remove_block(&vma->node)) {
list_move(&obj->exec_list, &eviction_list);
drm_gem_object_reference(&obj->base);