[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20111228135319.7d08ed1842abe09943cd2c67@canb.auug.org.au>
Date: Wed, 28 Dec 2011 13:53:19 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Dave Airlie <airlied@...ux.ie>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Xi Wang <xi.wang@...il.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>
Subject: linux-next: manual merge of the drm tree with Linus' tree
Hi Dave,
Today's linux-next merge of the drm tree got a conflict in
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c between commit 8a78389651b3 ("vmwgfx:
fix incorrect VRAM size check in vmw_kms_fb_create()") from Linus' tree
and commit 308e5bcbdb10 ("drm: add an fb creation ioctl that takes a
pixel format v5") from the drm tree.
I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
diff --cc drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index f94b33a,c4bdef3..0000000
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@@ -1093,17 -1093,25 +1093,25 @@@ static struct drm_framebuffer *vmw_kms_
struct vmw_surface *surface = NULL;
struct vmw_dma_buffer *bo = NULL;
struct ttm_base_object *user_obj;
+ struct drm_mode_fb_cmd mode_cmd;
- u64 required_size;
int ret;
+ mode_cmd.width = mode_cmd2->width;
+ mode_cmd.height = mode_cmd2->height;
+ mode_cmd.pitch = mode_cmd2->pitches[0];
+ mode_cmd.handle = mode_cmd2->handles[0];
+ drm_fb_get_bpp_depth(mode_cmd2->pixel_format, &mode_cmd.depth,
+ &mode_cmd.bpp);
+
/**
* This code should be conditioned on Screen Objects not being used.
* If screen objects are used, we can allocate a GMR to hold the
* 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)) {
++ mode_cmd.pitch,
++ mode_cmd.height)) {
DRM_ERROR("VRAM size is too small for requested mode.\n");
return ERR_PTR(-ENOMEM);
}
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists