diff mbox series

[v2,6/6] drm/i915: Wait for VLV/CHV/BXT/GLK DSI panel power cycle delay on reboot

Message ID 20201001151640.14590-6-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/6] drm/i915: Shut down displays gracefully on reboot | expand

Commit Message

Ville Syrjälä Oct. 1, 2020, 3:16 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

As with eDP and LVDS we should also respect the power cycle
delay on DSI panels. We are not using the power sequencer
for these, and we have no optimizations around the sleep
duration, so we just msleep() the whole thing away.

Note that the ICL+ DSI code doesn't seem to have any power
off/power cycle delay handling whatsoever. The only thing it
handles is the power on delay. As that looks pretty busted
in general I won't bother dealing with it for the time being.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/vlv_dsi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Jani Nikula Oct. 6, 2020, 9:31 a.m. UTC | #1
On Thu, 01 Oct 2020, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> As with eDP and LVDS we should also respect the power cycle
> delay on DSI panels. We are not using the power sequencer
> for these, and we have no optimizations around the sleep
> duration, so we just msleep() the whole thing away.
>
> Note that the ICL+ DSI code doesn't seem to have any power
> off/power cycle delay handling whatsoever. The only thing it
> handles is the power on delay. As that looks pretty busted
> in general I won't bother dealing with it for the time being.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Better than nothing.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/vlv_dsi.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
> index 5e5522923b1e..d52f9c177908 100644
> --- a/drivers/gpu/drm/i915/display/vlv_dsi.c
> +++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
> @@ -985,6 +985,13 @@ static void intel_dsi_post_disable(struct intel_atomic_state *state,
>  	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
>  }
>  
> +static void intel_dsi_shutdown(struct intel_encoder *encoder)
> +{
> +	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> +
> +	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
> +}
> +
>  static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
>  				   enum pipe *pipe)
>  {
> @@ -1843,6 +1850,7 @@ void vlv_dsi_init(struct drm_i915_private *dev_priv)
>  	intel_encoder->get_hw_state = intel_dsi_get_hw_state;
>  	intel_encoder->get_config = intel_dsi_get_config;
>  	intel_encoder->update_pipe = intel_panel_update_backlight;
> +	intel_encoder->shutdown = intel_dsi_shutdown;
>  
>  	intel_connector->get_hw_state = intel_connector_get_hw_state;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/vlv_dsi.c b/drivers/gpu/drm/i915/display/vlv_dsi.c
index 5e5522923b1e..d52f9c177908 100644
--- a/drivers/gpu/drm/i915/display/vlv_dsi.c
+++ b/drivers/gpu/drm/i915/display/vlv_dsi.c
@@ -985,6 +985,13 @@  static void intel_dsi_post_disable(struct intel_atomic_state *state,
 	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
 }
 
+static void intel_dsi_shutdown(struct intel_encoder *encoder)
+{
+	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
+
+	intel_dsi_msleep(intel_dsi, intel_dsi->panel_pwr_cycle_delay);
+}
+
 static bool intel_dsi_get_hw_state(struct intel_encoder *encoder,
 				   enum pipe *pipe)
 {
@@ -1843,6 +1850,7 @@  void vlv_dsi_init(struct drm_i915_private *dev_priv)
 	intel_encoder->get_hw_state = intel_dsi_get_hw_state;
 	intel_encoder->get_config = intel_dsi_get_config;
 	intel_encoder->update_pipe = intel_panel_update_backlight;
+	intel_encoder->shutdown = intel_dsi_shutdown;
 
 	intel_connector->get_hw_state = intel_connector_get_hw_state;