diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dsi.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dsi.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c index 3bc6213afd3e..0668bbec5028 100644 --- a/drivers/gpu/drm/i915/intel_dsi.c +++ b/drivers/gpu/drm/i915/intel_dsi.c | |||
@@ -340,7 +340,7 @@ static bool intel_dsi_compute_config(struct intel_encoder *encoder, | |||
340 | /* DSI uses short packets for sync events, so clear mode flags for DSI */ | 340 | /* DSI uses short packets for sync events, so clear mode flags for DSI */ |
341 | adjusted_mode->flags = 0; | 341 | adjusted_mode->flags = 0; |
342 | 342 | ||
343 | if (IS_BROXTON(dev_priv)) { | 343 | if (IS_GEN9_LP(dev_priv)) { |
344 | /* Dual link goes to DSI transcoder A. */ | 344 | /* Dual link goes to DSI transcoder A. */ |
345 | if (intel_dsi->ports == BIT(PORT_C)) | 345 | if (intel_dsi->ports == BIT(PORT_C)) |
346 | pipe_config->cpu_transcoder = TRANSCODER_DSI_C; | 346 | pipe_config->cpu_transcoder = TRANSCODER_DSI_C; |
@@ -441,7 +441,7 @@ static void intel_dsi_device_ready(struct intel_encoder *encoder) | |||
441 | 441 | ||
442 | if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) | 442 | if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) |
443 | vlv_dsi_device_ready(encoder); | 443 | vlv_dsi_device_ready(encoder); |
444 | else if (IS_BROXTON(dev_priv)) | 444 | else if (IS_GEN9_LP(dev_priv)) |
445 | bxt_dsi_device_ready(encoder); | 445 | bxt_dsi_device_ready(encoder); |
446 | } | 446 | } |
447 | 447 | ||
@@ -464,7 +464,7 @@ static void intel_dsi_port_enable(struct intel_encoder *encoder) | |||
464 | } | 464 | } |
465 | 465 | ||
466 | for_each_dsi_port(port, intel_dsi->ports) { | 466 | for_each_dsi_port(port, intel_dsi->ports) { |
467 | i915_reg_t port_ctrl = IS_BROXTON(dev_priv) ? | 467 | i915_reg_t port_ctrl = IS_GEN9_LP(dev_priv) ? |
468 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port); | 468 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port); |
469 | u32 temp; | 469 | u32 temp; |
470 | 470 | ||
@@ -497,7 +497,7 @@ static void intel_dsi_port_disable(struct intel_encoder *encoder) | |||
497 | enum port port; | 497 | enum port port; |
498 | 498 | ||
499 | for_each_dsi_port(port, intel_dsi->ports) { | 499 | for_each_dsi_port(port, intel_dsi->ports) { |
500 | i915_reg_t port_ctrl = IS_BROXTON(dev_priv) ? | 500 | i915_reg_t port_ctrl = IS_GEN9_LP(dev_priv) ? |
501 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port); | 501 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port); |
502 | u32 temp; | 502 | u32 temp; |
503 | 503 | ||
@@ -666,7 +666,7 @@ static void intel_dsi_clear_device_ready(struct intel_encoder *encoder) | |||
666 | DRM_DEBUG_KMS("\n"); | 666 | DRM_DEBUG_KMS("\n"); |
667 | for_each_dsi_port(port, intel_dsi->ports) { | 667 | for_each_dsi_port(port, intel_dsi->ports) { |
668 | /* Common bit for both MIPI Port A & MIPI Port C on VLV/CHV */ | 668 | /* Common bit for both MIPI Port A & MIPI Port C on VLV/CHV */ |
669 | i915_reg_t port_ctrl = IS_BROXTON(dev_priv) ? | 669 | i915_reg_t port_ctrl = IS_GEN9_LP(dev_priv) ? |
670 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(PORT_A); | 670 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(PORT_A); |
671 | u32 val; | 671 | u32 val; |
672 | 672 | ||
@@ -758,12 +758,12 @@ static bool intel_dsi_get_hw_state(struct intel_encoder *encoder, | |||
758 | * configuration, otherwise accessing DSI registers will hang the | 758 | * configuration, otherwise accessing DSI registers will hang the |
759 | * machine. See BSpec North Display Engine registers/MIPI[BXT]. | 759 | * machine. See BSpec North Display Engine registers/MIPI[BXT]. |
760 | */ | 760 | */ |
761 | if (IS_BROXTON(dev_priv) && !intel_dsi_pll_is_enabled(dev_priv)) | 761 | if (IS_GEN9_LP(dev_priv) && !intel_dsi_pll_is_enabled(dev_priv)) |
762 | goto out_put_power; | 762 | goto out_put_power; |
763 | 763 | ||
764 | /* XXX: this only works for one DSI output */ | 764 | /* XXX: this only works for one DSI output */ |
765 | for_each_dsi_port(port, intel_dsi->ports) { | 765 | for_each_dsi_port(port, intel_dsi->ports) { |
766 | i915_reg_t ctrl_reg = IS_BROXTON(dev_priv) ? | 766 | i915_reg_t ctrl_reg = IS_GEN9_LP(dev_priv) ? |
767 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port); | 767 | BXT_MIPI_PORT_CTRL(port) : MIPI_PORT_CTRL(port); |
768 | bool enabled = I915_READ(ctrl_reg) & DPI_ENABLE; | 768 | bool enabled = I915_READ(ctrl_reg) & DPI_ENABLE; |
769 | 769 | ||
@@ -788,7 +788,7 @@ static bool intel_dsi_get_hw_state(struct intel_encoder *encoder, | |||
788 | if (!(I915_READ(MIPI_DEVICE_READY(port)) & DEVICE_READY)) | 788 | if (!(I915_READ(MIPI_DEVICE_READY(port)) & DEVICE_READY)) |
789 | continue; | 789 | continue; |
790 | 790 | ||
791 | if (IS_BROXTON(dev_priv)) { | 791 | if (IS_GEN9_LP(dev_priv)) { |
792 | u32 tmp = I915_READ(MIPI_CTRL(port)); | 792 | u32 tmp = I915_READ(MIPI_CTRL(port)); |
793 | tmp &= BXT_PIPE_SELECT_MASK; | 793 | tmp &= BXT_PIPE_SELECT_MASK; |
794 | tmp >>= BXT_PIPE_SELECT_SHIFT; | 794 | tmp >>= BXT_PIPE_SELECT_SHIFT; |
@@ -976,7 +976,7 @@ static void intel_dsi_get_config(struct intel_encoder *encoder, | |||
976 | u32 pclk; | 976 | u32 pclk; |
977 | DRM_DEBUG_KMS("\n"); | 977 | DRM_DEBUG_KMS("\n"); |
978 | 978 | ||
979 | if (IS_BROXTON(dev_priv)) | 979 | if (IS_GEN9_LP(dev_priv)) |
980 | bxt_dsi_get_pipe_config(encoder, pipe_config); | 980 | bxt_dsi_get_pipe_config(encoder, pipe_config); |
981 | 981 | ||
982 | pclk = intel_dsi_get_pclk(encoder, pipe_config->pipe_bpp, | 982 | pclk = intel_dsi_get_pclk(encoder, pipe_config->pipe_bpp, |
@@ -1068,7 +1068,7 @@ static void set_dsi_timings(struct drm_encoder *encoder, | |||
1068 | hbp = txbyteclkhs(hbp, bpp, lane_count, intel_dsi->burst_mode_ratio); | 1068 | hbp = txbyteclkhs(hbp, bpp, lane_count, intel_dsi->burst_mode_ratio); |
1069 | 1069 | ||
1070 | for_each_dsi_port(port, intel_dsi->ports) { | 1070 | for_each_dsi_port(port, intel_dsi->ports) { |
1071 | if (IS_BROXTON(dev_priv)) { | 1071 | if (IS_GEN9_LP(dev_priv)) { |
1072 | /* | 1072 | /* |
1073 | * Program hdisplay and vdisplay on MIPI transcoder. | 1073 | * Program hdisplay and vdisplay on MIPI transcoder. |
1074 | * This is different from calculated hactive and | 1074 | * This is different from calculated hactive and |
@@ -1155,7 +1155,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder, | |||
1155 | tmp &= ~READ_REQUEST_PRIORITY_MASK; | 1155 | tmp &= ~READ_REQUEST_PRIORITY_MASK; |
1156 | I915_WRITE(MIPI_CTRL(port), tmp | | 1156 | I915_WRITE(MIPI_CTRL(port), tmp | |
1157 | READ_REQUEST_PRIORITY_HIGH); | 1157 | READ_REQUEST_PRIORITY_HIGH); |
1158 | } else if (IS_BROXTON(dev_priv)) { | 1158 | } else if (IS_GEN9_LP(dev_priv)) { |
1159 | enum pipe pipe = intel_crtc->pipe; | 1159 | enum pipe pipe = intel_crtc->pipe; |
1160 | 1160 | ||
1161 | tmp = I915_READ(MIPI_CTRL(port)); | 1161 | tmp = I915_READ(MIPI_CTRL(port)); |
@@ -1193,7 +1193,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder, | |||
1193 | if (intel_dsi->clock_stop) | 1193 | if (intel_dsi->clock_stop) |
1194 | tmp |= CLOCKSTOP; | 1194 | tmp |= CLOCKSTOP; |
1195 | 1195 | ||
1196 | if (IS_BROXTON(dev_priv)) { | 1196 | if (IS_GEN9_LP(dev_priv)) { |
1197 | tmp |= BXT_DPHY_DEFEATURE_EN; | 1197 | tmp |= BXT_DPHY_DEFEATURE_EN; |
1198 | if (!is_cmd_mode(intel_dsi)) | 1198 | if (!is_cmd_mode(intel_dsi)) |
1199 | tmp |= BXT_DEFEATURE_DPI_FIFO_CTR; | 1199 | tmp |= BXT_DEFEATURE_DPI_FIFO_CTR; |
@@ -1244,7 +1244,7 @@ static void intel_dsi_prepare(struct intel_encoder *intel_encoder, | |||
1244 | I915_WRITE(MIPI_INIT_COUNT(port), | 1244 | I915_WRITE(MIPI_INIT_COUNT(port), |
1245 | txclkesc(intel_dsi->escape_clk_div, 100)); | 1245 | txclkesc(intel_dsi->escape_clk_div, 100)); |
1246 | 1246 | ||
1247 | if (IS_BROXTON(dev_priv) && (!intel_dsi->dual_link)) { | 1247 | if (IS_GEN9_LP(dev_priv) && (!intel_dsi->dual_link)) { |
1248 | /* | 1248 | /* |
1249 | * BXT spec says write MIPI_INIT_COUNT for | 1249 | * BXT spec says write MIPI_INIT_COUNT for |
1250 | * both the ports, even if only one is | 1250 | * both the ports, even if only one is |
@@ -1454,7 +1454,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv) | |||
1454 | 1454 | ||
1455 | if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { | 1455 | if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { |
1456 | dev_priv->mipi_mmio_base = VLV_MIPI_BASE; | 1456 | dev_priv->mipi_mmio_base = VLV_MIPI_BASE; |
1457 | } else if (IS_BROXTON(dev_priv)) { | 1457 | } else if (IS_GEN9_LP(dev_priv)) { |
1458 | dev_priv->mipi_mmio_base = BXT_MIPI_BASE; | 1458 | dev_priv->mipi_mmio_base = BXT_MIPI_BASE; |
1459 | } else { | 1459 | } else { |
1460 | DRM_ERROR("Unsupported Mipi device to reg base"); | 1460 | DRM_ERROR("Unsupported Mipi device to reg base"); |
@@ -1495,7 +1495,7 @@ void intel_dsi_init(struct drm_i915_private *dev_priv) | |||
1495 | * On BYT/CHV, pipe A maps to MIPI DSI port A, pipe B maps to MIPI DSI | 1495 | * On BYT/CHV, pipe A maps to MIPI DSI port A, pipe B maps to MIPI DSI |
1496 | * port C. BXT isn't limited like this. | 1496 | * port C. BXT isn't limited like this. |
1497 | */ | 1497 | */ |
1498 | if (IS_BROXTON(dev_priv)) | 1498 | if (IS_GEN9_LP(dev_priv)) |
1499 | intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C); | 1499 | intel_encoder->crtc_mask = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C); |
1500 | else if (port == PORT_A) | 1500 | else if (port == PORT_A) |
1501 | intel_encoder->crtc_mask = BIT(PIPE_A); | 1501 | intel_encoder->crtc_mask = BIT(PIPE_A); |