summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2025-06-17 20:07:55 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2025-06-23 17:50:07 +0300
commit761748679e80cc429f035bcb64662becf0ecf4f6 (patch)
tree9563308b018b53197a48f47f5d55ecf7add4fc84
parentc541ad77a394e186a34e6af5e1b6057827c42659 (diff)
drm/i915/dmc: Reload pipe DMC state on TGL when enabling pipe A
On TGL/derivatives the entire pipe DMC state (program + MMIO) is lost when PG1 is disabled, and the main DMC does not restore any of it. Reload the state when enabling a pipe. The other option would be to not load the pipe DMC at all since it's only needed for "fast LACE" (which we don't use) on these platforms. But let's keep it around just in case we ever decide that "fast LACE" is something we want. Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250617170759.19552-6-ville.syrjala@linux.intel.com
-rw-r--r--drivers/gpu/drm/i915/display/intel_dmc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
index d933f82ffbee..4cbc19e97db7 100644
--- a/drivers/gpu/drm/i915/display/intel_dmc.c
+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
@@ -600,6 +600,12 @@ static void dmc_load_program(struct intel_display *display,
}
}
+static bool need_pipedmc_load_program(struct intel_display *display)
+{
+ /* On TGL/derivatives pipe DMC state is lost when PG1 is disabled */
+ return DISPLAY_VER(display) == 12;
+}
+
void intel_dmc_enable_pipe(struct intel_display *display, enum pipe pipe)
{
enum intel_dmc_id dmc_id = PIPE_TO_DMC_ID(pipe);
@@ -607,6 +613,9 @@ void intel_dmc_enable_pipe(struct intel_display *display, enum pipe pipe)
if (!is_valid_dmc_id(dmc_id) || !has_dmc_id_fw(display, dmc_id))
return;
+ if (need_pipedmc_load_program(display))
+ dmc_load_program(display, dmc_id);
+
if (DISPLAY_VER(display) >= 20) {
intel_de_write(display, PIPEDMC_INTERRUPT(pipe), pipedmc_interrupt_mask(display));
intel_de_write(display, PIPEDMC_INTERRUPT_MASK(pipe), ~pipedmc_interrupt_mask(display));