]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/gt: Use the BIT when checking the flags, not the index
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 15 Jan 2020 12:25:09 +0000 (12:25 +0000)
committerJani Nikula <jani.nikula@intel.com>
Mon, 10 Feb 2020 12:45:43 +0000 (14:45 +0200)
In converting over to using set_bit()/test_bit(), when manually
inspecting the rq->fence.flags, we need to use BIT().

Fixes: 51aa0406a02e ("drm/i915: Merge i915_request.flags with i915_request.fence.flags")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200115122509.2673075-1-chris@chris-wilson.co.uk
(cherry picked from commit 72ff2b8d5f2dcb09bfa37b902c23311eec426496)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/gt/intel_lrc.c

index 0cf0f6fae675ab1975639a0774417a393dc9313b..5d8c1ebe07313e73ad2916cf486fc19f4b5f7671 100644 (file)
@@ -1535,7 +1535,8 @@ static bool can_merge_rq(const struct i915_request *prev,
                return true;
 
        if (unlikely((prev->fence.flags ^ next->fence.flags) &
-                    (I915_FENCE_FLAG_NOPREEMPT | I915_FENCE_FLAG_SENTINEL)))
+                    (BIT(I915_FENCE_FLAG_NOPREEMPT) |
+                     BIT(I915_FENCE_FLAG_SENTINEL))))
                return false;
 
        if (!can_merge_ctx(prev->context, next->context))