public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix regression after clock gating init split
@ 2011-05-27 13:44 Jason Stubbs
  2011-05-27 19:44 ` Keith Packard
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Stubbs @ 2011-05-27 13:44 UTC (permalink / raw)
  To: Jesse Barnes, Keith Packard; +Cc: linux-kernel

From: Jason Stubbs <jasonbstubbs@gmail.com>

In revision 6067aaeadb5b3df26f27ac827256b1ef01e674f5, the function
intel_enable_clock_gating is split up by device. drm_i915_display_funcs then
gained a function pointer called init_clock_gating that intel_init_display
sets to the appropriate function. However, there are some code paths, notably
IS_PINEVIEW(dev), where init_clock_gating is not set and not needed. Calling
it then fails. This patch fixes it by simply adding a null-pointer check.

Signed-off-by: Jason Stubbs <jasonbstubbs@gmail.com>
---
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f553ddf..6809339 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -7559,7 +7559,8 @@ void intel_init_clock_gating(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
-	dev_priv->display.init_clock_gating(dev);
+	if (dev_priv->display.init_clock_gating)
+		dev_priv->display.init_clock_gating(dev);
 
 	if (dev_priv->display.init_pch_clock_gating)
 		dev_priv->display.init_pch_clock_gating(dev);

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-05-31 16:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-27 13:44 [PATCH] drm/i915: fix regression after clock gating init split Jason Stubbs
2011-05-27 19:44 ` Keith Packard
2011-05-28  4:26   ` Jason Stubbs
2011-05-31 16:57     ` Jesse Barnes
2011-05-28  4:26   ` Jason Stubbs
2011-05-31 16:58     ` Jesse Barnes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox