mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 11:11:26 +02:00
drm/i915: pass dev_priv explicitly to PP_DIVISOR
Avoid the implicit dev_priv local variable use, and pass dev_priv explicitly to the PP_DIVISOR register macro. Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/28e9f7e3570c15ac5c229048ec0def2e4a667ffc.1716806471.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
07776fb3c8
commit
b758cd8057
|
|
@ -173,7 +173,7 @@ static void intel_lvds_pps_get_hw_state(struct drm_i915_private *dev_priv,
|
|||
pps->t3 = REG_FIELD_GET(PANEL_POWER_DOWN_DELAY_MASK, val);
|
||||
pps->tx = REG_FIELD_GET(PANEL_LIGHT_OFF_DELAY_MASK, val);
|
||||
|
||||
val = intel_de_read(dev_priv, PP_DIVISOR(0));
|
||||
val = intel_de_read(dev_priv, PP_DIVISOR(dev_priv, 0));
|
||||
pps->divider = REG_FIELD_GET(PP_REFERENCE_DIVIDER_MASK, val);
|
||||
val = REG_FIELD_GET(PANEL_POWER_CYCLE_DELAY_MASK, val);
|
||||
/*
|
||||
|
|
@ -226,7 +226,7 @@ static void intel_lvds_pps_init_hw(struct drm_i915_private *dev_priv,
|
|||
REG_FIELD_PREP(PANEL_POWER_DOWN_DELAY_MASK, pps->t3) |
|
||||
REG_FIELD_PREP(PANEL_LIGHT_OFF_DELAY_MASK, pps->tx));
|
||||
|
||||
intel_de_write(dev_priv, PP_DIVISOR(0),
|
||||
intel_de_write(dev_priv, PP_DIVISOR(dev_priv, 0),
|
||||
REG_FIELD_PREP(PP_REFERENCE_DIVIDER_MASK, pps->divider) |
|
||||
REG_FIELD_PREP(PANEL_POWER_CYCLE_DELAY_MASK, DIV_ROUND_UP(pps->t4, 1000) + 1));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ static void intel_pps_get_registers(struct intel_dp *intel_dp,
|
|||
INTEL_PCH_TYPE(dev_priv) >= PCH_CNP)
|
||||
regs->pp_div = INVALID_MMIO_REG;
|
||||
else
|
||||
regs->pp_div = PP_DIVISOR(pps_idx);
|
||||
regs->pp_div = PP_DIVISOR(dev_priv, pps_idx);
|
||||
}
|
||||
|
||||
static i915_reg_t
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
#define PANEL_LIGHT_OFF_DELAY_MASK REG_GENMASK(12, 0)
|
||||
|
||||
#define _PP_DIVISOR 0x61210
|
||||
#define PP_DIVISOR(pps_idx) _MMIO_PPS(dev_priv, pps_idx, _PP_DIVISOR)
|
||||
#define PP_DIVISOR(dev_priv, pps_idx) _MMIO_PPS(dev_priv, pps_idx, _PP_DIVISOR)
|
||||
#define PP_REFERENCE_DIVIDER_MASK REG_GENMASK(31, 8)
|
||||
#define PANEL_POWER_CYCLE_DELAY_MASK REG_GENMASK(4, 0)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user