All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 09/14] drm/i915/dsi: Move most things from .enable() into .post_disable()
Date: Wed, 03 May 2023 11:52:52 +0300	[thread overview]
Message-ID: <874jot23vf.fsf@intel.com> (raw)
In-Reply-To: <20230425105450.18441-10-ville.syrjala@linux.intel.com>

On Tue, 25 Apr 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@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@intel.com>

>
> Signed-off-by: Ville Syrjälä <ville.syrjala@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

  reply	other threads:[~2023-05-03  8:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25 10:54 [Intel-gfx] [PATCH 00/14] drm/i915/dsi: ICL+ DSI modeset sequence fixes Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 01/14] drm/i915/icl: Do panel power on + reset deassert earlier on icl+ Ville Syrjala
2023-05-03  8:48   ` Jani Nikula
2023-04-25 10:54 ` [Intel-gfx] [PATCH 02/14] drm/i915/dsi: Do display on sequence later " Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 03/14] drm/i915/dsi: Always do panel power up delay " Ville Syrjala
2023-05-03  8:49   ` Jani Nikula
2023-04-25 10:54 ` [Intel-gfx] [PATCH 04/14] drm/i915/dsi: Print the VBT MIPI sequence delay duration Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 05/14] drm/i915/dsi: Split icl+ D-PHY vs. DSI timing steps Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 06/14] drm/i915/dsi: Gate DSI clocks earlier Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 07/14] drm/i915/dsi: Respect power cycle delay on icl+ Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 08/14] drm/i915/dsi: Implement encoder->shutdown() for icl+ Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 09/14] drm/i915/dsi: Move most things from .enable() into .post_disable() Ville Syrjala
2023-05-03  8:52   ` Jani Nikula [this message]
2023-04-25 10:54 ` [Intel-gfx] [PATCH 10/14] drm/i915/dsi: Do DSC/scaler disable earlier on icl+ Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 11/14] drm/i915/dsi: Respect power_off_delay " Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 12/14] drm/i915/dsi: Move panel reset+power off to be the last thing Ville Syrjala
2023-05-03  8:53   ` Jani Nikula
2023-04-25 10:54 ` [Intel-gfx] [PATCH 13/14] drm/i915/dsi: Grab the crtc from the customary place Ville Syrjala
2023-04-25 10:54 ` [Intel-gfx] [PATCH 14/14] drm/i915/dsi: Remove weird has_pch_encoder asserts Ville Syrjala
2023-04-25 11:45 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/dsi: ICL+ DSI modeset sequence fixes Patchwork
2023-04-25 11:58 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-04-25 16:57 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-05-03  8:59 ` [Intel-gfx] [PATCH 00/14] " Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jot23vf.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.