drm: refcounting for crtc framebuffers
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 11 Dec 2012 00:07:12 +0000 (01:07 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 20 Jan 2013 21:17:09 +0000 (22:17 +0100)
commitb0d1232589df5575c5971224ac4cb30e7e525884
tree21336a0066a019ad4f5bff093a8f824c50540d83
parent6c2a75325c800de286166c693e0cd33c3a1c5ec8
drm: refcounting for crtc framebuffers

With the prep patch to encapsulate ->set_crtc calls, this is now
rather easy. Hooray for inconsistent semantics between ->set_crtc and
->page_flip, where the driver callback is supposed to update the fb
pointer, and ->update_plane, where the drm core does the same.

Also, since the drm core functions check crtc->fb before calling into
driver callbacks, we can't really reduce the critical sections
protected by the mode_config locks.

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