Skip to content

Commit e7d2e56

Browse files
thomashvmwgregkh
authored andcommitted
drm/vmwgfx: Fix a potential infinite spin waiting for fifo idle
commit f01ea0c upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 51d72e1 commit e7d2e56

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,9 @@ void vmw_fifo_release(struct vmw_private *dev_priv, struct vmw_fifo_state *fifo)
180180

181181
mutex_lock(&dev_priv->hw_mutex);
182182

183+
vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC);
183184
while (vmw_read(dev_priv, SVGA_REG_BUSY) != 0)
184-
vmw_write(dev_priv, SVGA_REG_SYNC, SVGA_SYNC_GENERIC);
185+
;
185186

186187
dev_priv->last_read_seqno = ioread32(fifo_mem + SVGA_FIFO_FENCE);
187188

0 commit comments

Comments
 (0)