diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2010-01-30 04:38:08 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-02-01 02:29:59 +0100 |
commit | 5ffdb658f605cbc420944e7c7eeec9fbb8a73772 (patch) | |
tree | 9f091b311f1c434f506d4c34ce373346a77d895b /drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |
parent | drm/vmwgfx: Request SVGA version 2 and bail if not found (diff) | |
download | linux-5ffdb658f605cbc420944e7c7eeec9fbb8a73772.tar.xz linux-5ffdb658f605cbc420944e7c7eeec9fbb8a73772.zip |
drm/vmwgfx: Don't send bad flags to the host
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_kms.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 686692de209a..eeba6d1d06e4 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c @@ -707,6 +707,9 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev, if (ret) goto try_dmabuf; + if (!surface->scanout) + goto err_not_scanout; + ret = vmw_kms_new_framebuffer_surface(dev_priv, surface, &vfb, mode_cmd->width, mode_cmd->height); @@ -740,6 +743,13 @@ try_dmabuf: } return &vfb->base; + +err_not_scanout: + DRM_ERROR("surface not marked as scanout\n"); + /* vmw_user_surface_lookup takes one ref */ + vmw_surface_unreference(&surface); + + return NULL; } static int vmw_kms_fb_changed(struct drm_device *dev) |