Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179842
b: refs/heads/master
c: 50ec3b7
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Hellstrom authored and Dave Airlie committed Jan 14, 2010
1 parent 5aa05c7 commit 2ee2421
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 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: df1c93bae2b671e2aa50899a120af20afdbd504b
refs/heads/master: 50ec3b7c35fda131e92abc6f9d93a230b7e009eb
39 changes: 21 additions & 18 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,27 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
if (unlikely(ret != 0))
goto out_err1;


if (srf->flags & (1 << 9) &&
srf->num_sizes == 1 &&
srf->sizes[0].width == 64 &&
srf->sizes[0].height == 64 &&
srf->format == SVGA3D_A8R8G8B8) {

srf->snooper.image = kmalloc(64 * 64 * 4, GFP_KERNEL);
/* clear the image */
if (srf->snooper.image) {
memset(srf->snooper.image, 0x00, 64 * 64 * 4);
} else {
DRM_ERROR("Failed to allocate cursor_image\n");
ret = -ENOMEM;
goto out_err1;
}
} else {
srf->snooper.image = NULL;
}
srf->snooper.crtc = NULL;

user_srf->base.shareable = false;
user_srf->base.tfile = NULL;

Expand All @@ -622,24 +643,6 @@ int vmw_surface_define_ioctl(struct drm_device *dev, void *data,
return ret;
}

if (srf->flags & (1 << 9) &&
srf->num_sizes == 1 &&
srf->sizes[0].width == 64 &&
srf->sizes[0].height == 64 &&
srf->format == SVGA3D_A8R8G8B8) {

srf->snooper.image = kmalloc(64 * 64 * 4, GFP_KERNEL);
/* clear the image */
if (srf->snooper.image)
memset(srf->snooper.image, 0x00, 64 * 64 * 4);
else
DRM_ERROR("Failed to allocate cursor_image\n");

} else {
srf->snooper.image = NULL;
}
srf->snooper.crtc = NULL;

rep->sid = user_srf->base.hash.key;
if (rep->sid == SVGA3D_INVALID_ID)
DRM_ERROR("Created bad Surface ID.\n");
Expand Down

0 comments on commit 2ee2421

Please sign in to comment.