]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/dsi: Implement encoder->shutdown() for icl+
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 8 Jun 2023 20:30:51 +0000 (23:30 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 13 Jun 2023 16:05:34 +0000 (19:05 +0300)
Plug in the encoder->shutdown() hook for icl+ DSI so that
we are guaranteed to respect the power cycle delay during
reboots and whatnot.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230608203057.23759-8-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/display/intel_dsi.c
drivers/gpu/drm/i915/display/intel_dsi.h
drivers/gpu/drm/i915/display/vlv_dsi.c

index a89a45fc0468020a0e07e37f1f63dae1449e57fe..780a004fe700a4929a80e852594b9faf772154b1 100644 (file)
@@ -1979,6 +1979,7 @@ void icl_dsi_init(struct drm_i915_private *dev_priv)
        encoder->get_power_domains = gen11_dsi_get_power_domains;
        encoder->disable_clock = gen11_dsi_gate_clocks;
        encoder->is_clock_enabled = gen11_dsi_is_clock_enabled;
+       encoder->shutdown = intel_dsi_shutdown;
 
        /* register DSI connector with DRM subsystem */
        drm_connector_init(&dev_priv->drm, connector, &gen11_dsi_connector_funcs,
index e8a596a7c28afb6e545a494f26cc2b3a0f32645f..d3cf6a652221fa22a9ace04b18d05850125b15d0 100644 (file)
@@ -22,6 +22,13 @@ void intel_dsi_wait_panel_power_cycle(struct intel_dsi *intel_dsi)
                msleep(intel_dsi->panel_pwr_cycle_delay - panel_power_off_duration);
 }
 
+void intel_dsi_shutdown(struct intel_encoder *encoder)
+{
+       struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
+
+       intel_dsi_wait_panel_power_cycle(intel_dsi);
+}
+
 int intel_dsi_bitrate(const struct intel_dsi *intel_dsi)
 {
        int bpp = mipi_dsi_pixel_format_to_bpp(intel_dsi->pixel_format);
index b690e0fcd9069a423fb5dbda40cb1a7e612f76c1..083390e5e4429daf6c68cd241bd6316a1895fa33 100644 (file)
@@ -174,5 +174,6 @@ struct intel_dsi_host *intel_dsi_host_init(struct intel_dsi *intel_dsi,
                                           const struct mipi_dsi_host_ops *funcs,
                                           enum port port);
 void intel_dsi_wait_panel_power_cycle(struct intel_dsi *intel_dsi);
+void intel_dsi_shutdown(struct intel_encoder *encoder);
 
 #endif /* _INTEL_DSI_H */
index 1e6f438a43d80adce135f994fb28d7ec531d0af1..33ada1a736d826e679ed1420331f30aaff6e69e4 100644 (file)
@@ -929,13 +929,6 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
        intel_dsi->panel_power_off_time = ktime_get_boottime();
 }
 
-static void intel_dsi_shutdown(struct intel_encoder *encoder)
-{
-       struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
-
-       intel_dsi_wait_panel_power_cycle(intel_dsi);
-}
-
 static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
                                   enum pipe *pipe)
 {