Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357974
b: refs/heads/master
c: 2fd5eab
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Jan 20, 2013
1 parent 1a293e4 commit fc941ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: 623f9783027ef0a948205f17792c9e1fcedb61c6
refs/heads/master: 2fd5eabab02d9cdade04397eae0bfd49f452cdba
8 changes: 3 additions & 5 deletions trunk/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
ret = -EINVAL;
goto out_no_fb;
}
/* fb is protect by the mode_config lock, so drop the ref immediately */
drm_framebuffer_unreference(fb);
vfb = vmw_framebuffer_to_vfb(fb);

ret = ttm_read_lock(&vmaster->lock, true);
Expand All @@ -197,6 +195,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data,
out_no_surface:
ttm_read_unlock(&vmaster->lock);
out_no_ttm_lock:
drm_framebuffer_unreference(fb);
out_no_fb:
drm_modeset_unlock_all(dev);
out_no_copy:
Expand Down Expand Up @@ -256,14 +255,12 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,
ret = -EINVAL;
goto out_no_fb;
}
/* fb is protect by the mode_config lock, so drop the ref immediately */
drm_framebuffer_unreference(fb);

vfb = vmw_framebuffer_to_vfb(fb);
if (!vfb->dmabuf) {
DRM_ERROR("Framebuffer not dmabuf backed.\n");
ret = -EINVAL;
goto out_no_fb;
goto out_no_ttm_lock;
}

ret = ttm_read_lock(&vmaster->lock, true);
Expand All @@ -276,6 +273,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data,

ttm_read_unlock(&vmaster->lock);
out_no_ttm_lock:
drm_framebuffer_unreference(fb);
out_no_fb:
drm_modeset_unlock_all(dev);
out_no_copy:
Expand Down

0 comments on commit fc941ab

Please sign in to comment.