From: Ville Syrjälä Date: Fri, 22 May 2015 08:22:34 +0000 (+0300) Subject: drm/i915: Warn when cdclk for the platforms is not known X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=623e01e53927b05e96781532bdb40536e833e276;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Warn when cdclk for the platforms is not known Print a warning if we fall through the .get_display_clock_speed() function pointer setup. We end up assuming a 133MHz cdclk which should mean that at least we avoid any 0 deivisions and whatnot. But this could at least help remind people that they have to provide this function for new platforms. v2: Rebased to the latest v3: Rebased to the latest Signed-off-by: Ville Syrjälä (v1) Signed-off-by: Mika Kahola Reviewed-by: Damien Lespiau Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9aa3c597e5cb..92f6ed3d3c16 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -14598,9 +14598,11 @@ static void intel_init_display(struct drm_device *dev) else if (IS_I85X(dev)) dev_priv->display.get_display_clock_speed = i85x_get_display_clock_speed; - else /* 830 */ + else { /* 830 */ + WARN(!IS_I830(dev), "Unknown platform. Assuming 133 MHz CDCLK\n"); dev_priv->display.get_display_clock_speed = i830_get_display_clock_speed; + } if (IS_GEN5(dev)) { dev_priv->display.fdi_link_train = ironlake_fdi_link_train;