From: Ville Syrjälä Date: Fri, 6 Sep 2013 20:29:02 +0000 (+0300) Subject: drm/i915: Make intel_fuzzy_clock_check() take in arbitrary clocks X-Git-Tag: next-20130919~37^2~36 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3bd26263a9a0c4216d2a44e179265a9a05cda50f;p=karo-tx-linux.git drm/i915: Make intel_fuzzy_clock_check() take in arbitrary clocks We want to do fuzzy clock checks for other things besides adjusted_mode.clock, so just pass two two clocks to compare to intel_fuzzy_clock_check(). Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index a4f24346d0be..b8d409f5ead3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8584,13 +8584,9 @@ intel_modeset_update_state(struct drm_device *dev, unsigned prepare_pipes) } -static bool intel_fuzzy_clock_check(struct intel_crtc_config *cur, - struct intel_crtc_config *new) +static bool intel_fuzzy_clock_check(int clock1, int clock2) { - int clock1, clock2, diff; - - clock1 = cur->adjusted_mode.clock; - clock2 = new->adjusted_mode.clock; + int diff; if (clock1 == clock2) return true; @@ -8722,7 +8718,8 @@ intel_pipe_config_compare(struct drm_device *dev, #undef PIPE_CONF_QUIRK if (!IS_HASWELL(dev)) { - if (!intel_fuzzy_clock_check(current_config, pipe_config)) { + if (!intel_fuzzy_clock_check(current_config->adjusted_mode.clock, + pipe_config->adjusted_mode.clock)) { DRM_ERROR("mismatch in clock (expected %d, found %d)\n", current_config->adjusted_mode.clock, pipe_config->adjusted_mode.clock);