diff options
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 6b0078ffa763..c50724bd30f6 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
@@ -1688,15 +1688,19 @@ int vmw_du_page_flip(struct drm_crtc *crtc, | |||
1688 | struct vmw_private *dev_priv = vmw_priv(crtc->dev); | 1688 | struct vmw_private *dev_priv = vmw_priv(crtc->dev); |
1689 | struct drm_framebuffer *old_fb = crtc->fb; | 1689 | struct drm_framebuffer *old_fb = crtc->fb; |
1690 | struct vmw_framebuffer *vfb = vmw_framebuffer_to_vfb(fb); | 1690 | struct vmw_framebuffer *vfb = vmw_framebuffer_to_vfb(fb); |
1691 | struct drm_file *file_priv = event->base.file_priv; | 1691 | struct drm_file *file_priv ; |
1692 | struct vmw_fence_obj *fence = NULL; | 1692 | struct vmw_fence_obj *fence = NULL; |
1693 | struct drm_clip_rect clips; | 1693 | struct drm_clip_rect clips; |
1694 | int ret; | 1694 | int ret; |
1695 | 1695 | ||
1696 | if (event == NULL) | ||
1697 | return -EINVAL; | ||
1698 | |||
1696 | /* require ScreenObject support for page flipping */ | 1699 | /* require ScreenObject support for page flipping */ |
1697 | if (!dev_priv->sou_priv) | 1700 | if (!dev_priv->sou_priv) |
1698 | return -ENOSYS; | 1701 | return -ENOSYS; |
1699 | 1702 | ||
1703 | file_priv = event->base.file_priv; | ||
1700 | if (!vmw_kms_screen_object_flippable(dev_priv, crtc)) | 1704 | if (!vmw_kms_screen_object_flippable(dev_priv, crtc)) |
1701 | return -EINVAL; | 1705 | return -EINVAL; |
1702 | 1706 | ||