drm/i915/display: add support for DMC wakelocks
authorLuca Coelho <luciano.coelho@intel.com>
Fri, 12 Apr 2024 09:41:45 +0000 (12:41 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 17 Apr 2024 08:41:08 +0000 (11:41 +0300)
commit765425f598c20841c0d46a36099e2763d2bf3f03
tree94a7e9cc89a6bf732fc25e5352ebcd47069bb727
parent578ff98403cef6284430934616bc4debf3017d0f
drm/i915/display: add support for DMC wakelocks

In order to reduce the DC5->DC2 restore time, wakelocks have been
introduced in DMC so the driver can tell it when registers and other
memory areas are going to be accessed and keep their respective blocks
awake.

Implement this in the driver by adding the concept of DMC wakelocks.
When the driver needs to access memory which lies inside pre-defined
ranges, it will tell DMC to set the wakelock, access the memory, then
wait for a while and clear the wakelock.

The wakelock state is protected in the driver with spinlocks to
prevent concurrency issues.

BSpec: 71583
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240412094148.808179-2-luciano.coelho@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Documentation/gpu/i915.rst
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_de.h
drivers/gpu/drm/i915/display/intel_display_core.h
drivers/gpu/drm/i915/display/intel_dmc_regs.h
drivers/gpu/drm/i915/display/intel_dmc_wl.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_dmc_wl.h [new file with mode: 0644]
drivers/gpu/drm/xe/Makefile