]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/i915/psr: Use DC_OFF wake reference to block DC6 on vblank enable
authorJouni Högander <jouni.hogander@intel.com>
Wed, 20 May 2026 10:49:44 +0000 (13:49 +0300)
committerTvrtko Ursulin <tursulin@ursulin.net>
Tue, 26 May 2026 08:31:48 +0000 (09:31 +0100)
commit3549a9649dc7c5fc586ab12f675279283cdcb2a7
tree75473851f9a7c9ec9b0c1a0b40d24a8fe780b36a
parent8bb9093df555f9e89fdbe1405118b11384c03e04
drm/i915/psr: Use DC_OFF wake reference to block DC6 on vblank enable

We are observing following warnings:

*ERROR* power well DC_off state mismatch (refcount 0/enabled 1)

gen9_dc_off_power_well_enabled is considering target state DC_STATE_DISABLE
as DC_OFF power well being enabled. Fix this by using wakeref for the
purpose.

To achieve this we need to modify notification code as well. Currently it
is possible that PSR gets notified vblank enable/disable twice on same
status. This is currently not a problem as it is just triggering call to
intel_display_power_set_target_dc_state with same target state as a
parameter. When using wakeref this becomes a problem due to reference
counting. Fix this storing vbank status on last notification and use that
to ensure there are no more than one notification with same vblank status.

v2: ensure there is no subsequent notifications with same status

Fixes: aa451abcffb5 ("drm/i915/display: Prevent DC6 while vblank is enabled for Panel Replay")
Cc: <stable@vger.kernel.org> # v6.13+
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Link: https://patch.msgid.link/20260520104944.239797-2-jouni.hogander@intel.com
(cherry picked from commit 35485ac56d878192a3829a58cb26503125ec7104)
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
drivers/gpu/drm/i915/display/intel_display_core.h
drivers/gpu/drm/i915/display/intel_display_irq.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_psr.c