]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Check for error before calling cmpxchg()
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Dec 2019 16:04:26 +0000 (16:04 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Dec 2019 19:09:33 +0000 (19:09 +0000)
commitc8fcfe2069235257985c22ded24d7946889c305e
treec6c1963adcf71fe70a916320ddc2b4391cc62be9
parent5e0d5b8c0d3c4eda1df626d8beeb7a1b544fc6d3
drm/i915: Check for error before calling cmpxchg()

Only do the locked compare of the existing fence->error if we actually
need to set an error. As we tend to call i915_sw_fence_set_error_once()
unconditionally, it saves on typing to put the common has-error check
into the inline.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191206160428.1503343-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_sw_fence.h