From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/8] drm/i915: Fold intel_ironlake_limit() into clock computation function
Date: Mon, 14 Mar 2016 13:53:45 +0200 [thread overview]
Message-ID: <1457956425.2711.5.camel@gmail.com> (raw)
In-Reply-To: <56E6A484.2070603@linux.intel.com>
On Mon, 2016-03-14 at 12:46 +0100, Maarten Lankhorst wrote:
> Op 14-03-16 om 09:55 schreef Ander Conselvan de Oliveira:
> > The funcion intel_ironlake_limit() is only called by the crtc compute
> > clock path. By merging it into ironlake_compute_clocks(), the code gets
> > clearer, since there's no more if-ladders to follow.
> >
> > Signed-off-by: Ander Conselvan de Oliveira <
> > ander.conselvan.de.oliveira@intel.com>
> > ---
> > drivers/gpu/drm/i915/intel_display.c | 56 +++++++++++++++------------------
> > ---
> > 1 file changed, 23 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c
> > b/drivers/gpu/drm/i915/intel_display.c
> > index 07b5244..ea71430 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -566,30 +566,6 @@ static bool intel_pipe_will_have_type(const struct
> > intel_crtc_state *crtc_state,
> > }
> >
> > static const intel_limit_t *
> > -intel_ironlake_limit(struct intel_crtc_state *crtc_state, int refclk)
> > -{
> > - struct drm_device *dev = crtc_state->base.crtc->dev;
> > - const intel_limit_t *limit;
> > -
> > - if (intel_pipe_will_have_type(crtc_state, INTEL_OUTPUT_LVDS)) {
> > - if (intel_is_dual_link_lvds(dev)) {
> > - if (refclk == 100000)
> > - limit =
> > &intel_limits_ironlake_dual_lvds_100m;
> > - else
> > - limit = &intel_limits_ironlake_dual_lvds;
> > - } else {
> > - if (refclk == 100000)
> > - limit =
> > &intel_limits_ironlake_single_lvds_100m;
> > - else
> > - limit = &intel_limits_ironlake_single_lvds;
> > - }
> > - } else
> > - limit = &intel_limits_ironlake_dac;
> > -
> > - return limit;
> > -}
> > -
> > -static const intel_limit_t *
> > intel_g4x_limit(struct intel_crtc_state *crtc_state)
> > {
> > struct drm_device *dev = crtc_state->base.crtc->dev;
> > @@ -619,8 +595,8 @@ intel_limit(struct intel_crtc_state *crtc_state, int
> > refclk)
> >
> > if (IS_BROXTON(dev))
> > limit = &intel_limits_bxt;
> > - else if (HAS_PCH_SPLIT(dev))
> > - limit = intel_ironlake_limit(crtc_state, refclk);
> > + else if (WARN_ON(HAS_PCH_SPLIT(dev)))
> > + limit = NULL;
> > else if (IS_G4X(dev)) {
> > limit = intel_g4x_limit(crtc_state);
> > } else if (IS_PINEVIEW(dev)) {
> I'm curious, when is intel_limits_bxt ever used? Seems like dead code..
>
> It would appear it uses haswell_crtc_compute_clock, which never calls into
> intel_limit().
It is called from bxt_find_best_dpll(), which is called form the broxton shared
dpll code. I just wrote a patch this morning to make that function reference
intel_limits_bxt directly. I want to get rid of intel_limit() altogether if
possible, since those if-ladders get confusing really fast.
Ander
_______________________________________________
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-14 11:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 8:55 [PATCH 0/8] Clean up ironlake clock computation code Ander Conselvan de Oliveira
2016-03-14 8:55 ` [PATCH 1/8] drm/i915: Remove checks for clone config with LVDS in ILK+ dpll code Ander Conselvan de Oliveira
2016-03-14 13:51 ` Ville Syrjälä
2016-03-14 13:55 ` Conselvan De Oliveira, Ander
2016-03-14 14:02 ` Ville Syrjälä
2016-03-14 8:55 ` [PATCH 2/8] drm/i915: Merge ironlake_get_refclk() into its only caller Ander Conselvan de Oliveira
2016-03-14 13:55 ` Ville Syrjälä
2016-03-14 14:02 ` Conselvan De Oliveira, Ander
2016-03-14 8:55 ` [PATCH 3/8] drm/i915: Fold intel_ironlake_limit() into clock computation function Ander Conselvan de Oliveira
2016-03-14 11:46 ` Maarten Lankhorst
2016-03-14 11:53 ` Ander Conselvan De Oliveira [this message]
2016-03-14 11:59 ` Maarten Lankhorst
2016-03-14 8:55 ` [PATCH 4/8] drm/i915: Call g4x_find_best_dpll() directly from ILK+ code Ander Conselvan de Oliveira
2016-03-14 8:55 ` [PATCH 5/8] drm/i915: Simplify ironlake reduced clock logic a bit Ander Conselvan de Oliveira
2016-03-14 8:55 ` [PATCH 6/8] drm/i915: Don't calculate a new clock in ILK+ code if it is already set Ander Conselvan de Oliveira
2016-03-14 11:51 ` Maarten Lankhorst
2016-03-14 13:01 ` Ander Conselvan De Oliveira
2016-03-14 13:15 ` Maarten Lankhorst
2016-03-14 8:55 ` [PATCH 7/8] drm/i915: Remove PCH type checks from ironlake_crtc_compute_clock() Ander Conselvan de Oliveira
2016-03-14 8:55 ` [PATCH 8/8] drm/i915: Simplify ironlake_crtc_compute_clock() CPU eDP case Ander Conselvan de Oliveira
2016-03-14 12:01 ` Maarten Lankhorst
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=1457956425.2711.5.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