linux/drivers/gpu/drm/i915/gem
Jani Nikula 394b524620 drm/i915/gem: fix bitwise and logical AND mixup
CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND is an int, defaulting to 250. When
the wakeref is non-zero, it's either -1 or a dynamically allocated
pointer, depending on CONFIG_DRM_I915_DEBUG_RUNTIME_PM. It's likely that
the code works by coincidence with the bitwise AND, but with
CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y, there's the off chance that the
condition evaluates to false, and intel_wakeref_auto() doesn't get
called. Switch to the intended logical AND.

v2: Use != to avoid clang -Wconstant-logical-operand (Nathan)

Fixes: ad74457a6b ("drm/i915/dgfx: Release mmap on rpm suspend")
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: stable@vger.kernel.org # v6.1+
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> # v1
Link: https://patchwork.freedesktop.org/patch/msgid/643cc0a4d12f47fd8403d42581e83b1e9c4543c7.1726680898.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 4c1bfe259e)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2024-10-01 10:28:29 +03:00
..
selftests
i915_gem_busy.c
i915_gem_clflush.c
i915_gem_clflush.h
i915_gem_context.c
i915_gem_context.h
i915_gem_context_types.h
i915_gem_create.c
i915_gem_create.h
i915_gem_dmabuf.c
i915_gem_dmabuf.h
i915_gem_domain.c
i915_gem_domain.h
i915_gem_execbuffer.c
i915_gem_internal.c
i915_gem_internal.h
i915_gem_ioctls.h
i915_gem_lmem.c
i915_gem_lmem.h
i915_gem_mman.c
i915_gem_mman.h
i915_gem_object.c
i915_gem_object.h
i915_gem_object_frontbuffer.h
i915_gem_object_types.h
i915_gem_pages.c
i915_gem_phys.c
i915_gem_pm.c
i915_gem_pm.h
i915_gem_region.c
i915_gem_region.h
i915_gem_shmem.c
i915_gem_shrinker.c
i915_gem_shrinker.h
i915_gem_stolen.c
i915_gem_stolen.h
i915_gem_throttle.c
i915_gem_tiling.c
i915_gem_tiling.h
i915_gem_ttm.c drm/i915/gem: fix bitwise and logical AND mixup 2024-10-01 10:28:29 +03:00
i915_gem_ttm.h
i915_gem_ttm_move.c
i915_gem_ttm_move.h
i915_gem_ttm_pm.c
i915_gem_ttm_pm.h
i915_gem_userptr.c
i915_gem_wait.c
i915_gemfs.c
i915_gemfs.h