drm/i915: Warn when cdclk for the platforms is not known
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 22 May 2015 08:22:34 +0000 (11:22 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 29 May 2015 08:15:28 +0000 (10:15 +0200)
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ä <ville.syrjala@linux.intel.com> (v1)
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 9aa3c597e5cb1f7035ffd0e82841c37dd36ebf83..92f6ed3d3c16516fe2608b572f2efd9cf205ce45 100644 (file)
@@ -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;