diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-11-14 12:45:34 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-11-17 15:00:00 +0200 |
commit | f70a68bc1d18b7af52d368b80d1d0fed747ef2a9 (patch) | |
tree | 1113605d101cd1d61eba6c6b9dbad11d4068fb27 /drivers/gpu/drm/i915/vlv_sideband.c | |
parent | 9fda18c2c32a42e6c9fb68893b9628d6a5319555 (diff) |
drm/i915: convert vlv_dpio_read()/write() from pipe to phy
vlv_dpio_read() and vlv_dpio_write() really operate on the phy, not
pipe. Passing the pipe instead of the phy as parameter is supposed to be
a convenience, but when the caller has the phy, it becomes an
inconvenience. See e.g. chv_dpio_cmn_power_well_enable() and
assert_chv_phy_powergate().
Figure out the phy in the callers, and pass phy to the dpio functions.
v2: retract one overzealous pipe->phy change (Ville)
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231114104534.4180144-3-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/vlv_sideband.c')
-rw-r--r-- | drivers/gpu/drm/i915/vlv_sideband.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/vlv_sideband.c b/drivers/gpu/drm/i915/vlv_sideband.c index f7df55217845..63a795876309 100644 --- a/drivers/gpu/drm/i915/vlv_sideband.c +++ b/drivers/gpu/drm/i915/vlv_sideband.c @@ -227,9 +227,8 @@ static u32 vlv_dpio_phy_iosf_port(struct drm_i915_private *i915, enum dpio_phy p return IOSF_PORT_DPIO; } -u32 vlv_dpio_read(struct drm_i915_private *i915, enum pipe pipe, int reg) +u32 vlv_dpio_read(struct drm_i915_private *i915, enum dpio_phy phy, int reg) { - enum dpio_phy phy = vlv_pipe_to_phy(pipe); u32 port = vlv_dpio_phy_iosf_port(i915, phy); u32 val = 0; @@ -240,16 +239,15 @@ u32 vlv_dpio_read(struct drm_i915_private *i915, enum pipe pipe, int reg) * so ideally we should check the register offset instead... */ drm_WARN(&i915->drm, val == 0xffffffff, - "DPIO read pipe %c reg 0x%x == 0x%x\n", - pipe_name(pipe), reg, val); + "DPIO PHY%d read reg 0x%x == 0x%x\n", + phy, reg, val); return val; } void vlv_dpio_write(struct drm_i915_private *i915, - enum pipe pipe, int reg, u32 val) + enum dpio_phy phy, int reg, u32 val) { - enum dpio_phy phy = vlv_pipe_to_phy(pipe); u32 port = vlv_dpio_phy_iosf_port(i915, phy); vlv_sideband_rw(i915, DPIO_DEVFN, port, SB_MWR_NP, reg, &val); |