drm/vmwgfx: Properly flush cursor updates and page-flips
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 5 Nov 2015 10:18:55 +0000 (02:18 -0800)
committerThomas Hellstrom <thellstrom@vmware.com>
Fri, 6 Nov 2015 15:12:41 +0000 (16:12 +0100)
With the introduction of the new command buffer mechanism,
proper care wasn't taken to flush cursor image updates and
event-less screen-target page-flips.

Fix this by introducing explicit flush points.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c

index a94b24d041f16e7fdcfcc01945b5285f9396345c..9fcd7f82995c3e1a517930cb8a89a23351c55c15 100644 (file)
@@ -78,7 +78,7 @@ int vmw_cursor_update_image(struct vmw_private *dev_priv,
        cmd->cursor.hotspotX = hotspotX;
        cmd->cursor.hotspotY = hotspotY;
 
-       vmw_fifo_commit(dev_priv, cmd_size);
+       vmw_fifo_commit_flush(dev_priv, cmd_size);
 
        return 0;
 }
index c22e2df1b336b16c0c1a664f95f338d355abf8f2..b1fc1c02792d4c3f89cb76a0dfb0f16f3dce2c47 100644 (file)
@@ -717,6 +717,8 @@ static int vmw_stdu_crtc_page_flip(struct drm_crtc *crtc,
                                                   &event->event.tv_usec,
                                                   true);
                vmw_fence_obj_unreference(&fence);
+       } else {
+               vmw_fifo_flush(dev_priv, false);
        }
 
        return ret;