drm/i915/gem: fix bitwise and logical AND mixup
authorjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:48:48 +0000 (02:48 +0000)
committerjsg <jsg@openbsd.org>
Fri, 11 Oct 2024 02:48:48 +0000 (02:48 +0000)
From Jani Nikula
451c87d21db61e74379b31369a7e10f41bc3bbba in linux-6.6.y/6.6.55
394b52462020b6cceff1f7f47fdebd03589574f3 in mainline linux

sys/dev/pci/drm/i915/gem/i915_gem_ttm.c

index 289e834..cbca8f5 100644 (file)
@@ -1167,7 +1167,7 @@ static vm_fault_t vm_fault_ttm(struct vm_fault *vmf)
                GEM_WARN_ON(!i915_ttm_cpu_maps_iomem(bo->resource));
        }
 
-       if (wakeref & CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND)
+       if (wakeref && CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND != 0)
                intel_wakeref_auto(&to_i915(obj->base.dev)->runtime_pm.userfault_wakeref,
                                   msecs_to_jiffies_timeout(CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND));