Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269783
b: refs/heads/master
c: 64fc994
h: refs/heads/master
i:
  269781: c1b7ec0
  269779: b2bee0c
  269775: 3f52518
v: v3
  • Loading branch information
Jakob Bornecrantz authored and Dave Airlie committed Oct 23, 2011
1 parent c0d36f1 commit 773c405
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 19703058cd2eacd83ed5948fdbbc5e29d94b60b5
refs/heads/master: 64fc99447f5dc6dcb03b4cb4395431f957951e61
10 changes: 9 additions & 1 deletion trunk/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ static int do_dmabuf_define_gmrfb(struct drm_file *file_priv,
struct vmw_private *dev_priv,
struct vmw_framebuffer *framebuffer)
{
int depth = framebuffer->base.depth;
size_t fifo_size;
int ret;

Expand All @@ -687,6 +688,13 @@ static int do_dmabuf_define_gmrfb(struct drm_file *file_priv,
SVGAFifoCmdDefineGMRFB body;
} *cmd;

/* Emulate RGBA support, contrary to svga_reg.h this is not
* supported by hosts. This is only a problem if we are reading
* this value later and expecting what we uploaded back.
*/
if (depth == 32)
depth = 24;

fifo_size = sizeof(*cmd);
cmd = kmalloc(fifo_size, GFP_KERNEL);
if (unlikely(cmd == NULL)) {
Expand All @@ -697,7 +705,7 @@ static int do_dmabuf_define_gmrfb(struct drm_file *file_priv,
memset(cmd, 0, fifo_size);
cmd->header = SVGA_CMD_DEFINE_GMRFB;
cmd->body.format.bitsPerPixel = framebuffer->base.bits_per_pixel;
cmd->body.format.colorDepth = framebuffer->base.depth;
cmd->body.format.colorDepth = depth;
cmd->body.format.reserved = 0;
cmd->body.bytesPerLine = framebuffer->base.pitch;
cmd->body.ptr.gmrId = framebuffer->user_handle;
Expand Down

0 comments on commit 773c405

Please sign in to comment.