aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-08-05 16:25:56 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-08-06 02:33:40 -0400
commitad8d270c21aa2f57f0cd578b1737f65c44c34b80 (patch)
tree28bdffda0a7a3a8461eb99e86dcf9afefc826fb7 /drivers/gpu
parentf72d19f069f8efaa535aacc719d23d469b0d9f18 (diff)
drm/i915: remove use_fdi_mode argument from intel_prepare_ddi_buffers
We set the mode based on the port, and we already pass the port as an argument. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index b6281d9e4d62..b8c096b4a1de 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -84,15 +84,14 @@ static enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
84 * in either FDI or DP modes only, as HDMI connections will work with both 84 * in either FDI or DP modes only, as HDMI connections will work with both
85 * of those 85 * of those
86 */ 86 */
87static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port, 87static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port)
88 bool use_fdi_mode)
89{ 88{
90 struct drm_i915_private *dev_priv = dev->dev_private; 89 struct drm_i915_private *dev_priv = dev->dev_private;
91 u32 reg; 90 u32 reg;
92 int i; 91 int i;
93 const u32 *ddi_translations = ((use_fdi_mode) ? 92 const u32 *ddi_translations = (port == PORT_E) ?
94 hsw_ddi_translations_fdi : 93 hsw_ddi_translations_fdi :
95 hsw_ddi_translations_dp); 94 hsw_ddi_translations_dp;
96 95
97 for (i = 0, reg = DDI_BUF_TRANS(port); 96 for (i = 0, reg = DDI_BUF_TRANS(port);
98 i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) { 97 i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
@@ -111,14 +110,8 @@ void intel_prepare_ddi(struct drm_device *dev)
111 if (!HAS_DDI(dev)) 110 if (!HAS_DDI(dev))
112 return; 111 return;
113 112
114 for (port = PORT_A; port < PORT_E; port++) 113 for (port = PORT_A; port <= PORT_E; port++)
115 intel_prepare_ddi_buffers(dev, port, false); 114 intel_prepare_ddi_buffers(dev, port);
116
117 /* DDI E is the suggested one to work in FDI mode, so program is as such
118 * by default. It will have to be re-programmed in case a digital DP
119 * output will be detected on it
120 */
121 intel_prepare_ddi_buffers(dev, PORT_E, true);
122} 115}
123 116
124static const long hsw_ddi_buf_ctl_values[] = { 117static const long hsw_ddi_buf_ctl_values[] = {