Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357970
b: refs/heads/master
c: 4ccf097
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Jan 20, 2013
1 parent 9f7943a commit 6806118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: 58c0dca10614117cf4b385e3314e79e3b37fa66b
refs/heads/master: 4ccf097f1935321f03ad36218588a9e446006b6a
15 changes: 6 additions & 9 deletions trunk/drivers/gpu/drm/drm_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2580,14 +2580,9 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EINVAL;

drm_modeset_lock_all(dev);
fb = drm_framebuffer_lookup(dev, r->fb_id);
if (!fb) {
ret = -EINVAL;
goto out_err1;
}
/* fb is protect by the mode_config lock, so drop the ref immediately */
drm_framebuffer_unreference(fb);
if (!fb)
return -EINVAL;

num_clips = r->num_clips;
clips_ptr = (struct drm_clip_rect __user *)(unsigned long)r->clips_ptr;
Expand Down Expand Up @@ -2625,17 +2620,19 @@ int drm_mode_dirtyfb_ioctl(struct drm_device *dev,
}

if (fb->funcs->dirty) {
drm_modeset_lock_all(dev);
ret = fb->funcs->dirty(fb, file_priv, flags, r->color,
clips, num_clips);
drm_modeset_unlock_all(dev);
} else {
ret = -ENOSYS;
goto out_err2;
}

out_err2:
kfree(clips);
out_err1:
drm_modeset_unlock_all(dev);
drm_framebuffer_unreference(fb);

return ret;
}

Expand Down

0 comments on commit 6806118

Please sign in to comment.