Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 253187
b: refs/heads/master
c: 498c555
h: refs/heads/master
i:
  253185: eae22b6
  253183: b8f89bf
v: v3
  • Loading branch information
Dave Airlie committed Jun 2, 2011
1 parent b2005d9 commit b6637b5
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 2f2f96d1ea72e6602ae440ac2867a6004edb37a1
refs/heads/master: 498c555f56a02ec1059bc150cde84411ba0ac010
13 changes: 8 additions & 5 deletions trunk/drivers/gpu/drm/radeon/radeon_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ static void radeon_unpin_work_func(struct work_struct *__work)
radeon_bo_unreserve(work->old_rbo);
} else
DRM_ERROR("failed to reserve buffer after flip\n");

drm_gem_object_unreference_unlocked(&work->old_rbo->gem_base);
kfree(work);
}

Expand Down Expand Up @@ -371,19 +373,18 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc,
new_radeon_fb = to_radeon_framebuffer(fb);
/* schedule unpin of the old buffer */
obj = old_radeon_fb->obj;
/* take a reference to the old object */
drm_gem_object_reference(obj);
rbo = gem_to_radeon_bo(obj);
work->old_rbo = rbo;
INIT_WORK(&work->work, radeon_unpin_work_func);

/* We borrow the event spin lock for protecting unpin_work */
spin_lock_irqsave(&dev->event_lock, flags);
if (radeon_crtc->unpin_work) {
spin_unlock_irqrestore(&dev->event_lock, flags);
kfree(work);
radeon_fence_unref(&fence);

DRM_DEBUG_DRIVER("flip queue: crtc already busy\n");
return -EBUSY;
r = -EBUSY;
goto unlock_free;
}
radeon_crtc->unpin_work = work;
radeon_crtc->deferred_flip_completion = 0;
Expand Down Expand Up @@ -497,6 +498,8 @@ static int radeon_crtc_page_flip(struct drm_crtc *crtc,
pflip_cleanup:
spin_lock_irqsave(&dev->event_lock, flags);
radeon_crtc->unpin_work = NULL;
unlock_free:
drm_gem_object_unreference_unlocked(old_radeon_fb->obj);
spin_unlock_irqrestore(&dev->event_lock, flags);
radeon_fence_unref(&fence);
kfree(work);
Expand Down

0 comments on commit b6637b5

Please sign in to comment.