From: Jani Nikula <jani.nikula@linux.intel.com>
To: ville.syrjala@linux.intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/8] drm/i915: Don't factor in pixel multplier when deriving dotclock from link clock and M/N values
Date: Wed, 04 Sep 2013 16:22:19 +0300 [thread overview]
Message-ID: <87eh94iuwk.fsf@intel.com> (raw)
In-Reply-To: <1378293292-30682-2-git-send-email-ville.syrjala@linux.intel.com>
On Wed, 04 Sep 2013, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We feed the non-multiplied clock to intel_link_compute_m_n(), so the
> opposite operation should use the same order of operations. So we just
> multiply by pixel_multiplier in the end now.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index d88057e..b45c6e6 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7340,20 +7340,18 @@ static void ironlake_crtc_clock_get(struct intel_crtc *crtc,
> struct drm_device *dev = crtc->base.dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> enum transcoder cpu_transcoder = pipe_config->cpu_transcoder;
> - int link_freq, repeat;
> + int link_freq;
> u64 clock;
> u32 link_m, link_n;
>
> - repeat = pipe_config->pixel_multiplier;
> -
> /*
> * The calculation for the data clock is:
> - * pixel_clock = ((m/n)*(link_clock * nr_lanes * repeat))/bpp
> + * pixel_clock = ((m/n)*(link_clock * nr_lanes))/bpp
> * But we want to avoid losing precison if possible, so:
> - * pixel_clock = ((m * link_clock * nr_lanes * repeat)/(n*bpp))
> + * pixel_clock = ((m * link_clock * nr_lanes)/(n*bpp))
> *
> * and the link clock is simpler:
> - * link_clock = (m * link_clock * repeat) / n
> + * link_clock = (m * link_clock) / n
> */
>
> /*
> @@ -7375,10 +7373,11 @@ static void ironlake_crtc_clock_get(struct intel_crtc *crtc,
> if (!link_m || !link_n)
> return;
>
> - clock = ((u64)link_m * (u64)link_freq * (u64)repeat);
> + clock = ((u64)link_m * (u64)link_freq);
> do_div(clock, link_n);
>
> - pipe_config->adjusted_mode.clock = clock;
> + pipe_config->adjusted_mode.clock = clock *
> + pipe_config->pixel_multiplier;
> }
>
> /** Returns the currently programmed mode of the given pipe. */
> --
> 1.8.1.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-09-04 13:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-04 11:14 [PATCH 0/8] drm/i915: adjusted_mode.clock vs. port_clock v2 ville.syrjala
2013-09-04 11:14 ` [PATCH 1/8] drm/i915: Don't factor in pixel multplier when deriving dotclock from link clock and M/N values ville.syrjala
2013-09-04 13:22 ` Jani Nikula [this message]
2013-09-04 11:14 ` [PATCH 2/8] drm/i915: Make adjusted_mode.clock non-pixel multiplied ville.syrjala
2013-09-04 11:14 ` [PATCH 3/8] drm/i915: Add support for pipe_bpp readout ville.syrjala
2013-09-06 13:18 ` [PATCH v2] " ville.syrjala
2013-09-04 11:14 ` [PATCH 4/8] drm/i915: Move i9xx_crtc_clock_get() and ironlake_crtc_clock_get() earlier ville.syrjala
2013-09-04 13:22 ` Jani Nikula
2013-09-04 11:14 ` [PATCH 5/8] drm/i915: Fix port_clock readout for SDVO and HDMI 12bpc cases ville.syrjala
2013-09-06 13:24 ` [PATCH] drm/i915: Fix issues caused from get_clock elimination ville.syrjala
2013-09-06 16:00 ` Daniel Vetter
2013-09-04 11:14 ` [PATCH 6/8] drm/i915: Make intel_fuzzy_clock_check() take in arbitrary clocks ville.syrjala
2013-09-04 11:14 ` [PATCH v2 7/8] drm/i915: Add PIPE_CONF_CHECK_CLOCK_FUZZY() ville.syrjala
2013-09-04 11:14 ` [PATCH v2 8/8] drm/i915: Add fuzzy clock check for port_clock ville.syrjala
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=87eh94iuwk.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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 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.