diff options
author | Chon Ming Lee <chon.ming.lee@intel.com> | 2013-11-06 01:36:35 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-11 04:57:45 -0500 |
commit | e4607fcfb1cd5d869425e190a85f841fc910c4ca (patch) | |
tree | 6b7b542956709d4d656e8ed435fec3e0007c8cdf /drivers/gpu/drm/i915/intel_display.c | |
parent | 00fe639a56b40930bf27eabeef9a826344d8f4c4 (diff) |
drm/i915/vlv: Make the vlv_dpio_read/vlv_dpio_write more PHY centric
vlv_dpio_read/write should be describe more in PHY centric instead of
display controller centric.
Create a enum dpio_channel for channel index and enum dpio_phy for PHY
index. This should better to gather for upcoming platform.
v2: Rebase the code based on
drm/i915/vlv: Fix typo in the DPIO register define.
v3: Rename vlv_phy to dpio_phy_iosf_port and define additional macro
DPIO_PHY, and remove unrelated change. (Ville)
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Chon Ming Lee <chon.ming.lee@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index abf509ce5e26..752d83019f36 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1361,6 +1361,7 @@ static void intel_init_dpio(struct drm_device *dev) | |||
1361 | if (!IS_VALLEYVIEW(dev)) | 1361 | if (!IS_VALLEYVIEW(dev)) |
1362 | return; | 1362 | return; |
1363 | 1363 | ||
1364 | DPIO_PHY_IOSF_PORT(DPIO_PHY0) = IOSF_PORT_DPIO; | ||
1364 | /* | 1365 | /* |
1365 | * From VLV2A0_DP_eDP_DPIO_driver_vbios_notes_10.docx - | 1366 | * From VLV2A0_DP_eDP_DPIO_driver_vbios_notes_10.docx - |
1366 | * 6. De-assert cmn_reset/side_reset. Same as VLV X0. | 1367 | * 6. De-assert cmn_reset/side_reset. Same as VLV X0. |
@@ -1494,18 +1495,25 @@ static void vlv_disable_pll(struct drm_i915_private *dev_priv, enum pipe pipe) | |||
1494 | POSTING_READ(DPLL(pipe)); | 1495 | POSTING_READ(DPLL(pipe)); |
1495 | } | 1496 | } |
1496 | 1497 | ||
1497 | void vlv_wait_port_ready(struct drm_i915_private *dev_priv, int port) | 1498 | void vlv_wait_port_ready(struct drm_i915_private *dev_priv, |
1499 | struct intel_digital_port *dport) | ||
1498 | { | 1500 | { |
1499 | u32 port_mask; | 1501 | u32 port_mask; |
1500 | 1502 | ||
1501 | if (!port) | 1503 | switch (dport->port) { |
1504 | case PORT_B: | ||
1502 | port_mask = DPLL_PORTB_READY_MASK; | 1505 | port_mask = DPLL_PORTB_READY_MASK; |
1503 | else | 1506 | break; |
1507 | case PORT_C: | ||
1504 | port_mask = DPLL_PORTC_READY_MASK; | 1508 | port_mask = DPLL_PORTC_READY_MASK; |
1509 | break; | ||
1510 | default: | ||
1511 | BUG(); | ||
1512 | } | ||
1505 | 1513 | ||
1506 | if (wait_for((I915_READ(DPLL(0)) & port_mask) == 0, 1000)) | 1514 | if (wait_for((I915_READ(DPLL(0)) & port_mask) == 0, 1000)) |
1507 | WARN(1, "timed out waiting for port %c ready: 0x%08x\n", | 1515 | WARN(1, "timed out waiting for port %c ready: 0x%08x\n", |
1508 | 'B' + port, I915_READ(DPLL(0))); | 1516 | 'B' + dport->port, I915_READ(DPLL(0))); |
1509 | } | 1517 | } |
1510 | 1518 | ||
1511 | /** | 1519 | /** |