Commit fa96ed1f authored by Imre Deak's avatar Imre Deak

drm/i915: Remove special case for power well 1/MISC_IO state verification

Even though PW#1 and the MISC_IO power wells are managed by the
DMC firmware (toggled dynamically if conditions allow it) from the
driver's POV they are always on if the display core is initialized
(always restored by DMC to the enabled state after exiting from DC5/6
for instance b/c of MMIO access). Accordingly we can just mark them as
always-on and remove the special casing for them during state
verification (thus enabling verification for these power wells too).

Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181109145822.15446-3-imre.deak@intel.com
parent 285cf66d
...@@ -2358,6 +2358,7 @@ static const struct i915_power_well_desc skl_power_wells[] = { ...@@ -2358,6 +2358,7 @@ static const struct i915_power_well_desc skl_power_wells[] = {
{ {
.name = "power well 1", .name = "power well 1",
/* Handled by the DMC firmware */ /* Handled by the DMC firmware */
.always_on = true,
.domains = 0, .domains = 0,
.ops = &hsw_power_well_ops, .ops = &hsw_power_well_ops,
.id = SKL_DISP_PW_1, .id = SKL_DISP_PW_1,
...@@ -2370,6 +2371,7 @@ static const struct i915_power_well_desc skl_power_wells[] = { ...@@ -2370,6 +2371,7 @@ static const struct i915_power_well_desc skl_power_wells[] = {
{ {
.name = "MISC IO power well", .name = "MISC IO power well",
/* Handled by the DMC firmware */ /* Handled by the DMC firmware */
.always_on = true,
.domains = 0, .domains = 0,
.ops = &hsw_power_well_ops, .ops = &hsw_power_well_ops,
.id = SKL_DISP_PW_MISC_IO, .id = SKL_DISP_PW_MISC_IO,
...@@ -2449,6 +2451,8 @@ static const struct i915_power_well_desc bxt_power_wells[] = { ...@@ -2449,6 +2451,8 @@ static const struct i915_power_well_desc bxt_power_wells[] = {
}, },
{ {
.name = "power well 1", .name = "power well 1",
/* Handled by the DMC firmware */
.always_on = true,
.domains = 0, .domains = 0,
.ops = &hsw_power_well_ops, .ops = &hsw_power_well_ops,
.id = SKL_DISP_PW_1, .id = SKL_DISP_PW_1,
...@@ -2508,6 +2512,7 @@ static const struct i915_power_well_desc glk_power_wells[] = { ...@@ -2508,6 +2512,7 @@ static const struct i915_power_well_desc glk_power_wells[] = {
{ {
.name = "power well 1", .name = "power well 1",
/* Handled by the DMC firmware */ /* Handled by the DMC firmware */
.always_on = true,
.domains = 0, .domains = 0,
.ops = &hsw_power_well_ops, .ops = &hsw_power_well_ops,
.id = SKL_DISP_PW_1, .id = SKL_DISP_PW_1,
...@@ -2636,6 +2641,7 @@ static const struct i915_power_well_desc cnl_power_wells[] = { ...@@ -2636,6 +2641,7 @@ static const struct i915_power_well_desc cnl_power_wells[] = {
{ {
.name = "power well 1", .name = "power well 1",
/* Handled by the DMC firmware */ /* Handled by the DMC firmware */
.always_on = true,
.domains = 0, .domains = 0,
.ops = &hsw_power_well_ops, .ops = &hsw_power_well_ops,
.id = SKL_DISP_PW_1, .id = SKL_DISP_PW_1,
...@@ -2803,6 +2809,7 @@ static const struct i915_power_well_desc icl_power_wells[] = { ...@@ -2803,6 +2809,7 @@ static const struct i915_power_well_desc icl_power_wells[] = {
{ {
.name = "power well 1", .name = "power well 1",
/* Handled by the DMC firmware */ /* Handled by the DMC firmware */
.always_on = true,
.domains = 0, .domains = 0,
.ops = &hsw_power_well_ops, .ops = &hsw_power_well_ops,
.id = SKL_DISP_PW_1, .id = SKL_DISP_PW_1,
...@@ -3934,14 +3941,6 @@ static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv) ...@@ -3934,14 +3941,6 @@ static void intel_power_domains_verify_state(struct drm_i915_private *dev_priv)
int domains_count; int domains_count;
bool enabled; bool enabled;
/*
* Power wells not belonging to any domain (like the MISC_IO
* and PW1 power wells) are under FW control, so ignore them,
* since their state can change asynchronously.
*/
if (!power_well->desc->domains)
continue;
enabled = power_well->desc->ops->is_enabled(dev_priv, enabled = power_well->desc->ops->is_enabled(dev_priv,
power_well); power_well);
if ((power_well->count || power_well->desc->always_on) != if ((power_well->count || power_well->desc->always_on) !=
......
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