[Intel-gfx] [PATCH 09/14] drm/i915/dsi: Move most things from .enable() into .post_disable()

Jani Nikula jani.nikula at linux.intel.com
Wed May 3 08:52:52 UTC 2023


On Tue, 25 Apr 2023, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> encoder->disable() is supposed to happen before the pipe/transcoder
> gets disabled. The icl+ DSI code screwed that up and put most things
> (including the transcoder disable itself) into  encoder->disable().
> Follow the common rules and hoist most things into the
> encoder->post_disable() hook.

Subject: s/enable/disable/

ISTR there was something in the ICL mode set sequence that basically
made us work around the order in hsw_crtc_enable and
hsw_crtc_disable. But if this matches what Windows does, *shrug*.

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

>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/icl_dsi.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
> index 600199d51d69..0e2ed4776766 100644
> --- a/drivers/gpu/drm/i915/display/icl_dsi.c
> +++ b/drivers/gpu/drm/i915/display/icl_dsi.c
> @@ -1395,11 +1395,20 @@ static void gen11_dsi_disable(struct intel_atomic_state *state,
>  			      const struct drm_connector_state *old_conn_state)
>  {
>  	struct intel_dsi *intel_dsi = enc_to_intel_dsi(encoder);
> -	struct intel_crtc *crtc = to_intel_crtc(old_conn_state->crtc);
>  
>  	/* step1: turn off backlight */
>  	intel_dsi_vbt_exec_sequence(intel_dsi, MIPI_SEQ_BACKLIGHT_OFF);
>  	intel_backlight_disable(old_conn_state);
> +}
> +
> +static void gen11_dsi_post_disable(struct intel_atomic_state *state,
> +				   struct intel_encoder *encoder,
> +				   const struct intel_crtc_state *old_crtc_state,
> +				   const struct drm_connector_state *old_conn_state)
> +{
> +	struct intel_crtc *crtc = to_intel_crtc(old_conn_state->crtc);
> +
> +	intel_crtc_vblank_off(old_crtc_state);
>  
>  	/* step2d,e: disable transcoder and wait */
>  	gen11_dsi_disable_transcoder(encoder);
> @@ -1420,14 +1429,6 @@ static void gen11_dsi_disable(struct intel_atomic_state *state,
>  
>  	/* step4: disable IO power */
>  	gen11_dsi_disable_io_power(encoder);
> -}
> -
> -static void gen11_dsi_post_disable(struct intel_atomic_state *state,
> -				   struct intel_encoder *encoder,
> -				   const struct intel_crtc_state *old_crtc_state,
> -				   const struct drm_connector_state *old_conn_state)
> -{
> -	intel_crtc_vblank_off(old_crtc_state);
>  
>  	intel_dsc_disable(old_crtc_state);

-- 
Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list