diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-04-02 11:14:48 -0400 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-09-02 10:41:50 -0400 |
commit | f2c24b83ae90292d315aa7ac029c6ce7929e01aa (patch) | |
tree | 4ef7d29d97cee6231becd7565056d630770d0845 /drivers/gpu/drm/ttm/ttm_execbuf_util.c | |
parent | 2f453ed4038526172292fb3250b638b3782c7f2b (diff) |
drm/ttm: flip the switch, and convert to dma_fence
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_execbuf_util.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_execbuf_util.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_execbuf_util.c b/drivers/gpu/drm/ttm/ttm_execbuf_util.c index 108730e9147b..adafc0f8ec06 100644 --- a/drivers/gpu/drm/ttm/ttm_execbuf_util.c +++ b/drivers/gpu/drm/ttm/ttm_execbuf_util.c | |||
@@ -163,7 +163,7 @@ int ttm_eu_reserve_buffers(struct ww_acquire_ctx *ticket, | |||
163 | EXPORT_SYMBOL(ttm_eu_reserve_buffers); | 163 | EXPORT_SYMBOL(ttm_eu_reserve_buffers); |
164 | 164 | ||
165 | void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket, | 165 | void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket, |
166 | struct list_head *list, void *sync_obj) | 166 | struct list_head *list, struct fence *fence) |
167 | { | 167 | { |
168 | struct ttm_validate_buffer *entry; | 168 | struct ttm_validate_buffer *entry; |
169 | struct ttm_buffer_object *bo; | 169 | struct ttm_buffer_object *bo; |
@@ -183,18 +183,12 @@ void ttm_eu_fence_buffer_objects(struct ww_acquire_ctx *ticket, | |||
183 | 183 | ||
184 | list_for_each_entry(entry, list, head) { | 184 | list_for_each_entry(entry, list, head) { |
185 | bo = entry->bo; | 185 | bo = entry->bo; |
186 | entry->old_sync_obj = bo->sync_obj; | 186 | reservation_object_add_excl_fence(bo->resv, fence); |
187 | bo->sync_obj = driver->sync_obj_ref(sync_obj); | ||
188 | ttm_bo_add_to_lru(bo); | 187 | ttm_bo_add_to_lru(bo); |
189 | __ttm_bo_unreserve(bo); | 188 | __ttm_bo_unreserve(bo); |
190 | } | 189 | } |
191 | spin_unlock(&glob->lru_lock); | 190 | spin_unlock(&glob->lru_lock); |
192 | if (ticket) | 191 | if (ticket) |
193 | ww_acquire_fini(ticket); | 192 | ww_acquire_fini(ticket); |
194 | |||
195 | list_for_each_entry(entry, list, head) { | ||
196 | if (entry->old_sync_obj) | ||
197 | driver->sync_obj_unref(&entry->old_sync_obj); | ||
198 | } | ||
199 | } | 193 | } |
200 | EXPORT_SYMBOL(ttm_eu_fence_buffer_objects); | 194 | EXPORT_SYMBOL(ttm_eu_fence_buffer_objects); |