Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	Arthur J Runyan <arthur.j.runyan@intel.com>
Subject: Re: [PATCH] drm/i915: enable the pipe/transcoder/planes later on HSW+
Date: Wed, 2 May 2018 15:07:50 -0700	[thread overview]
Message-ID: <20180502220750.GI14581@intel.com> (raw)
In-Reply-To: <20180502215851.30736-1-paulo.r.zanoni@intel.com>

On Wed, May 02, 2018 at 02:58:51PM -0700, Paulo Zanoni wrote:
> For all platforms that run haswell_crtc_enable, our spec tells us to
> configure the transcoder clocks and do link training before it tells
> us to set pipeconf and the other pipe/transcoder/plane registers.

oh! I remember this order years ago when trying to figure out where
to enable PSR... but I never noticed we weren't fully respecting it.

> 
> Starting from Icelake, we get machine hangs if we try to touch the
> pipe/transcoder registers without having the clocks configured and not
> having some chicken bits set. So this patch changes
> haswell_crtc_enable() to issue the calls at the appropriate order
> mandated by the spec.
> 
> While setting the appropriate chicken bits would also work here, it's
> better if we actually program the hardware the way it is intended to
> be programmed. And the chicken bit also has some theoretical downsides
> that may or may not affect us. Also, correctly programming the
> hardware does not prevent us from setting the chicken bits in a later
> patch in case we decide to.
> 
> v2: Don't forget link training (Ville).
> 
> Cc: Arthur J Runyan <arthur.j.runyan@intel.com>
> Cc: James Ausmus <james.ausmus@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

makes sense for me.... let's now just see CI is happy as well! ;)

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Again, I didn't test this patch on every affected platform. Let's see
> what the CI system says about it.
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1087358f6364..f566c9e56cf6 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5559,6 +5559,11 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
>  	if (intel_crtc->config->shared_dpll)
>  		intel_enable_shared_dpll(intel_crtc);
>  
> +	intel_encoders_pre_enable(crtc, pipe_config, old_state);
> +
> +	if (!transcoder_is_dsi(cpu_transcoder))
> +		intel_ddi_enable_pipe_clock(pipe_config);
> +
>  	if (intel_crtc_has_dp_encoder(intel_crtc->config))
>  		intel_dp_set_m_n(intel_crtc, M1_N1);
>  
> @@ -5587,11 +5592,6 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
>  
>  	intel_crtc->active = true;
>  
> -	intel_encoders_pre_enable(crtc, pipe_config, old_state);
> -
> -	if (!transcoder_is_dsi(cpu_transcoder))
> -		intel_ddi_enable_pipe_clock(pipe_config);
> -
>  	/* Display WA #1180: WaDisableScalarClockGating: glk, cnl */
>  	psl_clkgate_wa = (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
>  			 intel_crtc->config->pch_pfit.enabled;
> -- 
> 2.14.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-05-02 22:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 23:12 [PATCH] drm/i915: configure the transcoder clocks before touching pipeconf on HSW+ Paulo Zanoni
2018-04-30 11:28 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-04-30 12:17 ` Patchwork
2018-04-30 12:40 ` Patchwork
2018-04-30 14:20 ` ✓ Fi.CI.IGT: " Patchwork
2018-04-30 15:36 ` Patchwork
2018-04-30 16:18 ` Patchwork
2018-04-30 18:12 ` [PATCH] " Ville Syrjälä
2018-05-02 21:06   ` Paulo Zanoni
2018-05-02 21:58 ` [PATCH] drm/i915: enable the pipe/transcoder/planes later " Paulo Zanoni
2018-05-02 22:07   ` Rodrigo Vivi [this message]
2018-05-02 22:19   ` Manasi Navare
2018-05-02 22:23 ` ✗ Fi.CI.BAT: failure for drm/i915: configure the transcoder clocks before touching pipeconf on HSW+ (rev2) Patchwork
2018-05-04 19:56   ` Paulo Zanoni
2018-05-02 23:47 ` Patchwork
2018-05-08  0:10 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-08  0:57 ` ✗ Fi.CI.IGT: failure " Patchwork

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=20180502220750.GI14581@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=arthur.j.runyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox