diff options
author | Dave Airlie <airlied@redhat.com> | 2010-10-06 05:47:56 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-06 05:47:56 +0400 |
commit | e6b46ee712b92db1cc2449cf4f65bc635366cad4 (patch) | |
tree | 522f17796797efce50841c8bd2dae6f63025a8c2 /drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | |
parent | fb7ba2114bcd8bb51640c20bc68f89164b29b9ed (diff) | |
parent | 8aea528736bf83ba0cdde67a3c0ca0250581eade (diff) | |
download | linux-e6b46ee712b92db1cc2449cf4f65bc635366cad4.tar.xz |
Merge branch 'drm-vmware-next' into drm-core-next
* drm-vmware-next:
drm/vmwgfx: Bump minor and driver date
drm/vmwgfx: Save at least one screen layout
drm/vmwgfx: Add modinfo version
drm/vmwgfx: Add a parameter to get the max fb size
drm/vmwgfx: Don't flush fb if we're in the suspended state.
drm/vmwgfx: Prune modes based on available VRAM size
drm/vmwgfx: Take the ttm lock around the dirty ioctl
drm: vmwgfx: Add a struct drm_file parameter to the dirty framebuffer callback
drm/vmwgfx: Add new-style PM hooks to improve hibernation behavior
drm/vmwgfx: Fix ACPI S3 & S4 functionality.
drm/vmwgfx: Really support other depths than 32
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_fb.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index 409e172f4abf..b27a9f2887d2 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c @@ -144,6 +144,13 @@ static int vmw_fb_check_var(struct fb_var_screeninfo *var, return -EINVAL; } + if (!vmw_kms_validate_mode_vram(vmw_priv, + info->fix.line_length, + var->yoffset + var->yres)) { + DRM_ERROR("Requested geom can not fit in framebuffer\n"); + return -EINVAL; + } + return 0; } @@ -205,6 +212,9 @@ static void vmw_fb_dirty_flush(struct vmw_fb_par *par) SVGAFifoCmdUpdate body; } *cmd; + if (vmw_priv->suspended) + return; + spin_lock_irqsave(&par->dirty.lock, flags); if (!par->dirty.active) { spin_unlock_irqrestore(&par->dirty.lock, flags); |