Commit 11b538cd authored by Jani Nikula's avatar Jani Nikula Committed by Imre Deak

drm/i915: use for_each_port_masked in bxt phy init for clarity

Make it easier to see which ports are configured for each phy. No
functional changes.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarAnder Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459496681-398-1-git-send-email-jani.nikula@intel.com
parent b61e7996
...@@ -1726,7 +1726,7 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv, ...@@ -1726,7 +1726,7 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv,
enum dpio_phy phy) enum dpio_phy phy)
{ {
enum port port; enum port port;
uint32_t val; u32 ports, val;
val = I915_READ(BXT_P_CR_GT_DISP_PWRON); val = I915_READ(BXT_P_CR_GT_DISP_PWRON);
val |= GT_DISPLAY_POWER_ON(phy); val |= GT_DISPLAY_POWER_ON(phy);
...@@ -1745,8 +1745,12 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv, ...@@ -1745,8 +1745,12 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv,
DRM_ERROR("timeout during PHY%d power on\n", phy); DRM_ERROR("timeout during PHY%d power on\n", phy);
} }
for (port = (phy == DPIO_PHY0 ? PORT_B : PORT_A); if (phy == DPIO_PHY0)
port <= (phy == DPIO_PHY0 ? PORT_C : PORT_A); port++) { ports = BIT(PORT_B) | BIT(PORT_C);
else
ports = BIT(PORT_A);
for_each_port_masked(port, ports) {
int lane; int lane;
for (lane = 0; lane < 4; lane++) { for (lane = 0; lane < 4; lane++) {
......
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