drm/mode: reduce scope of fb_lock in framebuffer init
authorDave Airlie <airlied@redhat.com>
Fri, 15 Apr 2016 05:10:38 +0000 (15:10 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 22 Apr 2016 00:38:24 +0000 (10:38 +1000)
commit9cd47424fb410e478e5a97e83ac10263c13ed65c
tree055d4a9d2a2c0e15f8d44f7e4499458c616f6ded
parentcee26ac47dc2c2846ecd0fc80cf857942c1fcd77
drm/mode: reduce scope of fb_lock in framebuffer init

We don't need to hold the fb lock around the initialisation,
only around the list manipulaton.

So do the lock hold only around the register for now.

From Daniel:
Previously fb refcounting, and especially the weak reference
(kref_get_unless_zero) used in fb lookups have been protected by fb_lock.
But with the refactoring to share refcounting in the drm_mode_object base
class that switched to being protected by idr_mutex, which means fb_lock
critical sections can be reduced.

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