mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
drm/vmwgfx: Cleanup fifo mmio handling
Going forward the svga device might reuse mmio for general register accesses, in order to prepare for that we need to cleanup our naming and handling of fifo specific mmio reads and writes. As part of this work lets switch to managed mapping of the fifo mmio to make the error handling cleaner. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: Martin Krastev <krastevm@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Link: https://patchwork.freedesktop.org/patch/414045/?series=85516&rev=2
This commit is contained in:
@@ -117,8 +117,7 @@ static bool vmw_fifo_idle(struct vmw_private *dev_priv, uint32_t seqno)
|
||||
void vmw_update_seqno(struct vmw_private *dev_priv,
|
||||
struct vmw_fifo_state *fifo_state)
|
||||
{
|
||||
u32 *fifo_mem = dev_priv->mmio_virt;
|
||||
uint32_t seqno = vmw_mmio_read(fifo_mem + SVGA_FIFO_FENCE);
|
||||
uint32_t seqno = vmw_fifo_mem_read(dev_priv, SVGA_FIFO_FENCE);
|
||||
|
||||
if (dev_priv->last_read_seqno != seqno) {
|
||||
dev_priv->last_read_seqno = seqno;
|
||||
@@ -222,11 +221,9 @@ int vmw_fallback_wait(struct vmw_private *dev_priv,
|
||||
}
|
||||
}
|
||||
finish_wait(&dev_priv->fence_queue, &__wait);
|
||||
if (ret == 0 && fifo_idle) {
|
||||
u32 *fifo_mem = dev_priv->mmio_virt;
|
||||
if (ret == 0 && fifo_idle)
|
||||
vmw_fifo_mem_write(dev_priv, SVGA_FIFO_FENCE, signal_seq);
|
||||
|
||||
vmw_mmio_write(signal_seq, fifo_mem + SVGA_FIFO_FENCE);
|
||||
}
|
||||
wake_up_all(&dev_priv->fence_queue);
|
||||
out_err:
|
||||
if (fifo_idle)
|
||||
|
||||
Reference in New Issue
Block a user