]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb967840efc8e2097e9cb6625b41695c7f5d736d4
tree055d4a9d2a2c0e15f8d44f7e4499458c616f6ded
parent885a9cae9f7b0041f2c63d96a3cf6af0d40c8833
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