]> git.baikalelectronics.ru Git - kernel.git/commit
drm: refcounting for sprite framebuffers
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 10 Dec 2012 23:59:24 +0000 (00:59 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 20 Jan 2013 21:17:08 +0000 (22:17 +0100)
commite6eed4c2f753166b658f0318ee85b4fe377f1de8
treeee9fd562cb9f11e944b2146e59b0f3561492400b
parent5547623050e8c219a2b6b9c94adfd632041102e4
drm: refcounting for sprite framebuffers

Now plane->fb holds a reference onto it's framebuffer. Nothing too
fancy going on here:
- Extract __drm_framebuffer_unreference to be called when we know
  we're not dropping the last reference, e.g. useful in the fb cleanup
  code.
- Reduce the locked sections in the set_plane ioctl to only protect
  plane->fb/plane->crtc and the driver callback (i.e. hw state).
  Everything either doesn't disappear (crtc, plane) or is refcounted
  (fb), and all the data we check is invariant over the respective
  object's lifetimes.

Reviewed-by: Rob Clark <rob@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc.c