drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 18 Apr 2024 22:37:56 +0000 (18:37 -0400)
committerJani Nikula <jani.nikula@intel.com>
Fri, 19 Apr 2024 08:27:14 +0000 (11:27 +0300)
commit7af6b116261c12b37674ac4639e23e9df9b09fb3
tree83ff0fe005a9501055638105e145d7b932e01291
parent5bc9de065b8bb9b8dd8799ecb4592d0403b54281
drm/i915: Convert intel_runtime_pm_get_noresume towards raw wakeref

In the past, the noresume function was used by the GEM code to ensure
wakelocks were held and bump its usage. This is no longer the case
and this function was totally unused until it started to be used again
by display with commit 77e619a82fc3 ("drm/i915/display: convert inner
wakeref get towards get_if_in_use")

However, on the display code, most of the callers are using the
raw wakeref, rather then the wakelock version. What caused a
major regression caught by CI.

Another option to this patch is to go with the original plan and
use the get_if_in_use variant in the display code, what is enough
to fulfil our needs. Then, an extra patch to delete the unused
_noresume variant.

v2: Keep grabbing wakelock but only assert for wakeref. (Imre)

Cc: Imre Deak <imre.deak@intel.com>
Cc: Francois Dugast <francois.dugast@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 77e619a82fc3 ("drm/i915/display: convert inner wakeref get towards get_if_in_use")
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10875
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240418223756.68427-1-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/display/intel_display_power.c
drivers/gpu/drm/i915/intel_runtime_pm.c