diff mbox

[v4,04/12] drm/i915: Warn when cdclk for the platforms is not known

Message ID 1432282962-3530-5-git-send-email-mika.kahola@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mika Kahola May 22, 2015, 8:22 a.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

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.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

v2: Rebased to the latest
v3: Rebased to the latest

Reviewed-by: Mika Kahola <mika.kahola@intel.com>

Author:    Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Lespiau, Damien May 28, 2015, 6:19 p.m. UTC | #1
On Fri, May 22, 2015 at 11:22:34AM +0300, Mika Kahola wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> v2: Rebased to the latest
> v3: Rebased to the latest
> 
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Daniel Vetter May 29, 2015, 7:57 a.m. UTC | #2
On Thu, May 28, 2015 at 07:19:51PM +0100, Damien Lespiau wrote:
> On Fri, May 22, 2015 at 11:22:34AM +0300, Mika Kahola wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > 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.
> > 
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > v2: Rebased to the latest
> > v3: Rebased to the latest
> > 
> > Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> 
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

Merged up to this one here, with the sob section of commit messages
aligned to what we usually do.

Thanks, Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 86c9140..de65737 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14398,9 +14398,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;