Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 v2 08/13] drm/i915: Make shared dpll functions take crtc_state
Date: Thu, 4 Oct 2018 18:24:26 +0300	[thread overview]
Message-ID: <20181004152426.GR9144@intel.com> (raw)
In-Reply-To: <8eddb830-516b-ce91-5da7-e6403881c4a2@linux.intel.com>

On Thu, Oct 04, 2018 at 03:25:42PM +0200, Maarten Lankhorst wrote:
> Op 04-10-18 om 14:57 schreef Ville Syrjälä:
> > On Thu, Oct 04, 2018 at 11:45:59AM +0200, Maarten Lankhorst wrote:
> >> Do not rely on crtc->config any more. Remove the assertion from
> >> ibx_pch_dpll_disable, because we the dpll state tracking should
> >> already handle this case correctly.
> >>
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> >> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/intel_display.c  | 14 ++++++------
> >>  drivers/gpu/drm/i915/intel_dpll_mgr.c | 31 +++++++++++----------------
> >>  drivers/gpu/drm/i915/intel_dpll_mgr.h |  6 +++---
> >>  3 files changed, 22 insertions(+), 29 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >> index fe8ccbdd4ea1..4df4293a7917 100644
> >> --- a/drivers/gpu/drm/i915/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/intel_display.c
> >> @@ -4749,7 +4749,7 @@ static void ironlake_pch_enable(const struct intel_atomic_state *state,
> >>  	 * Note that enable_shared_dpll tries to do the right thing, but
> >>  	 * get_shared_dpll unconditionally resets the pll - we need that to have
> >>  	 * the right LVDS enable sequence. */
> >> -	intel_enable_shared_dpll(crtc);
> >> +	intel_enable_shared_dpll(crtc_state);
> >>  
> >>  	/* set transcoder timing, panel must allow it */
> >>  	assert_panel_unlocked(dev_priv, pipe);
> >> @@ -5591,8 +5591,8 @@ static void ironlake_crtc_enable(struct intel_crtc_state *pipe_config,
> >>  	intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
> >>  	intel_set_pch_fifo_underrun_reporting(dev_priv, pipe, false);
> >>  
> >> -	if (intel_crtc->config->has_pch_encoder)
> >> -		intel_prepare_shared_dpll(intel_crtc);
> >> +	if (pipe_config->has_pch_encoder)
> >> +		intel_prepare_shared_dpll(pipe_config);
> >>  
> >>  	if (intel_crtc_has_dp_encoder(intel_crtc->config))
> >>  		intel_dp_set_m_n(intel_crtc, M1_N1);
> >> @@ -5710,8 +5710,8 @@ static void haswell_crtc_enable(struct intel_crtc_state *pipe_config,
> >>  
> >>  	intel_encoders_pre_pll_enable(crtc, pipe_config, old_state);
> >>  
> >> -	if (intel_crtc->config->shared_dpll)
> >> -		intel_enable_shared_dpll(intel_crtc);
> >> +	if (pipe_config->shared_dpll)
> >> +		intel_enable_shared_dpll(pipe_config);
> >>  
> >>  	if (INTEL_GEN(dev_priv) >= 11)
> >>  		icl_map_plls_to_ports(crtc, pipe_config, old_state);
> >> @@ -6286,7 +6286,7 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc,
> >>  
> >>  	intel_fbc_disable(intel_crtc);
> >>  	intel_update_watermarks(intel_crtc);
> >> -	intel_disable_shared_dpll(intel_crtc);
> >> +	intel_disable_shared_dpll(crtc_state);
> > I guess this is the explosion on i915g/i965g. We've already freed this
> > crtc state at this point. So I guess s/crtc_state/crtc->state/ and it
> > should be fine?
> >
> No, the explosion is at
> 
> -	if (WARN_ON(pll == NULL))
> +	if (!WARN_ON(!pll))
>  		return;
> 
> Oops! Should be fixed in v2 I'm sending now.

<4>[   11.181254] R10: 0000000000000000 R11: 0000000000000000 R12: 6b6b6b6b6b6b6b6b
<4>[   11.181141] RIP: 0010:intel_disable_shared_dpll+0x12/0x130 [i915]
<4>[   11.181157] Code: c7 e9 67 25 a0 e8 9e da ec e0 0f 0b e9 18 ff ff ff 0f 1f 80 00 00 00 00 41 56 41 55 41 54 55 53 4c 8b 27 48 8b 9f 98 02 00 00 <4d> 8b 34 24 41 80 be 5c 0d 00 00 04 76 05 48 85 db 75 09 5b 5d 41

72a:   4d 8b 34 24             mov    (%r12),%r14

Looks like it's still trying to drink poison.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-04 15:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04  9:45 [PATCH v2 00/13] drm/i915: First cleanup pass to get rid of more crtc->config users Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 01/13] drm/i915: Remove dereferences of crtc->config in set_pipeconf/misc functions, v2 Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 02/13] drm/i915: Make panel fitter functions take state Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 03/13] drm/i915: Make intel_set_pipe_timings/src_size take a pointer to crtc_state Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 04/13] drm/i915: Use crtc_state in ironlake_enable_pch_transcoder Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 05/13] drm/i915: Make skl_detach_scalers take crtc_state Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 06/13] drm/i915: Make pll functions take crtc_state, v2 Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 07/13] drm/i915: Make ironlake_pch_transcoder_set_timings take crtc_state Maarten Lankhorst
2018-10-04  9:45 ` [PATCH v2 08/13] drm/i915: Make shared dpll functions " Maarten Lankhorst
2018-10-04 12:57   ` Ville Syrjälä
2018-10-04 13:25     ` Maarten Lankhorst
2018-10-04 15:24       ` Ville Syrjälä [this message]
2018-10-05  9:30         ` Maarten Lankhorst
2018-10-05 18:29         ` Maarten Lankhorst
2018-10-04 13:27     ` [PATCH] drm/i915: Make shared dpll functions take crtc_state, v2 Maarten Lankhorst
2018-10-05  9:41       ` [PATCH] drm/i915: Make shared dpll functions take crtc_state, v3 Maarten Lankhorst
2018-10-05  9:52         ` Maarten Lankhorst
2018-10-04  9:46 ` [PATCH v2 09/13] drm/i915: Get rid of crtc->config from icl_pll_to_ddi_pll_sel Maarten Lankhorst
2018-10-04  9:46 ` [PATCH v2 10/13] drm/i915: Use crtc->state in intel_fbdev_init_bios Maarten Lankhorst
2018-10-04  9:46 ` [PATCH v2 11/13] drm/i915: Get rid of crtc->config dereference in intel_dp_retrain_link Maarten Lankhorst
2018-10-04  9:46 ` [PATCH v2 12/13] drm/i915: Get rid of crtc->config in chv_data_lane_soft_reset Maarten Lankhorst
2018-10-04  9:46 ` [PATCH v2 13/13] drm/i915: Get rid of intel_crtc->config in crtc_enable/disable functions, v2 Maarten Lankhorst
2018-10-04 10:42 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: First cleanup pass to get rid of more crtc->config users. (rev2) Patchwork
2018-10-04 11:07 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-10-04 14:03 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: First cleanup pass to get rid of more crtc->config users. (rev3) Patchwork
2018-10-04 14:28 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-10-05  9:48 ` ✗ Fi.CI.BAT: failure for drm/i915: First cleanup pass to get rid of more crtc->config users. (rev4) Patchwork
2018-10-05 10:12 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: First cleanup pass to get rid of more crtc->config users. (rev5) Patchwork
2018-10-05 10:37 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-05 14:42 ` ✓ 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=20181004152426.GR9144@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox