On Tue, 25 Apr 2023, Ville Syrjala <ville.syrj...@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrj...@linux.intel.com>
>
> Looks like we're trying to talk to the DSI panel even before turning
> it on, on icl+. Bspec doesn't actually specify when these should be
> done, but certainly we need to turn the panel on at least before
> talking to it. So let's move the power on + reset deassert steps to
> be the first thing we do. This is also what Windows does.
>
> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>

Needs a rebase on c8c2969bfcba ("drm/i915/dsi: Use unconditional
msleep() instead of intel_dsi_msleep()") but otherwise,

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

> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c 
> b/drivers/gpu/drm/i915/display/icl_dsi.c
> index ad78148e0788..d424d30a01e8 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1138,10 +1138,6 @@ static void gen11_dsi_powerup_panel(struct 
> intel_encoder *encoder)
>                               "error setting max return pkt size%d\n", tmp);
>       }
>  
> -     /* panel power on related mipi dsi vbt sequences */
> -     intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
> -     intel_dsi_msleep(intel_dsi, intel_dsi->panel_on_delay);
> -     intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
>       intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_INIT_OTP);
>       intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DISPLAY_ON);
>  
> @@ -1154,6 +1150,12 @@ static void gen11_dsi_pre_pll_enable(struct 
> intel_atomic_state *state,
>                                    const struct intel_crtc_state *crtc_state,
>                                    const struct drm_connector_state 
> *conn_state)
>  {
> +     struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> +
> +     intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_POWER_ON);
> +     intel_dsi_msleep(intel_dsi, intel_dsi->panel_on_delay);
> +     intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_DEASSERT_RESET);
> +
>       /* step2: enable IO power */
>       gen11_dsi_enable_io_power(encoder);

-- 
Jani Nikula, Intel Open Source Graphics Center

Reply via email to