aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-06-13 09:14:34 -0400
committerTakashi Iwai <tiwai@suse.de>2014-06-16 04:34:06 -0400
commit74b0c2d75fb4cc89173944e6d8f9eb47aca0c343 (patch)
treefa5d2e9b60d699e7d22e9f1b128f0299452e20a4 /drivers/gpu
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
drm/i915, HD-audio: Don't continue probing when nomodeset is given
When a machine is booted with nomodeset option, i915 driver skips the whole initialization. Meanwhile, HD-audio tries to bind wth i915 just by request_symbol() without knowing that the initialization was skipped, and eventually it hits WARN_ON() in i915_request_power_well() and i915_release_power_well() wrongly but still continues probing, even though it doesn't work at all. In this patch, both functions are changed to return an error in case of uninitialized state instead of WARN_ON(), so that HD-audio driver can give up HDMI controller initialization at the right time. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: <stable@vger.kernel.org> [3.15] Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index d1e53abec1b5..6463f0201cf2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -6024,30 +6024,32 @@ void intel_display_power_put(struct drm_i915_private *dev_priv,
6024static struct i915_power_domains *hsw_pwr; 6024static struct i915_power_domains *hsw_pwr;
6025 6025
6026/* Display audio driver power well request */ 6026/* Display audio driver power well request */
6027void i915_request_power_well(void) 6027int i915_request_power_well(void)
6028{ 6028{
6029 struct drm_i915_private *dev_priv; 6029 struct drm_i915_private *dev_priv;
6030 6030
6031 if (WARN_ON(!hsw_pwr)) 6031 if (!hsw_pwr)
6032 return; 6032 return -ENODEV;
6033 6033
6034 dev_priv = container_of(hsw_pwr, struct drm_i915_private, 6034 dev_priv = container_of(hsw_pwr, struct drm_i915_private,
6035 power_domains); 6035 power_domains);
6036 intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); 6036 intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
6037 return 0;
6037} 6038}
6038EXPORT_SYMBOL_GPL(i915_request_power_well); 6039EXPORT_SYMBOL_GPL(i915_request_power_well);
6039 6040
6040/* Display audio driver power well release */ 6041/* Display audio driver power well release */
6041void i915_release_power_well(void) 6042int i915_release_power_well(void)
6042{ 6043{
6043 struct drm_i915_private *dev_priv; 6044 struct drm_i915_private *dev_priv;
6044 6045
6045 if (WARN_ON(!hsw_pwr)) 6046 if (!hsw_pwr)
6046 return; 6047 return -ENODEV;
6047 6048
6048 dev_priv = container_of(hsw_pwr, struct drm_i915_private, 6049 dev_priv = container_of(hsw_pwr, struct drm_i915_private,
6049 power_domains); 6050 power_domains);
6050 intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO); 6051 intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO);
6052 return 0;
6051} 6053}
6052EXPORT_SYMBOL_GPL(i915_release_power_well); 6054EXPORT_SYMBOL_GPL(i915_release_power_well);
6053 6055