Skip to content

Commit

Permalink
drm/i915: use for_each_port_masked in bxt phy init for clarity
Browse files Browse the repository at this point in the history
Make it easier to see which ports are configured for each phy. No
functional changes.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459496681-398-1-git-send-email-jani.nikula@intel.com
  • Loading branch information
Jani Nikula authored and Imre Deak committed Apr 1, 2016
1 parent b61e799 commit 11b538c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/i915/intel_ddi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1726,7 +1726,7 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv,
enum dpio_phy phy)
{
enum port port;
uint32_t val;
u32 ports, val;

val = I915_READ(BXT_P_CR_GT_DISP_PWRON);
val |= GT_DISPLAY_POWER_ON(phy);
Expand All @@ -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);
}

for (port = (phy == DPIO_PHY0 ? PORT_B : PORT_A);
port <= (phy == DPIO_PHY0 ? PORT_C : PORT_A); port++) {
if (phy == DPIO_PHY0)
ports = BIT(PORT_B) | BIT(PORT_C);
else
ports = BIT(PORT_A);

for_each_port_masked(port, ports) {
int lane;

for (lane = 0; lane < 4; lane++) {
Expand Down

0 comments on commit 11b538c

Please sign in to comment.