Commit e3972476 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915/dsi: Implement encoder->shutdown() for icl+



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: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230608203057.23759-8-ville.syrjala@linux.intel.com
parent 201963a8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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,
+7 −0
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -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 */
+0 −7
Original line number Diff line number Diff line
@@ -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)
{