diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2014-08-28 11:53:23 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2014-09-01 12:31:24 +0200 |
commit | f01ea0c3d9db536c64d47922716d8b3b8f21d850 (patch) | |
tree | d0ba13f57d1323abdf11d3414e712b2ae0a4857e /drivers/gpu/drm/vmwgfx | |
parent | 9f9cb84f416f07f57d75789d77e7d47d6141f44e (diff) | |
download | blackbird-op-linux-f01ea0c3d9db536c64d47922716d8b3b8f21d850.tar.gz blackbird-op-linux-f01ea0c3d9db536c64d47922716d8b3b8f21d850.zip |
drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle
The code waiting for fifo idle was incorrect and could possibly spin
forever under certain circumstances.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reported-by: Mark Sheldon <markshel@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Reivewed-by: Mark Sheldon <markshel@vmware.com>
Cc: <stable@vger.kernel.org>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) mutex_lock(&dev_priv->hw_mutex); + vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0) - vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC); + ; dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE); |