diff options
author | Dave Airlie <airlied@redhat.com> | 2016-04-15 15:10:35 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-04-22 10:33:53 +1000 |
commit | 747a598ffa7dff499ee93d414b74a08af6ec657e (patch) | |
tree | b6606905e2e8ef261db4ef8e9ce8a26c11db2599 /drivers/gpu/drm/drm_crtc.c | |
parent | 19ab3f8bb4edbc576d4a2cc94a80d0e28296b649 (diff) | |
download | blackbird-op-linux-747a598ffa7dff499ee93d414b74a08af6ec657e.tar.gz blackbird-op-linux-747a598ffa7dff499ee93d414b74a08af6ec657e.zip |
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.c | 2 |
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) * in-use fb with fb-id == 0. Userspace is allowed to shoot its own foot * in this manner. */ - if (atomic_read(&fb->refcount.refcount) > 1) { + if (drm_framebuffer_read_refcount(fb) > 1) { drm_modeset_lock_all(dev); /* remove from any CRTC */ drm_for_each_crtc(crtc, dev) { |