aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c21
-rw-r--r--include/drm/i915_powerwell.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 6463f0201cf2..409d62676854 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -6053,6 +6053,27 @@ int i915_release_power_well(void)
6053} 6053}
6054EXPORT_SYMBOL_GPL(i915_release_power_well); 6054EXPORT_SYMBOL_GPL(i915_release_power_well);
6055 6055
6056/*
6057 * Private interface for the audio driver to get CDCLK in kHz.
6058 *
6059 * Caller must request power well using i915_request_power_well() prior to
6060 * making the call.
6061 */
6062int i915_get_cdclk_freq(void)
6063{
6064 struct drm_i915_private *dev_priv;
6065
6066 if (!hsw_pwr)
6067 return -ENODEV;
6068
6069 dev_priv = container_of(hsw_pwr, struct drm_i915_private,
6070 power_domains);
6071
6072 return intel_ddi_get_cdclk_freq(dev_priv);
6073}
6074EXPORT_SYMBOL_GPL(i915_get_cdclk_freq);
6075
6076
6056#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1) 6077#define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1)
6057 6078
6058#define HSW_ALWAYS_ON_POWER_DOMAINS ( \ 6079#define HSW_ALWAYS_ON_POWER_DOMAINS ( \
diff --git a/include/drm/i915_powerwell.h b/include/drm/i915_powerwell.h
index 2baba9996094..baa6f11b1837 100644
--- a/include/drm/i915_powerwell.h
+++ b/include/drm/i915_powerwell.h
@@ -32,5 +32,6 @@
32/* For use by hda_i915 driver */ 32/* For use by hda_i915 driver */
33extern int i915_request_power_well(void); 33extern int i915_request_power_well(void);
34extern int i915_release_power_well(void); 34extern int i915_release_power_well(void);
35extern int i915_get_cdclk_freq(void);
35 36
36#endif /* _I915_POWERWELL_H_ */ 37#endif /* _I915_POWERWELL_H_ */