diff options
author | Jani Nikula <[email protected]> | 2024-09-18 20:35:43 +0300 |
---|---|---|
committer | Joonas Lahtinen <[email protected]> | 2024-10-01 10:28:29 +0300 |
commit | 394b52462020b6cceff1f7f47fdebd03589574f3 (patch) | |
tree | eee6be4a5f54aed23a381c35bba7ba86f0f489cd /rust/helpers/task.c | |
parent | 9852d85ec9d492ebef56dc5f229416c925758edc (diff) |
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: ad74457a6b5a ("drm/i915/dgfx: Release mmap on rpm suspend")
Cc: Matthew Auld <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Anshuman Gupta <[email protected]>
Cc: Andi Shyti <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: [email protected] # v6.1+
Reviewed-by: Matthew Auld <[email protected]>
Reviewed-by: Andi Shyti <[email protected]> # v1
Link: https://patchwork.freedesktop.org/patch/msgid/643cc0a4d12f47fd8403d42581e83b1e9c4543c7.1726680898.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <[email protected]>
(cherry picked from commit 4c1bfe259ed1d2ade826f95d437e1c41b274df04)
Signed-off-by: Joonas Lahtinen <[email protected]>
Diffstat (limited to 'rust/helpers/task.c')
0 files changed, 0 insertions, 0 deletions