From: jsg Date: Fri, 11 Oct 2024 02:48:48 +0000 (+0000) Subject: drm/i915/gem: fix bitwise and logical AND mixup X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5557072731bc4017ba340b15e1f2ab484a9449d8;p=openbsd drm/i915/gem: fix bitwise and logical AND mixup From Jani Nikula 451c87d21db61e74379b31369a7e10f41bc3bbba in linux-6.6.y/6.6.55 394b52462020b6cceff1f7f47fdebd03589574f3 in mainline linux --- diff --git a/sys/dev/pci/drm/i915/gem/i915_gem_ttm.c b/sys/dev/pci/drm/i915/gem/i915_gem_ttm.c index 289e834e6cf..cbca8f52353 100644 --- a/sys/dev/pci/drm/i915/gem/i915_gem_ttm.c +++ b/sys/dev/pci/drm/i915/gem/i915_gem_ttm.c @@ -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));