aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-09-02 15:54:37 -0400
committerKeith Packard <keithp@keithp.com>2011-10-20 18:26:42 -0400
commit27f8227b1e2b326a9a0995dd9c1f14893c61ee01 (patch)
tree2158d909c7e960fc84c97b79a5c1069b828e3512 /drivers/gpu
parent4c609cb890b13ef58e0c0cdd238993484e1b9b83 (diff)
drm/i915: support 3 pipes on IVB+
Well almost anyway. IVB has 3 planes, pipes, transcoders, and FDI interfaces, but only 2 pipe PLLs. So two of the pipes must use the same pipe timings (e.g. 2 DP plus one other, or two HDMI with the same mode and one other, etc.). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Tested-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Reviewed-By: Eugeni Dodonov <eugeni.dodonov@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c4
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h4
-rw-r--r--drivers/gpu/drm/i915/intel_display.c7
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c2
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c2
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c8
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c2
7 files changed, 20 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index d76da389f521..2eac955dee18 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -2035,7 +2035,9 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
2035 spin_lock_init(&dev_priv->error_lock); 2035 spin_lock_init(&dev_priv->error_lock);
2036 spin_lock_init(&dev_priv->rps_lock); 2036 spin_lock_init(&dev_priv->rps_lock);
2037 2037
2038 if (IS_MOBILE(dev) || !IS_GEN2(dev)) 2038 if (IS_IVYBRIDGE(dev))
2039 dev_priv->num_pipe = 3;
2040 else if (IS_MOBILE(dev) || !IS_GEN2(dev))
2039 dev_priv->num_pipe = 2; 2041 dev_priv->num_pipe = 2;
2040 else 2042 else
2041 dev_priv->num_pipe = 1; 2043 dev_priv->num_pipe = 1;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c02cdace744c..c5ca0d37f089 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -674,8 +674,8 @@ typedef struct drm_i915_private {
674 /* Panel fitter placement and size for Ironlake+ */ 674 /* Panel fitter placement and size for Ironlake+ */
675 u32 pch_pf_pos, pch_pf_size; 675 u32 pch_pf_pos, pch_pf_size;
676 676
677 struct drm_crtc *plane_to_crtc_mapping[2]; 677 struct drm_crtc *plane_to_crtc_mapping[3];
678 struct drm_crtc *pipe_to_crtc_mapping[2]; 678 struct drm_crtc *pipe_to_crtc_mapping[3];
679 wait_queue_head_t pending_flip_queue; 679 wait_queue_head_t pending_flip_queue;
680 bool flip_pending_is_done; 680 bool flip_pending_is_done;
681 681
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dade95ca0d86..6b1a1edeafef 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2092,6 +2092,7 @@ static int ironlake_update_plane(struct drm_crtc *crtc,
2092 switch (plane) { 2092 switch (plane) {
2093 case 0: 2093 case 0:
2094 case 1: 2094 case 1:
2095 case 2:
2095 break; 2096 break;
2096 default: 2097 default:
2097 DRM_ERROR("Can't update plane %d in SAREA\n", plane); 2098 DRM_ERROR("Can't update plane %d in SAREA\n", plane);
@@ -2191,6 +2192,10 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
2191 case 0: 2192 case 0:
2192 case 1: 2193 case 1:
2193 break; 2194 break;
2195 case 2:
2196 if (IS_IVYBRIDGE(dev))
2197 break;
2198 /* fall through otherwise */
2194 default: 2199 default:
2195 DRM_ERROR("no plane for crtc\n"); 2200 DRM_ERROR("no plane for crtc\n");
2196 return -EINVAL; 2201 return -EINVAL;
@@ -2889,6 +2894,8 @@ static void ironlake_pch_enable(struct drm_crtc *crtc)
2889 temp |= (TRANSA_DPLL_ENABLE | TRANSA_DPLLA_SEL); 2894 temp |= (TRANSA_DPLL_ENABLE | TRANSA_DPLLA_SEL);
2890 else if (pipe == 1 && (temp & TRANSB_DPLL_ENABLE) == 0) 2895 else if (pipe == 1 && (temp & TRANSB_DPLL_ENABLE) == 0)
2891 temp |= (TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL); 2896 temp |= (TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL);
2897 else if (pipe == 2 && (temp & TRANSC_DPLL_ENABLE) == 0)
2898 temp |= (TRANSC_DPLL_ENABLE | TRANSC_DPLLB_SEL);
2892 I915_WRITE(PCH_DPLL_SEL, temp); 2899 I915_WRITE(PCH_DPLL_SEL, temp);
2893 } 2900 }
2894 2901
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3d73374c20d1..3009d2aaaa3a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2215,7 +2215,7 @@ intel_dp_init(struct drm_device *dev, int output_reg)
2215 ironlake_panel_vdd_work); 2215 ironlake_panel_vdd_work);
2216 } 2216 }
2217 2217
2218 intel_encoder->crtc_mask = (1 << 0) | (1 << 1); 2218 intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
2219 connector->interlace_allowed = true; 2219 connector->interlace_allowed = true;
2220 connector->doublescan_allowed = 0; 2220 connector->doublescan_allowed = 0;
2221 2221
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 75026ba41a8e..185c5aa1bb25 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -514,7 +514,7 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
514 connector->polled = DRM_CONNECTOR_POLL_HPD; 514 connector->polled = DRM_CONNECTOR_POLL_HPD;
515 connector->interlace_allowed = 0; 515 connector->interlace_allowed = 0;
516 connector->doublescan_allowed = 0; 516 connector->doublescan_allowed = 0;
517 intel_encoder->crtc_mask = (1 << 0) | (1 << 1); 517 intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
518 518
519 /* Set up the DDC bus. */ 519 /* Set up the DDC bus. */
520 if (sdvox_reg == SDVOB) { 520 if (sdvox_reg == SDVOB) {
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 31da77f5c051..42f165a520de 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -888,9 +888,11 @@ bool intel_lvds_init(struct drm_device *dev)
888 intel_encoder->type = INTEL_OUTPUT_LVDS; 888 intel_encoder->type = INTEL_OUTPUT_LVDS;
889 889
890 intel_encoder->clone_mask = (1 << INTEL_LVDS_CLONE_BIT); 890 intel_encoder->clone_mask = (1 << INTEL_LVDS_CLONE_BIT);
891 intel_encoder->crtc_mask = (1 << 1); 891 if (HAS_PCH_SPLIT(dev))
892 if (INTEL_INFO(dev)->gen >= 5) 892 intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
893 intel_encoder->crtc_mask |= (1 << 0); 893 else
894 intel_encoder->crtc_mask = (1 << 1);
895
894 drm_encoder_helper_add(encoder, &intel_lvds_helper_funcs); 896 drm_encoder_helper_add(encoder, &intel_lvds_helper_funcs);
895 drm_connector_helper_add(connector, &intel_lvds_connector_helper_funcs); 897 drm_connector_helper_add(connector, &intel_lvds_connector_helper_funcs);
896 connector->display_info.subpixel_order = SubPixelHorizontalRGB; 898 connector->display_info.subpixel_order = SubPixelHorizontalRGB;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 1b97d1f48fb0..6db3b1ccb6eb 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2203,7 +2203,7 @@ intel_sdvo_output_setup(struct intel_sdvo *intel_sdvo, uint16_t flags)
2203 bytes[0], bytes[1]); 2203 bytes[0], bytes[1]);
2204 return false; 2204 return false;
2205 } 2205 }
2206 intel_sdvo->base.crtc_mask = (1 << 0) | (1 << 1); 2206 intel_sdvo->base.crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
2207 2207
2208 return true; 2208 return true;
2209} 2209}