From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: "R, Durgadoss" <durgadoss.r@intel.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 3/4] drm/i915: Move pll power state to crtc power domains.
Date: Fri, 04 Mar 2016 17:14:23 +0200 [thread overview]
Message-ID: <1457104463.2668.46.camel@gmail.com> (raw)
In-Reply-To: <4D68720C2E767A4AA6A8796D42C8EB59093F52E7@BGSMSX101.gar.corp.intel.com>
On Tue, 2016-03-01 at 17:03 +0000, R, Durgadoss wrote:
> > -----Original Message-----
> > From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
> > Of Maarten Lankhorst
> > Sent: Monday, February 29, 2016 6:22 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH 3/4] drm/i915: Move pll power state to crtc
> > power domains.
> >
> > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 10 +++-------
> > 1 file changed, 3 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 6e3b8a1f7dd3..6f2dd3192bac 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -1912,8 +1912,6 @@ static void intel_enable_shared_dpll(struct intel_crtc
> > *crtc)
> > }
> > WARN_ON(pll->on);
> >
> > - intel_display_power_get(dev_priv, POWER_DOMAIN_PLLS);
> > -
>
> Looking from upfront link train perspective, my initial thought was that
> direct users of this _enable/disable_shared_dpll may have issues..
> But then realized, before we get to _dpll functions, we do a get on
> Port power domains, so, hopefully, that should keep us going.
Seems like that should work on BXT, but that is not how the power domain API is
supposed to be used, as far as I know. You should actually get/put the power
domain when you need it, so that the code is not dependent on side effects and
is tolerant to a new platform having that specific power domain in a different
power well.
With that being said, I'm not exactly sure what is POWER_DOMAIN_PLLS is supposed
to represent. It seems commit bd2bb1b9a1c8 ("drm/i915: add POWER_DOMAIN_PLLS")
added it to fix a shared dpll state mismatch in SandyBridge, but with the
current code the check for the power domain in ibx_pch_dpll_get_hw_state() will
always return true. Later patches show some connection of that power domain with
CDCLK, but I'm failing to grasp it.
Thanks,
Ander
>
> So,
> Reviewed-by: Durgadoss R <durgadoss.r@intel.com>
>
> Thanks,
> Durga
>
> > DRM_DEBUG_KMS("enabling %s\n", pll->name);
> > pll->enable(dev_priv, pll);
> > pll->on = true;
> > @@ -1952,8 +1950,6 @@ static void intel_disable_shared_dpll(struct
> > intel_crtc *crtc)
> > DRM_DEBUG_KMS("disabling %s\n", pll->name);
> > pll->disable(dev_priv, pll);
> > pll->on = false;
> > -
> > - intel_display_power_put(dev_priv, POWER_DOMAIN_PLLS);
> > }
> >
> > static void ironlake_enable_pch_transcoder(struct drm_i915_private
> > *dev_priv,
> > @@ -5347,6 +5343,9 @@ static unsigned long get_crtc_power_domains(struct
> > drm_crtc *crtc,
> > mask |= BIT(intel_display_port_power_domain(intel_encoder));
> > }
> >
> > + if (crtc_state->shared_dpll != DPLL_ID_PRIVATE)
> > + mask |= BIT(POWER_DOMAIN_PLLS);
> > +
> > return mask;
> > }
> >
> > @@ -15775,9 +15774,6 @@ static void intel_modeset_readout_hw_state(struct
> > drm_device *dev)
> >
> > DRM_DEBUG_KMS("%s hw state readout: crtc_mask 0x%08x, on %i\n",
> > pll->name, pll->config.crtc_mask, pll->on);
> > -
> > - if (pll->config.crtc_mask)
> > - intel_display_power_get(dev_priv,
> > POWER_DOMAIN_PLLS);
> > }
> >
> > for_each_intel_encoder(dev, encoder) {
> > --
> > 2.1.0
> >
> > _______________________________________________
> > 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-04 15:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-29 12:52 [PATCH 0/4] Prepare dpll for async Maarten Lankhorst
2016-02-29 12:52 ` [PATCH 1/4] drm/i915: Use a crtc mask instead of a refcount for dpll functions Maarten Lankhorst
2016-03-01 16:52 ` R, Durgadoss
2016-03-04 9:09 ` Ander Conselvan De Oliveira
2016-02-29 12:52 ` [PATCH 2/4] drm/i915: Perform dpll commit first Maarten Lankhorst
2016-03-01 16:58 ` R, Durgadoss
2016-03-04 9:51 ` Ander Conselvan De Oliveira
2016-02-29 12:52 ` [PATCH 3/4] drm/i915: Move pll power state to crtc power domains Maarten Lankhorst
2016-03-01 17:03 ` R, Durgadoss
2016-03-04 15:14 ` Ander Conselvan De Oliveira [this message]
2016-03-04 15:16 ` Ander Conselvan De Oliveira
2016-02-29 12:52 ` [PATCH 4/4] drm/i915: Add locking to pll updates Maarten Lankhorst
2016-03-01 17:08 ` R, Durgadoss
2016-02-29 13:22 ` ✗ Fi.CI.BAT: failure for Prepare dpll for async 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=1457104463.2668.46.camel@gmail.com \
--to=conselvan2@gmail.com \
--cc=durgadoss.r@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
--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