From: Chris Wilson Date: Wed, 22 Jun 2016 07:46:12 +0000 (+0100) Subject: drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference X-Git-Tag: v4.8-rc1~62^2~34^2~1 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=fa7d81bb3c269;hp=366e292df678caed1fb3644989e6b5ae2333808c;p=cascardo%2Flinux.git drm/fb-helper: Reduce READ_ONCE(master) to lockless_dereference We are only documenting that the read is outside of the lock, and do not require strict ordering on the operation. In this case the more relaxed lockless_dereference() will suffice. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Julia Lawall Cc: Chris Wilson Cc: Emil Velikov Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1466581572-16608-1-git-send-email-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 0a06f9120b5a..ce54e985d91b 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -464,7 +464,7 @@ static bool drm_fb_helper_is_bound(struct drm_fb_helper *fb_helper) /* Sometimes user space wants everything disabled, so don't steal the * display if there's a master. */ - if (READ_ONCE(dev->master)) + if (lockless_dereference(dev->master)) return false; drm_for_each_crtc(crtc, dev) {