]> rtime.felk.cvut.cz Git - linux-imx.git/commit
drm: check that ->set_config properly updates the fb
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 14 Jun 2013 22:13:15 +0000 (00:13 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 25 Jun 2013 03:04:10 +0000 (13:04 +1000)
commitcc85e1217f598f342b69dc44710d7a7355513a1b
treeaede100e927e8f7f82695a9bc7321828b06c01b1
parent372835a8527f85b3eff20a18c2c339e827dfd4e4
drm: check that ->set_config properly updates the fb

Historically drm lacked fb refcounting, so the updating of crtc->fb
was done by the lower levels at a point convenient to get their own
refcounting (e.g. refcounts for the underlying gem bo, pinning
refcounts) right. With the introduction of refcounted fbs the drm core
handled the fb refcounts, but still relied on drivers to update the
crtc->fb pointer (this approach required the least invasive changes in
drivers).

Enforce this contract with a WARN_ON.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/drm_crtc.c