diff options
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_evict.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_evict.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 5168d6a08054..8a78f7885cba 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c | |||
@@ -68,7 +68,7 @@ mark_free(struct i915_vma *vma, struct list_head *unwind) | |||
68 | int | 68 | int |
69 | i915_gem_evict_something(struct drm_device *dev, struct i915_address_space *vm, | 69 | i915_gem_evict_something(struct drm_device *dev, struct i915_address_space *vm, |
70 | int min_size, unsigned alignment, unsigned cache_level, | 70 | int min_size, unsigned alignment, unsigned cache_level, |
71 | bool mappable, bool nonblocking) | 71 | unsigned flags) |
72 | { | 72 | { |
73 | drm_i915_private_t *dev_priv = dev->dev_private; | 73 | drm_i915_private_t *dev_priv = dev->dev_private; |
74 | struct list_head eviction_list, unwind_list; | 74 | struct list_head eviction_list, unwind_list; |
@@ -76,7 +76,7 @@ i915_gem_evict_something(struct drm_device *dev, struct i915_address_space *vm, | |||
76 | int ret = 0; | 76 | int ret = 0; |
77 | int pass = 0; | 77 | int pass = 0; |
78 | 78 | ||
79 | trace_i915_gem_evict(dev, min_size, alignment, mappable); | 79 | trace_i915_gem_evict(dev, min_size, alignment, flags); |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * The goal is to evict objects and amalgamate space in LRU order. | 82 | * The goal is to evict objects and amalgamate space in LRU order. |
@@ -102,7 +102,7 @@ i915_gem_evict_something(struct drm_device *dev, struct i915_address_space *vm, | |||
102 | */ | 102 | */ |
103 | 103 | ||
104 | INIT_LIST_HEAD(&unwind_list); | 104 | INIT_LIST_HEAD(&unwind_list); |
105 | if (mappable) { | 105 | if (flags & PIN_MAPPABLE) { |
106 | BUG_ON(!i915_is_ggtt(vm)); | 106 | BUG_ON(!i915_is_ggtt(vm)); |
107 | drm_mm_init_scan_with_range(&vm->mm, min_size, | 107 | drm_mm_init_scan_with_range(&vm->mm, min_size, |
108 | alignment, cache_level, 0, | 108 | alignment, cache_level, 0, |
@@ -117,7 +117,7 @@ search_again: | |||
117 | goto found; | 117 | goto found; |
118 | } | 118 | } |
119 | 119 | ||
120 | if (nonblocking) | 120 | if (flags & PIN_NONBLOCK) |
121 | goto none; | 121 | goto none; |
122 | 122 | ||
123 | /* Now merge in the soon-to-be-expired objects... */ | 123 | /* Now merge in the soon-to-be-expired objects... */ |
@@ -141,7 +141,7 @@ none: | |||
141 | /* Can we unpin some objects such as idle hw contents, | 141 | /* Can we unpin some objects such as idle hw contents, |
142 | * or pending flips? | 142 | * or pending flips? |
143 | */ | 143 | */ |
144 | if (nonblocking) | 144 | if (flags & PIN_NONBLOCK) |
145 | return -ENOSPC; | 145 | return -ENOSPC; |
146 | 146 | ||
147 | /* Only idle the GPU and repeat the search once */ | 147 | /* Only idle the GPU and repeat the search once */ |