提交 f49193cd 编写于 作者: I Imre Deak 提交者: Daniel Vetter

drm/i915/chv: Add unique power well ID for the pipe A power well

The power well IDs are used for lookup, so they must be unique on a
given platform; ensure this on CHV. This didn't cause an actual problem
since we didn't need to look up power wells which happened to share an
ID.

Mark this new power well as custom, since its programming pattern
doesn't follow that of the rest of VLV/CHV power wells.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: NImre Deak <imre.deak@intel.com>
Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1499352040-8819-2-git-send-email-imre.deak@intel.comSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 e79dfb51
...@@ -1077,6 +1077,8 @@ enum punit_power_well { ...@@ -1077,6 +1077,8 @@ enum punit_power_well {
PUNIT_POWER_WELL_DPIO_RX0 = 10, PUNIT_POWER_WELL_DPIO_RX0 = 10,
PUNIT_POWER_WELL_DPIO_RX1 = 11, PUNIT_POWER_WELL_DPIO_RX1 = 11,
PUNIT_POWER_WELL_DPIO_CMN_D = 12, PUNIT_POWER_WELL_DPIO_CMN_D = 12,
/* - custom power well */
CHV_DISP_PW_PIPE_A, /* 13 */
/* Not actual bit groups. Used as IDs for lookup_power_well() */ /* Not actual bit groups. Used as IDs for lookup_power_well() */
PUNIT_POWER_WELL_ALWAYS_ON, PUNIT_POWER_WELL_ALWAYS_ON,
......
...@@ -1672,7 +1672,7 @@ void chv_phy_powergate_lanes(struct intel_encoder *encoder, ...@@ -1672,7 +1672,7 @@ void chv_phy_powergate_lanes(struct intel_encoder *encoder,
static bool chv_pipe_power_well_enabled(struct drm_i915_private *dev_priv, static bool chv_pipe_power_well_enabled(struct drm_i915_private *dev_priv,
struct i915_power_well *power_well) struct i915_power_well *power_well)
{ {
enum pipe pipe = power_well->id; enum pipe pipe = PIPE_A;
bool enabled; bool enabled;
u32 state, ctrl; u32 state, ctrl;
...@@ -1702,7 +1702,7 @@ static void chv_set_pipe_power_well(struct drm_i915_private *dev_priv, ...@@ -1702,7 +1702,7 @@ static void chv_set_pipe_power_well(struct drm_i915_private *dev_priv,
struct i915_power_well *power_well, struct i915_power_well *power_well,
bool enable) bool enable)
{ {
enum pipe pipe = power_well->id; enum pipe pipe = PIPE_A;
u32 state; u32 state;
u32 ctrl; u32 ctrl;
...@@ -1735,7 +1735,7 @@ static void chv_set_pipe_power_well(struct drm_i915_private *dev_priv, ...@@ -1735,7 +1735,7 @@ static void chv_set_pipe_power_well(struct drm_i915_private *dev_priv,
static void chv_pipe_power_well_enable(struct drm_i915_private *dev_priv, static void chv_pipe_power_well_enable(struct drm_i915_private *dev_priv,
struct i915_power_well *power_well) struct i915_power_well *power_well)
{ {
WARN_ON_ONCE(power_well->id != PIPE_A); WARN_ON_ONCE(power_well->id != CHV_DISP_PW_PIPE_A);
chv_set_pipe_power_well(dev_priv, power_well, true); chv_set_pipe_power_well(dev_priv, power_well, true);
...@@ -1745,7 +1745,7 @@ static void chv_pipe_power_well_enable(struct drm_i915_private *dev_priv, ...@@ -1745,7 +1745,7 @@ static void chv_pipe_power_well_enable(struct drm_i915_private *dev_priv,
static void chv_pipe_power_well_disable(struct drm_i915_private *dev_priv, static void chv_pipe_power_well_disable(struct drm_i915_private *dev_priv,
struct i915_power_well *power_well) struct i915_power_well *power_well)
{ {
WARN_ON_ONCE(power_well->id != PIPE_A); WARN_ON_ONCE(power_well->id != CHV_DISP_PW_PIPE_A);
vlv_display_power_well_deinit(dev_priv); vlv_display_power_well_deinit(dev_priv);
...@@ -2184,7 +2184,7 @@ static struct i915_power_well chv_power_wells[] = { ...@@ -2184,7 +2184,7 @@ static struct i915_power_well chv_power_wells[] = {
* required for any pipe to work. * required for any pipe to work.
*/ */
.domains = CHV_DISPLAY_POWER_DOMAINS, .domains = CHV_DISPLAY_POWER_DOMAINS,
.id = PIPE_A, .id = CHV_DISP_PW_PIPE_A,
.ops = &chv_pipe_power_well_ops, .ops = &chv_pipe_power_well_ops,
}, },
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册