From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 3/7] drm/i915: clear up the fdi dotclock semantics for M/N computation
Date: Sat, 1 Jun 2013 17:16:19 +0200 [thread overview]
Message-ID: <1370099783-20328-4-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1370099783-20328-1-git-send-email-daniel.vetter@ffwll.ch>
We currently mutliply the link_bw of the fdi link with the pixel
multiplier, which is wrong: The FDI link doesn't suddenly grow more
bandwidth. In reality the pixel mutliplication only happens in the PCH,
before the pixels are fed into the port.
But since we our code treats the uses the target clock after pixels
are doubled (tripled, ...) already, we need to correct this.
Semantically it's clearer to divide the target clock to get the fdi
dotclock instead of multiplying the bw, so do that instead.
Note that the target clock is already multiplied by the same factor,
so the division will never loose accuracy for the M/N computation.
The lane computation otoh used the wrong value, we also need to feed
the fdi dotclock to that.
Split out on a request from Paulo Zanoni.
v2: Also fix the lane computation.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_display.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index a29295e..761254d 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3992,7 +3992,7 @@ static int ironlake_fdi_compute_config(struct intel_crtc *intel_crtc,
{
struct drm_device *dev = intel_crtc->base.dev;
struct drm_display_mode *adjusted_mode = &pipe_config->adjusted_mode;
- int target_clock, lane, link_bw;
+ int target_clock, lane, link_bw, fdi_dotclock;
bool setup_ok, needs_recompute = false;
retry:
@@ -4010,14 +4010,16 @@ retry:
else
target_clock = adjusted_mode->clock;
- lane = ironlake_get_lanes_required(target_clock, link_bw,
+ fdi_dotclock = target_clock;
+ if (pipe_config->pixel_multiplier > 1)
+ fdi_dotclock /= pipe_config->pixel_multiplier;
+
+ lane = ironlake_get_lanes_required(fdi_dotclock, link_bw,
pipe_config->pipe_bpp);
pipe_config->fdi_lanes = lane;
- if (pipe_config->pixel_multiplier > 1)
- link_bw *= pipe_config->pixel_multiplier;
- intel_link_compute_m_n(pipe_config->pipe_bpp, lane, target_clock,
+ intel_link_compute_m_n(pipe_config->pipe_bpp, lane, fdi_dotclock,
link_bw, &pipe_config->fdi_m_n);
setup_ok = ironlake_check_fdi_lanes(intel_crtc->base.dev,
--
1.7.11.7
next prev parent reply other threads:[~2013-06-01 15:16 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-01 15:16 [PATCH 0/7] adjusted mode rework and assorted patches Daniel Vetter
2013-06-01 15:16 ` [PATCH 1/7] drm/i915: split out intel_pnv_find_best_PLL Daniel Vetter
2013-06-03 14:16 ` Paulo Zanoni
2013-06-03 18:26 ` Daniel Vetter
2013-06-01 15:16 ` [PATCH 2/7] drm/i915: move find_pll callback to dev_priv->display Daniel Vetter
2013-06-03 14:35 ` Paulo Zanoni
2013-06-03 18:36 ` Daniel Vetter
2013-06-03 18:56 ` [PATCH 1/2] " Daniel Vetter
2013-06-03 18:56 ` [PATCH 2/2] drm/i915: fold in IS_PNV checks from the split up find_dpll functions Daniel Vetter
2013-06-03 21:28 ` Paulo Zanoni
2013-06-03 19:22 ` [PATCH] drm/i915: move find_pll callback to dev_priv->display Daniel Vetter
2013-06-03 20:40 ` Daniel Vetter
2013-06-03 21:26 ` Paulo Zanoni
2013-06-01 15:16 ` Daniel Vetter [this message]
2013-06-03 15:59 ` [PATCH 3/7] drm/i915: clear up the fdi dotclock semantics for M/N computation Paulo Zanoni
2013-06-03 16:39 ` Paulo Zanoni
2013-06-03 18:28 ` Daniel Vetter
2013-06-01 15:16 ` [PATCH 4/7] drm/i915: refactor cpu eDP PLL handling a bit Daniel Vetter
2013-06-03 16:14 ` Paulo Zanoni
2013-06-01 15:16 ` [PATCH 5/7] drm/i915: store adjusted dotclock in adjusted_mode->clock Daniel Vetter
2013-06-03 16:54 ` Paulo Zanoni
2013-06-03 16:56 ` Paulo Zanoni
2013-06-04 12:01 ` Daniel Vetter
2013-06-01 15:16 ` [PATCH 6/7] drm/i915: Drop some no longer required mode/adjusted_mode parameters Daniel Vetter
2013-06-03 17:00 ` Paulo Zanoni
2013-06-01 15:16 ` [PATCH 7/7] drm/i915: check for strange pfit pipe assignemnt on ivb/hsw Daniel Vetter
2013-06-03 17:08 ` Paulo Zanoni
2013-06-04 12:08 ` Daniel Vetter
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=1370099783-20328-4-git-send-email-daniel.vetter@ffwll.ch \
--to=daniel.vetter@ffwll.ch \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox