public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>
Subject: Re: [PATCH 12/13] drm/i915: Manage HSW/BDW LCPLLs with the shared dpll interface
Date: Tue, 08 Mar 2016 13:16:40 +0200	[thread overview]
Message-ID: <1457435800.4155.12.camel@gmail.com> (raw)
In-Reply-To: <1457435510.4155.8.camel@intel.com>

On Tue, 2016-03-08 at 11:11 +0000, Conselvan De Oliveira, Ander wrote:
> On Tue, 2016-03-08 at 12:05 +0100, Maarten Lankhorst wrote:
> > Op 26-02-16 om 14:54 schreef Ander Conselvan de Oliveira:
> > > Manage the LCPLLs used with DisplayPort, so that all the HSW/BDW DPLLs
> > > are managed by the shared dpll code.
> > > 
> > > Signed-off-by: Ander Conselvan de Oliveira <
> > > ander.conselvan.de.oliveira@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_ddi.c      | 18 ++++----
> > >  drivers/gpu/drm/i915/intel_display.c  | 35 ++++++++++++----
> > >  drivers/gpu/drm/i915/intel_dp.c       | 23 +---------
> > >  drivers/gpu/drm/i915/intel_dp_mst.c   |  4 --
> > >  drivers/gpu/drm/i915/intel_dpll_mgr.c | 79
> > > +++++++++++++++++++++++++++++++-
> > > ---
> > >  drivers/gpu/drm/i915/intel_dpll_mgr.h |  5 ++-
> > >  drivers/gpu/drm/i915/intel_drv.h      |  1 -
> > >  7 files changed, 110 insertions(+), 55 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c
> > > b/drivers/gpu/drm/i915/intel_ddi.c
> > > index ad7888c..3cb9f36 100644
> > > --- a/drivers/gpu/drm/i915/intel_ddi.c
> > > +++ b/drivers/gpu/drm/i915/intel_ddi.c
> > > @@ -992,17 +992,13 @@ hsw_ddi_pll_select(struct intel_crtc *intel_crtc,
> > >  {
> > >  	struct intel_shared_dpll *pll;
> > >  
> > > -	if (intel_encoder->type == INTEL_OUTPUT_HDMI ||
> > > -	    intel_encoder->type == INTEL_OUTPUT_ANALOG) {
> > > -		pll = intel_get_shared_dpll(intel_crtc, crtc_state,
> > > -					    intel_encoder);
> > > -		if (!pll)
> > > -			DRM_DEBUG_DRIVER("failed to find PLL for pipe
> > > %c\n",
> > > -					 pipe_name(intel_crtc->pipe));
> > > -		return pll;
> > > -	} else {
> > > -		return true;
> > > -	}
> > > +	pll = intel_get_shared_dpll(intel_crtc, crtc_state,
> > > +				    intel_encoder);
> > > +	if (!pll)
> > > +		DRM_DEBUG_DRIVER("failed to find PLL for pipe %c\n",
> > > +				 pipe_name(intel_crtc->pipe));
> > > +
> > > +	return pll;
> > >  }
> > Eventually the reliance on intel_encoder->type should end here, and based on
> > the connector.
> 
> Do you mean that the parameter to get_shared_dpll() should be connector
> instead
> of encoder?
> 
> > It would fix some kms tests, but that would be better to do in a future
> > patch.
> > > ...
> > > 
> > > +static bool hsw_ddi_lcpll_get_hw_state(struct drm_i915_private *dev_priv,
> > > +				       struct intel_shared_dpll *pll,
> > > +				       struct intel_dpll_hw_state
> > > *hw_state)
> > > +{
> > > +	/*
> > > +	 * LC PLL is kept enabled all the time since it drives CDCLK. The
> > > +	 * state checker still expects it to be disabled when it is not
> > > used
> > > +	 * by any crtc. To avoid adding a case to LC PLL, just tell the
> > > +	 * state checker what it expects.
> > > +	 */
> > > +	if (pll->config.crtc_mask)
> > > +		return true;
> > > +	else
> > > +		return false;
> > > +}
> > Wouldn't it be better to return true or the real hardware state then, and
> > set
> > the ALWAYS_ON flag from the next patch?
> 
> That's exactly what v2 of this patch does. :)

Well, actually, I think I fumbled git add or something, so I need to send a v3
of that patch. I also have a v3 of the SKL DPLL0 one, now that I managed to test
it. So I'll resend the series later today.

Ander

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

  reply	other threads:[~2016-03-08 11:16 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-26 13:54 [PATCH 00/13] Shared pll improvements Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 01/13] drm/i915: Move shared dpll code to a new file Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 02/13] drm/i915: Move ddi shared dpll code to intel_dpll_mgr.c Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 03/13] drm/i915: Split intel_get_shared_dpll() into smaller functions Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 04/13] drm/i915: Store a direct pointer to shared dpll in intel_crtc_state Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 05/13] drm/i915: Move shared dpll struct definitions to separate header file Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 06/13] drm/i915: Move shared dpll function prototypes to intel_dpll_mgr.h Ander Conselvan de Oliveira
2016-03-02 14:56   ` Maarten Lankhorst
2016-02-26 13:54 ` [PATCH 07/13] drm/i915: Use a table to initilize shared dplls Ander Conselvan de Oliveira
2016-03-02 15:30   ` Maarten Lankhorst
2016-03-03 11:32     ` Ander Conselvan De Oliveira
2016-03-03 13:35       ` Maarten Lankhorst
2016-02-26 13:54 ` [PATCH 08/13] drm/i915: Refactor platform specifics out of intel_get_shared_dpll() Ander Conselvan de Oliveira
2016-03-03 14:08   ` Maarten Lankhorst
2016-03-04  6:36     ` Ander Conselvan De Oliveira
2016-03-04  6:49     ` Ander Conselvan De Oliveira
2016-03-07  9:59       ` Maarten Lankhorst
2016-02-26 13:54 ` [PATCH 09/13] drm/i915: Move HSW/BDW pll selection logic to intel_dpll_mgr.c Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 10/13] drm/i915: Move SKL/KLB " Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 11/13] drm/i915: Move BXT pll configuration " Ander Conselvan de Oliveira
2016-02-26 13:54 ` [PATCH 12/13] drm/i915: Manage HSW/BDW LCPLLs with the shared dpll interface Ander Conselvan de Oliveira
2016-02-29  9:08   ` [PATCH v2 " Ander Conselvan de Oliveira
2016-03-08 11:05   ` [PATCH " Maarten Lankhorst
2016-03-08 11:11     ` Conselvan De Oliveira, Ander
2016-03-08 11:16       ` Ander Conselvan De Oliveira [this message]
2016-02-26 13:54 ` [PATCH 13/13] drm/i915: Make SKL/KBL DPLL0 managed by the shared dpll code Ander Conselvan de Oliveira
2016-02-29  9:08   ` [PATCH v3 " Ander Conselvan de Oliveira
2016-03-03 13:33     ` Maarten Lankhorst
2016-03-03 13:40       ` Ander Conselvan De Oliveira
2016-03-03 13:51         ` Maarten Lankhorst
2016-02-26 14:27 ` ✗ Fi.CI.BAT: failure for Shared pll improvements Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2016-03-08 15:46 [PATCH 00/13] " Ander Conselvan de Oliveira
2016-03-08 15:46 ` [PATCH 12/13] drm/i915: Manage HSW/BDW LCPLLs with the shared dpll interface Ander Conselvan de Oliveira

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=1457435800.4155.12.camel@gmail.com \
    --to=conselvan2@gmail.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