From: Ville Syrjälä Date: Fri, 13 Jun 2014 10:37:53 +0000 (+0300) Subject: drm/i915: Warn if there's a cdclk change in progess X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d007f40596670c8fddfae583952b091b02cf0eb;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git drm/i915: Warn if there's a cdclk change in progess If someone is interested in the current cdclk frquency it should be stable and not in process of changing frquency. Warn if the current and requested cdclk don't match in .get_display_clock_spee() on vlv. 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 251a095acceb..ac3ee2cee4b6 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -5275,6 +5275,10 @@ static int valleyview_get_display_clock_speed(struct drm_device *dev) divider = val & DISPLAY_FREQUENCY_VALUES; + WARN((val & DISPLAY_FREQUENCY_STATUS) != + (divider << DISPLAY_FREQUENCY_STATUS_SHIFT), + "cdclk change in progress\n"); + return DIV_ROUND_CLOSEST(vco << 1, divider + 1); }