From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 10/10] drm/i915: Remove crtc->active from crtc_enable callbacks
Date: Thu, 11 Oct 2018 15:06:22 +0300 [thread overview]
Message-ID: <20181011120622.GG9144@intel.com> (raw)
In-Reply-To: <20181011100457.8776-11-maarten.lankhorst@linux.intel.com>
On Thu, Oct 11, 2018 at 12:04:57PM +0200, Maarten Lankhorst wrote:
> Now that most of the driver is atomic, we no longer need to worry
> about setting crtc->active right before actually enabling the pipe.
Hmm. I think we need at least that wait_for_vblank_if_active() change
we discussed. And maybe there's something in the watermark code that
depends on this being more or less accurate indication of thw hw state.
That probably needs some actual thought.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 21 +--------------------
> 1 file changed, 1 insertion(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index ad2c207d18bb..0e4bdd5c337e 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5585,9 +5585,6 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
> struct intel_atomic_state *old_intel_state =
> to_intel_atomic_state(old_state);
>
> - if (WARN_ON(intel_crtc->active))
> - return;
> -
> /*
> * Sometimes spurious CPU pipe underruns happen during FDI
> * training, at least with VGA+HDMI cloning. Suppress them.
> @@ -5617,8 +5614,6 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
>
> ironlake_set_pipeconf(pipe_config);
>
> - intel_crtc->active = true;
> -
> intel_encoders_pre_enable(crtc, pipe_config, old_state);
>
> if (pipe_config->has_pch_encoder) {
> @@ -5715,9 +5710,6 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
> bool psl_clkgate_wa;
> u32 pipe_chicken;
>
> - if (WARN_ON(intel_crtc->active))
> - return;
> -
> intel_encoders_pre_pll_enable(crtc, pipe_config, old_state);
>
> if (pipe_config->shared_dpll)
> @@ -5754,8 +5746,6 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
>
> intel_color_set_csc(&pipe_config->base);
>
> - intel_crtc->active = true;
> -
> /* Display WA #1180: WaDisableScalarClockGating: glk, cnl */
> psl_clkgate_wa = (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) &&
> pipe_config->pch_pfit.enabled;
> @@ -6067,9 +6057,6 @@ static void valleyview_crtc_enable(struct intel_crtc_state *pipe_config,
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> int pipe = intel_crtc->pipe;
>
> - if (WARN_ON(intel_crtc->active))
> - return;
> -
> if (intel_crtc_has_dp_encoder(pipe_config))
> intel_dp_set_m_n(pipe_config, M1_N1);
>
> @@ -6085,8 +6072,6 @@ static void valleyview_crtc_enable(struct intel_crtc_state *pipe_config,
>
> intel_color_set_csc(&pipe_config->base);
>
> - intel_crtc->active = true;
> -
> intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
>
> intel_encoders_pre_pll_enable(crtc, pipe_config, old_state);
> @@ -6135,9 +6120,6 @@ static void i9xx_crtc_enable(struct intel_crtc_state *pipe_config,
> struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
> enum pipe pipe = intel_crtc->pipe;
>
> - if (WARN_ON(intel_crtc->active))
> - return;
> -
> i9xx_set_pll_dividers(pipe_config);
>
> if (intel_crtc_has_dp_encoder(pipe_config))
> @@ -6148,8 +6130,6 @@ static void i9xx_crtc_enable(struct intel_crtc_state *pipe_config,
>
> i9xx_set_pipeconf(pipe_config);
>
> - intel_crtc->active = true;
> -
> if (!IS_GEN2(dev_priv))
> intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, true);
>
> @@ -12525,6 +12505,7 @@ static void intel_update_crtc(struct drm_crtc *crtc,
>
> if (modeset) {
> update_scanline_offset(pipe_config);
> + intel_crtc->active = true;
> dev_priv->display.crtc_enable(pipe_config, state);
>
> /* vblanks work again, re-enable pipe CRC. */
> --
> 2.19.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-11 12:06 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 10:04 [PATCH 00/10] drm/i915: Remove low hanging crtc->config fruit, part 2 Maarten Lankhorst
2018-10-11 10:04 ` [PATCH 01/10] drm/i915: Remove crtc->config dereference from drrs_ctl Maarten Lankhorst
2018-10-16 20:13 ` Ville Syrjälä
2018-10-17 13:00 ` Maarten Lankhorst
2018-10-11 10:04 ` [PATCH 02/10] drm/i915: Make intel_dp_set_m_n take crtc_state Maarten Lankhorst
2018-10-11 11:39 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 03/10] drm/i915: Remove crtc->config references in vlv_prepare_pll Maarten Lankhorst
2018-10-11 11:40 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 04/10] drm/i915: Always read out M2_N2 in intel_cpu_transcoder_get_m_n Maarten Lankhorst
2018-10-11 11:56 ` Ville Syrjälä
2018-10-11 18:17 ` Maarten Lankhorst
2018-10-11 19:09 ` Ville Syrjälä
2018-10-15 9:40 ` [PATCH] drm/i915: Always read out M2_N2 in intel_cpu_transcoder_get_m_n, v2 Maarten Lankhorst
2018-10-15 19:12 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 05/10] drm/i915: Pass crtc_state to update_scanline_offset Maarten Lankhorst
2018-10-11 11:56 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 06/10] drm/i915: Remove crtc->config dereferences in intel_sanitize_crtc Maarten Lankhorst
2018-10-11 11:57 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 07/10] drm/i915: Remove crtc->config dereferences in intel_modeset_setup_hw_state Maarten Lankhorst
2018-10-11 11:59 ` Ville Syrjälä
2018-10-16 13:57 ` Maarten Lankhorst
2018-10-11 10:04 ` [PATCH 08/10] drm/i915: Pass crtc_state to lpt_program_iclkip Maarten Lankhorst
2018-10-11 12:00 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 09/10] drm/i915: Pass crtc_state to ivybridge_update_fdi_bc_bifurcation Maarten Lankhorst
2018-10-11 12:00 ` Ville Syrjälä
2018-10-11 10:04 ` [PATCH 10/10] drm/i915: Remove crtc->active from crtc_enable callbacks Maarten Lankhorst
2018-10-11 12:06 ` Ville Syrjälä [this message]
2018-10-11 11:02 ` ✗ Fi.CI.BAT: failure for drm/i915: Remove low hanging crtc->config fruit, part 2 Patchwork
2018-10-15 10:14 ` ✓ Fi.CI.BAT: success for drm/i915: Remove low hanging crtc->config fruit, part 2. (rev2) Patchwork
2018-10-15 11:16 ` ✓ Fi.CI.IGT: " 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=20181011120622.GG9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@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.