path: root/drivers/gpu/drm/ttm/ttm_bo_util.c
diff options
authorTakashi Iwai <tiwai@suse.de>2016-08-25 17:56:09 +0200
committerTakashi Iwai <tiwai@suse.de>2016-08-25 17:56:09 +0200
commita820cd3d25c2891028b5f296a8a871ce6dd92c0d (patch)
tree3e86aeb1b898e9ca0dd6754dc7e6ff68865ee175 /drivers/gpu/drm/ttm/ttm_bo_util.c
parentabaa2274811d607679e8687b4118c4922a3517ac (diff)
parentcfb89f2e7505c6823020a18bbdc5410284305234 (diff)
Merge tag 'asoc-fix-v4.8-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.8 A clutch of fixes for v4.8. These are mainly driver specific, the most notable ones being those for OMAP which fix a series of issues that broke boot on some platforms there when deferred probe kicked in. There's also one core fix for an issue when unbinding a card which for some reason had managed to not manifest until recently.
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_bo_util.c')
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index 2df602a35f92..f157a9efd220 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -45,7 +45,7 @@ void ttm_bo_free_old_node(struct ttm_buffer_object *bo)
int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
- bool evict,
+ bool evict, bool interruptible,
bool no_wait_gpu, struct ttm_mem_reg *new_mem)
struct ttm_tt *ttm = bo->ttm;
@@ -53,6 +53,14 @@ int ttm_bo_move_ttm(struct ttm_buffer_object *bo,
int ret;
if (old_mem->mem_type != TTM_PL_SYSTEM) {
+ ret = ttm_bo_wait(bo, interruptible, no_wait_gpu);
+ if (unlikely(ret != 0)) {
+ if (ret != -ERESTARTSYS)
+ pr_err("Failed to expire sync object before unbinding TTM\n");
+ return ret;
+ }
ttm_flag_masked(&old_mem->placement, TTM_PL_FLAG_SYSTEM,