Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277010
b: refs/heads/master
c: 8a78389
h: refs/heads/master
v: v3
  • Loading branch information
Xi Wang authored and Dave Airlie committed Dec 22, 2011
1 parent c9524af commit 0d6b1af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77e00f2ea94abee1ad13bdfde19cf7aa25992b0e
refs/heads/master: 8a78389651b3e411ec5a7df61404734f52d6f4eb
6 changes: 3 additions & 3 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,6 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
struct vmw_surface *surface = NULL;
struct vmw_dma_buffer *bo = NULL;
struct ttm_base_object *user_obj;
u64 required_size;
int ret;

/**
Expand All @@ -1102,8 +1101,9 @@ static struct drm_framebuffer *vmw_kms_fb_create(struct drm_device *dev,
* requested framebuffer.
*/

required_size = mode_cmd->pitch * mode_cmd->height;
if (unlikely(required_size > (u64) dev_priv->vram_size)) {
if (!vmw_kms_validate_mode_vram(dev_priv,
mode_cmd->pitch,
mode_cmd->height)) {
DRM_ERROR("VRAM size is too small for requested mode.\n");
return ERR_PTR(-ENOMEM);
}
Expand Down

0 comments on commit 0d6b1af

Please sign in to comment.