linux-next: manual merge of the drm tree with Linus' tree

Stephen Rothwell
2011-12-28T02:53:32Z

[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]

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@canb.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);
}

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]