drm/i915: don't mix bitwise and logical operations for has_snoop
authorJani Nikula <jani.nikula@intel.com>
Fri, 13 May 2016 14:04:38 +0000 (17:04 +0300)
committerJani Nikula <jani.nikula@intel.com>
Mon, 16 May 2016 07:44:22 +0000 (10:44 +0300)
Also make the code more readable.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463148278-23193-2-git-send-email-jani.nikula@intel.com
drivers/gpu/drm/i915/i915_dma.c

index 547100fa31222f1aecabce67aa0df80235f76984..a8c79f6512a4fc24a16727116ff9babece922787 100644 (file)
@@ -954,9 +954,11 @@ static void intel_device_info_runtime_init(struct drm_device *dev)
        else if (INTEL_INFO(dev)->gen >= 9)
                gen9_sseu_info_init(dev);
 
-       /* Snooping is broken on BXT A stepping. */
        info->has_snoop = !info->has_llc;
-       info->has_snoop &= !IS_BXT_REVID(dev, 0, BXT_REVID_A1);
+
+       /* Snooping is broken on BXT A stepping. */
+       if (IS_BXT_REVID(dev, 0, BXT_REVID_A1))
+               info->has_snoop = false;
 
        DRM_DEBUG_DRIVER("slice total: %u\n", info->slice_total);
        DRM_DEBUG_DRIVER("subslice total: %u\n", info->subslice_total);