Commit ad8d270c authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

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: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f72d19f0
...@@ -84,15 +84,14 @@ static enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder) ...@@ -84,15 +84,14 @@ static enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
* in either FDI or DP modes only, as HDMI connections will work with both * in either FDI or DP modes only, as HDMI connections will work with both
* of those * of those
*/ */
static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port, static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port)
bool use_fdi_mode)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 reg; u32 reg;
int i; int i;
const u32 *ddi_translations = ((use_fdi_mode) ? const u32 *ddi_translations = (port == PORT_E) ?
hsw_ddi_translations_fdi : hsw_ddi_translations_fdi :
hsw_ddi_translations_dp); hsw_ddi_translations_dp;
for (i = 0, reg = DDI_BUF_TRANS(port); for (i = 0, reg = DDI_BUF_TRANS(port);
i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) { i < ARRAY_SIZE(hsw_ddi_translations_fdi); i++) {
...@@ -111,14 +110,8 @@ void intel_prepare_ddi(struct drm_device *dev) ...@@ -111,14 +110,8 @@ void intel_prepare_ddi(struct drm_device *dev)
if (!HAS_DDI(dev)) if (!HAS_DDI(dev))
return; return;
for (port = PORT_A; port < PORT_E; port++) for (port = PORT_A; port <= PORT_E; port++)
intel_prepare_ddi_buffers(dev, port, false); intel_prepare_ddi_buffers(dev, port);
/* DDI E is the suggested one to work in FDI mode, so program is as such
* by default. It will have to be re-programmed in case a digital DP
* output will be detected on it
*/
intel_prepare_ddi_buffers(dev, PORT_E, true);
} }
static const long hsw_ddi_buf_ctl_values[] = { static const long hsw_ddi_buf_ctl_values[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment