Commit 3bd26263 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

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: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent eb14cb74
...@@ -8584,13 +8584,9 @@ intel_modeset_update_state(struct drm_device *dev, unsigned prepare_pipes) ...@@ -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, static bool intel_fuzzy_clock_check(int clock1, int clock2)
struct intel_crtc_config *new)
{ {
int clock1, clock2, diff; int diff;
clock1 = cur->adjusted_mode.clock;
clock2 = new->adjusted_mode.clock;
if (clock1 == clock2) if (clock1 == clock2)
return true; return true;
...@@ -8722,7 +8718,8 @@ intel_pipe_config_compare(struct drm_device *dev, ...@@ -8722,7 +8718,8 @@ intel_pipe_config_compare(struct drm_device *dev,
#undef PIPE_CONF_QUIRK #undef PIPE_CONF_QUIRK
if (!IS_HASWELL(dev)) { 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", DRM_ERROR("mismatch in clock (expected %d, found %d)\n",
current_config->adjusted_mode.clock, current_config->adjusted_mode.clock,
pipe_config->adjusted_mode.clock); pipe_config->adjusted_mode.clock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment