[PATCH 6/6] drm/i915/display: call DMC wakelock enable when DMC is loaded

Gustavo Sousa gustavo.sousa at intel.com
Tue Feb 20 16:47:14 UTC 2024


Quoting Luca Coelho (2024-02-07 07:30:07-03:00)
>Although the documentation says that this should be done in the first
>modeset, it makes more sense to enable and disable it when DMC is
>enabled and disabled, including during suspend and resume operations.

I remember suggesting the pairing wakelock enable/disable with DMC
enable/disable in the RFC. However, after some thought and re-reading
the spec, I actually believe that this should actually be part of the
transition to and out of DC-off power state. Thoughts?

--
Gustavo Sousa

>
>Add the calls to enable and disable DMC wakelock accordingly.
>
>Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
>---
> drivers/gpu/drm/i915/display/intel_dmc.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_dmc.c b/drivers/gpu/drm/i915/display/intel_dmc.c
>index 85009c5ba488..d5d275849f4d 100644
>--- a/drivers/gpu/drm/i915/display/intel_dmc.c
>+++ b/drivers/gpu/drm/i915/display/intel_dmc.c
>@@ -536,6 +536,8 @@ void intel_dmc_load_program(struct drm_i915_private *i915)
>         gen9_set_dc_state_debugmask(i915);
> 
>         pipedmc_clock_gating_wa(i915, false);
>+
>+        intel_dmc_wl_enable(i915);
> }
> 
> /**
>@@ -553,6 +555,8 @@ void intel_dmc_disable_program(struct drm_i915_private *i915)
>         pipedmc_clock_gating_wa(i915, true);
>         disable_all_event_handlers(i915);
>         pipedmc_clock_gating_wa(i915, false);
>+
>+        intel_dmc_wl_disable(i915);
> }
> 
> void assert_dmc_loaded(struct drm_i915_private *i915)
>@@ -1085,6 +1089,8 @@ void intel_dmc_suspend(struct drm_i915_private *i915)
>         if (dmc)
>                 flush_work(&dmc->work);
> 
>+        intel_dmc_wl_disable(i915);
>+
>         /* Drop the reference held in case DMC isn't loaded. */
>         if (!intel_dmc_has_payload(i915))
>                 intel_dmc_runtime_pm_put(i915);
>@@ -1108,6 +1114,8 @@ void intel_dmc_resume(struct drm_i915_private *i915)
>          */
>         if (!intel_dmc_has_payload(i915))
>                 intel_dmc_runtime_pm_get(i915);
>+
>+        intel_dmc_wl_enable(i915);
> }
> 
> /**
>-- 
>2.39.2
>


More information about the Intel-xe mailing list