All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/icl: Clear the shared port PLLs from the new crtc state
Date: Mon, 8 Jul 2019 16:16:42 +0300	[thread overview]
Message-ID: <20190708131642.GR5942@intel.com> (raw)
In-Reply-To: <20190705140423.28404-2-imre.deak@intel.com>

On Fri, Jul 05, 2019 at 05:04:23PM +0300, Imre Deak wrote:
> For consistency clear the icl_port_dplls from the new crtc state, when
> releasing the DPLLs from the old crtc state. Leaving them set could
> result in releasing the same PLLs multiple times from the same CRTC
> state incorrectly (if the same CRTC was first used for a TypeC port then
> for a combo PHY port).
> 
> Leaving the stale pointers behind happens not to cause a problem atm
> (since the incorrect releasing will be a NOP), but we need to fix that
> for consistency.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> index 722b1deca999..f4db2410ca93 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> @@ -3021,15 +3021,17 @@ static void icl_put_dplls(struct intel_atomic_state *state,
>  	new_crtc_state->shared_dpll = NULL;
>  
>  	for (id = ICL_PORT_DPLL_DEFAULT; id < ICL_PORT_DPLL_COUNT; id++) {
> -		struct icl_port_dpll *port_dpll =
> +		struct icl_port_dpll *old_port_dpll =
>  			&old_crtc_state->icl_port_dplls[id];
> +		struct icl_port_dpll *new_port_dpll =
> +			&new_crtc_state->icl_port_dplls[id];

I would constify the old states in both patches.

Series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  
> -		if (!port_dpll->pll)
> -			continue;
> +		new_port_dpll->pll = NULL;
>  
> -		intel_unreference_shared_dpll(state, crtc, port_dpll->pll);
> +		if (!old_port_dpll->pll)
> +			continue;
>  
> -		/* FIXME: Clear the icl_port_dplls from the new crtc state */
> +		intel_unreference_shared_dpll(state, crtc, old_port_dpll->pll);
>  	}
>  }
>  
> -- 
> 2.17.1
> 
> _______________________________________________
> 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

  reply	other threads:[~2019-07-08 13:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-05 14:04 [PATCH 1/2] drm/i915: Clear the shared PLL from the put_dplls() hook Imre Deak
2019-07-05 14:04 ` [PATCH 2/2] drm/i915/icl: Clear the shared port PLLs from the new crtc state Imre Deak
2019-07-08 13:16   ` Ville Syrjälä [this message]
2019-07-05 15:44 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Clear the shared PLL from the put_dplls() hook Patchwork
2019-07-07  2: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=20190708131642.GR5942@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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.