]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm/i915: Replace manual barrier() with READ_ONCE() in HWS accessor
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Apr 2016 09:57:57 +0000 (10:57 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Apr 2016 11:09:59 +0000 (12:09 +0100)
commit5dd8e50c27cd9294e53fc4c4b25b86abc469a4d4
treefe72b3bbc91993e5bf14bf5e3475746b941d079d
parent0d317ce99e226a338fe0962e711795c6a8ed2cb2
drm/i915: Replace manual barrier() with READ_ONCE() in HWS accessor

When reading from the HWS page, we use barrier() to prevent the compiler
optimising away the read from the volatile (may be updated by the GPU)
memory address. This is more suited to READ_ONCE(); make it so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460195877-20520-5-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_ringbuffer.h