aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_runtime_pm.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2015-01-08 10:54:18 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-11 20:48:24 -0500
commitfcf3aac5fc307f0cae429f5844ddc25761662858 (patch)
tree3946c0ec1d887e6afc275a4bdd20a1285c1771fc /drivers/gpu/drm/i915/intel_runtime_pm.c
parentd7055bd653e00ef40a07065d1c94380240314c48 (diff)
drm/i915: remove unused power_well/get_cdclk_freq api
After switching to using the component interface this API isn't needed any more. v2-3: unchanged v4: - move the removal of i915_powerwell.h to this patch (Takashi) Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_runtime_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_runtime_pm.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index ac6da7102fbb..39ddf40171bf 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -31,7 +31,6 @@
31 31
32#include "i915_drv.h" 32#include "i915_drv.h"
33#include "intel_drv.h" 33#include "intel_drv.h"
34#include <drm/i915_powerwell.h>
35 34
36/** 35/**
37 * DOC: runtime pm 36 * DOC: runtime pm
@@ -50,8 +49,6 @@
50 * present for a given platform. 49 * present for a given platform.
51 */ 50 */
52 51
53static struct i915_power_domains *hsw_pwr;
54
55#define for_each_power_well(i, power_well, domain_mask, power_domains) \ 52#define for_each_power_well(i, power_well, domain_mask, power_domains) \
56 for (i = 0; \ 53 for (i = 0; \
57 i < (power_domains)->power_well_count && \ 54 i < (power_domains)->power_well_count && \
@@ -1071,10 +1068,8 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv)
1071 */ 1068 */
1072 if (IS_HASWELL(dev_priv->dev)) { 1069 if (IS_HASWELL(dev_priv->dev)) {
1073 set_power_wells(power_domains, hsw_power_wells); 1070 set_power_wells(power_domains, hsw_power_wells);
1074 hsw_pwr = power_domains;
1075 } else if (IS_BROADWELL(dev_priv->dev)) { 1071 } else if (IS_BROADWELL(dev_priv->dev)) {
1076 set_power_wells(power_domains, bdw_power_wells); 1072 set_power_wells(power_domains, bdw_power_wells);
1077 hsw_pwr = power_domains;
1078 } else if (IS_CHERRYVIEW(dev_priv->dev)) { 1073 } else if (IS_CHERRYVIEW(dev_priv->dev)) {
1079 set_power_wells(power_domains, chv_power_wells); 1074 set_power_wells(power_domains, chv_power_wells);
1080 } else if (IS_VALLEYVIEW(dev_priv->dev)) { 1075 } else if (IS_VALLEYVIEW(dev_priv->dev)) {
@@ -1118,8 +1113,6 @@ void intel_power_domains_fini(struct drm_i915_private *dev_priv)
1118 * the power well is not enabled, so just enable it in case 1113 * the power well is not enabled, so just enable it in case
1119 * we're going to unload/reload. */ 1114 * we're going to unload/reload. */
1120 intel_display_set_init_power(dev_priv, true); 1115 intel_display_set_init_power(dev_priv, true);
1121
1122 hsw_pwr = NULL;
1123} 1116}
1124 1117
1125static void intel_power_domains_resume(struct drm_i915_private *dev_priv) 1118static void intel_power_domains_resume(struct drm_i915_private *dev_priv)
@@ -1328,52 +1321,3 @@ void intel_runtime_pm_enable(struct drm_i915_private *dev_priv)
1328 pm_runtime_put_autosuspend(device); 1321 pm_runtime_put_autosuspend(device);
1329} 1322}
1330 1323
1331/* Display audio driver power well request */
1332int i915_request_power_well(void)
1333{
1334 struct drm_i915_private *dev_priv;
1335
1336 if (!hsw_pwr)
1337 return -ENODEV;
1338
1339 dev_priv = container_of(hsw_pwr, struct drm_i915_private,
1340 power_domains);
1341 intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
1342 return 0;
1343}
1344EXPORT_SYMBOL_GPL(i915_request_power_well);
1345
1346/* Display audio driver power well release */
1347int i915_release_power_well(void)
1348{
1349 struct drm_i915_private *dev_priv;
1350
1351 if (!hsw_pwr)
1352 return -ENODEV;
1353
1354 dev_priv = container_of(hsw_pwr, struct drm_i915_private,
1355 power_domains);
1356 intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO);
1357 return 0;
1358}
1359EXPORT_SYMBOL_GPL(i915_release_power_well);
1360
1361/*
1362 * Private interface for the audio driver to get CDCLK in kHz.
1363 *
1364 * Caller must request power well using i915_request_power_well() prior to
1365 * making the call.
1366 */
1367int i915_get_cdclk_freq(void)
1368{
1369 struct drm_i915_private *dev_priv;
1370
1371 if (!hsw_pwr)
1372 return -ENODEV;
1373
1374 dev_priv = container_of(hsw_pwr, struct drm_i915_private,
1375 power_domains);
1376
1377 return intel_ddi_get_cdclk_freq(dev_priv);
1378}
1379EXPORT_SYMBOL_GPL(i915_get_cdclk_freq);