Commit 25c896bd authored by Chris Wilson's avatar Chris Wilson

drm/i915: Track the wakeref used to initialise display power domains

On module load and unload, we grab the POWER_DOMAIN_INIT powerwells and
transfer them to the runtime-pm code. We can use our wakeref tracking to
verify that the wakeref is indeed passed from init to enable, and
disable to fini; and across suspend.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190114142129.24398-17-chris@chris-wilson.co.uk
parent 0e6e0be4
...@@ -2699,6 +2699,9 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) ...@@ -2699,6 +2699,9 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
if (!HAS_RUNTIME_PM(dev_priv)) if (!HAS_RUNTIME_PM(dev_priv))
seq_puts(m, "Runtime power management not supported\n"); seq_puts(m, "Runtime power management not supported\n");
seq_printf(m, "Runtime power status: %s\n",
enableddisabled(!dev_priv->power_domains.wakeref));
seq_printf(m, "GPU idle: %s (epoch %u)\n", seq_printf(m, "GPU idle: %s (epoch %u)\n",
yesno(!dev_priv->gt.awake), dev_priv->gt.epoch); yesno(!dev_priv->gt.awake), dev_priv->gt.epoch);
seq_printf(m, "IRQs disabled: %s\n", seq_printf(m, "IRQs disabled: %s\n",
......
...@@ -822,6 +822,8 @@ struct i915_power_domains { ...@@ -822,6 +822,8 @@ struct i915_power_domains {
bool display_core_suspended; bool display_core_suspended;
int power_well_count; int power_well_count;
intel_wakeref_t wakeref;
struct mutex lock; struct mutex lock;
int domain_use_count[POWER_DOMAIN_NUM]; int domain_use_count[POWER_DOMAIN_NUM];
struct i915_power_well *power_wells; struct i915_power_well *power_wells;
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment