aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-09-02 23:39:47 -0400
committerDave Airlie <airlied@redhat.com>2014-09-02 23:39:47 -0400
commit0977f906791f0cea689bd2ccd5289e2258f015a5 (patch)
tree5909a8be311a09d3bfb4f089c01e639d9321473d
parent46712cc9596746d4da2bf6a90502b76823a3bc6c (diff)
parentf01ea0c3d9db536c64d47922716d8b3b8f21d850 (diff)
Merge branch 'vmwgfx-fixes-3.17' of git://people.freedesktop.org/~thomash/linux into drm-fixes
Two vmwgfx fixes, marked for stable as well * 'vmwgfx-fixes-3.17' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle drm/vmwgfx: Fix an incorrect OOM return value
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c11
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c3
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 7bfdaa163a33..36b871686d3c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -450,11 +450,11 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
450 res, 450 res,
451 id_loc - sw_context->buf_start); 451 id_loc - sw_context->buf_start);
452 if (unlikely(ret != 0)) 452 if (unlikely(ret != 0))
453 goto out_err; 453 return ret;
454 454
455 ret = vmw_resource_val_add(sw_context, res, &node); 455 ret = vmw_resource_val_add(sw_context, res, &node);
456 if (unlikely(ret != 0)) 456 if (unlikely(ret != 0))
457 goto out_err; 457 return ret;
458 458
459 if (res_type == vmw_res_context && dev_priv->has_mob && 459 if (res_type == vmw_res_context && dev_priv->has_mob &&
460 node->first_usage) { 460 node->first_usage) {
@@ -468,13 +468,13 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
468 468
469 ret = vmw_resource_context_res_add(dev_priv, sw_context, res); 469 ret = vmw_resource_context_res_add(dev_priv, sw_context, res);
470 if (unlikely(ret != 0)) 470 if (unlikely(ret != 0))
471 goto out_err; 471 return ret;
472 node->staged_bindings = 472 node->staged_bindings =
473 kzalloc(sizeof(*node->staged_bindings), GFP_KERNEL); 473 kzalloc(sizeof(*node->staged_bindings), GFP_KERNEL);
474 if (node->staged_bindings == NULL) { 474 if (node->staged_bindings == NULL) {
475 DRM_ERROR("Failed to allocate context binding " 475 DRM_ERROR("Failed to allocate context binding "
476 "information.\n"); 476 "information.\n");
477 goto out_err; 477 return -ENOMEM;
478 } 478 }
479 INIT_LIST_HEAD(&node->staged_bindings->list); 479 INIT_LIST_HEAD(&node->staged_bindings->list);
480 } 480 }
@@ -482,8 +482,7 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
482 if (p_val) 482 if (p_val)
483 *p_val = node; 483 *p_val = node;
484 484
485out_err: 485 return 0;
486 return ret;
487} 486}
488 487
489 488
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index 6ccd993e26bf..6eae14d2a3f7 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -180,8 +180,9 @@ void vmw_fifo_release(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
180 180
181 mutex_lock(&dev_priv->hw_mutex); 181 mutex_lock(&dev_priv->hw_mutex);
182 182
183 vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC);
183 while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0) 184 while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0)
184 vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); 185 ;
185 186
186 dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE); 187 dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE);
187 188