mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 19:05:39 +00:00
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
This commit is contained in:
commit
0977f90679
@ -450,11 +450,11 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
|
|||||||
res,
|
res,
|
||||||
id_loc - sw_context->buf_start);
|
id_loc - sw_context->buf_start);
|
||||||
if (unlikely(ret != 0))
|
if (unlikely(ret != 0))
|
||||||
goto out_err;
|
return ret;
|
||||||
|
|
||||||
ret = vmw_resource_val_add(sw_context, res, &node);
|
ret = vmw_resource_val_add(sw_context, res, &node);
|
||||||
if (unlikely(ret != 0))
|
if (unlikely(ret != 0))
|
||||||
goto out_err;
|
return ret;
|
||||||
|
|
||||||
if (res_type == vmw_res_context && dev_priv->has_mob &&
|
if (res_type == vmw_res_context && dev_priv->has_mob &&
|
||||||
node->first_usage) {
|
node->first_usage) {
|
||||||
@ -468,13 +468,13 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
|
|||||||
|
|
||||||
ret = vmw_resource_context_res_add(dev_priv, sw_context, res);
|
ret = vmw_resource_context_res_add(dev_priv, sw_context, res);
|
||||||
if (unlikely(ret != 0))
|
if (unlikely(ret != 0))
|
||||||
goto out_err;
|
return ret;
|
||||||
node->staged_bindings =
|
node->staged_bindings =
|
||||||
kzalloc(sizeof(*node->staged_bindings), GFP_KERNEL);
|
kzalloc(sizeof(*node->staged_bindings), GFP_KERNEL);
|
||||||
if (node->staged_bindings == NULL) {
|
if (node->staged_bindings == NULL) {
|
||||||
DRM_ERROR("Failed to allocate context binding "
|
DRM_ERROR("Failed to allocate context binding "
|
||||||
"information.\n");
|
"information.\n");
|
||||||
goto out_err;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
INIT_LIST_HEAD(&node->staged_bindings->list);
|
INIT_LIST_HEAD(&node->staged_bindings->list);
|
||||||
}
|
}
|
||||||
@ -482,8 +482,7 @@ static int vmw_cmd_res_reloc_add(struct vmw_private *dev_priv,
|
|||||||
if (p_val)
|
if (p_val)
|
||||||
*p_val = node;
|
*p_val = node;
|
||||||
|
|
||||||
out_err:
|
return 0;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,8 +180,9 @@ void vmw_fifo_release(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
|
|||||||
|
|
||||||
mutex_lock(&dev_priv->hw_mutex);
|
mutex_lock(&dev_priv->hw_mutex);
|
||||||
|
|
||||||
while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0)
|
|
||||||
vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC);
|
vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC);
|
||||||
|
while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0)
|
||||||
|
;
|
||||||
|
|
||||||
dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE);
|
dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user