Commit e7d2e562 authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Greg Kroah-Hartman

drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle

commit f01ea0c3 upstream.

The code waiting for fifo idle was incorrect and could possibly spin
forever under certain circumstances.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reported-by: default avatarMark Sheldon <markshel@vmware.com>
Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Reivewed-by: default avatarMark Sheldon <markshel@vmware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 51d72e14
...@@ -180,8 +180,9 @@ void vmw_fifo_release(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo) ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment