aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-04-15 01:10:35 -0400
committerDave Airlie <airlied@redhat.com>2016-04-21 20:33:53 -0400
commit747a598ffa7dff499ee93d414b74a08af6ec657e (patch)
treeb6606905e2e8ef261db4ef8e9ce8a26c11db2599 /drivers/gpu/drm/drm_crtc.c
parent19ab3f8bb4edbc576d4a2cc94a80d0e28296b649 (diff)
drm/mode: introduce wrapper to read framebuffer refcount.
Avoids drivers knowing where the kref is stored. [airlied: add kerneldoc] Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 4499b12b1870..158bdcaf93c4 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -612,7 +612,7 @@ void drm_framebuffer_remove(struct drm_framebuffer *fb)
612 * in-use fb with fb-id == 0. Userspace is allowed to shoot its own foot 612 * in-use fb with fb-id == 0. Userspace is allowed to shoot its own foot
613 * in this manner. 613 * in this manner.
614 */ 614 */
615 if (atomic_read(&fb->refcount.refcount) > 1) { 615 if (drm_framebuffer_read_refcount(fb) > 1) {
616 drm_modeset_lock_all(dev); 616 drm_modeset_lock_all(dev);
617 /* remove from any CRTC */ 617 /* remove from any CRTC */
618 drm_for_each_crtc(crtc, dev) { 618 drm_for_each_crtc(crtc, dev) {