Skip to content

Commit

Permalink
drm/i915: Make intel_fuzzy_clock_check() take in arbitrary clocks
Browse files Browse the repository at this point in the history
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 <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Ville Syrjälä authored and Daniel Vetter committed Sep 13, 2013
1 parent eb14cb7 commit 3bd2626
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 3bd2626

Please sign in to comment.