diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-09-06 23:28:59 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-09-13 14:52:00 +0200 |
commit | 3c52f4eb9335475b7336e2d9f42cd2d41b83fc97 (patch) | |
tree | 6f8a9958b8b50bf6f59f8185ad6fa1dd2931c73c /drivers/gpu/drm/i915/intel_display.c | |
parent | 1041a02f35c5f5a6c180a052281e7414d64bb04b (diff) | |
download | lwn-3c52f4eb9335475b7336e2d9f42cd2d41b83fc97.tar.gz lwn-3c52f4eb9335475b7336e2d9f42cd2d41b83fc97.zip |
drm/i915: Make adjusted_mode.clock non-pixel multiplied
It would be easier if adjusted_mode.clock would be the pipe pixel clock,
and it actually is, except for the cases where pixel_multiplier > 1.
So let's change intel_sdvo to use port_clock as the multiplied clock,
and then we can leave adjusted_mode.clock as pipe pixel clock.
v2: Improve port_clock documentation
Rebased on top of SDVO pixel_multiplier fixes
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 42b5fa16ec8b..f1b3d33320d1 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4061,7 +4061,6 @@ retry: link_bw = intel_fdi_link_freq(dev) * MHz(100)/KHz(1)/10; fdi_dotclock = adjusted_mode->clock; - fdi_dotclock /= pipe_config->pixel_multiplier; lane = ironlake_get_lanes_required(fdi_dotclock, link_bw, pipe_config->pipe_bpp); @@ -7370,8 +7369,7 @@ static void ironlake_crtc_clock_get(struct intel_crtc *crtc, clock = ((u64)link_m * (u64)link_freq); do_div(clock, link_n); - pipe_config->adjusted_mode.clock = clock * - pipe_config->pixel_multiplier; + pipe_config->adjusted_mode.clock = clock; } /** Returns the currently programmed mode of the given pipe. */ @@ -8316,7 +8314,8 @@ encoder_retry: /* Set default port clock if not overwritten by the encoder. Needs to be * done afterwards in case the encoder adjusts the mode. */ if (!pipe_config->port_clock) - pipe_config->port_clock = pipe_config->adjusted_mode.clock; + pipe_config->port_clock = pipe_config->adjusted_mode.clock * + pipe_config->pixel_multiplier; ret = intel_crtc_compute_config(to_intel_crtc(crtc), pipe_config); if (ret < 0) { |