summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorDamien Lespiau2014-08-04 16:04:43 +0200
committerDaniel Vetter2015-04-16 11:42:39 +0200
commitce3b7e9bcfdc2d255d9ab1a0e1f76d8b0912b8a4 (patch)
tree578d349352c0151617a403678818b6da8e2717ab /drivers/gpu/drm/i915
parentdrm/i915: Iterate through the initialized DDIs to prepare their buffers (diff)
downloadkernel-qcow2-linux-ce3b7e9bcfdc2d255d9ab1a0e1f76d8b0912b8a4.tar.gz
kernel-qcow2-linux-ce3b7e9bcfdc2d255d9ab1a0e1f76d8b0912b8a4.tar.xz
kernel-qcow2-linux-ce3b7e9bcfdc2d255d9ab1a0e1f76d8b0912b8a4.zip
drm/i915: Don't write the HDMI buffer translation entry when not needed
We don't actually need to write the HDMI entry on DDIs that have no chance to be used as HDMI ports. While this patch shouldn't change the current behaviour, it makes further enabling work easier as we'll have an eDP table filling the full 10 entries. v2: Rely on the logic from intel_ddi_init() to figure out if the DDI port supports HDMI or not (Paulo). Suggested-by: Satheeshakrishna M <satheeshakrishna.m@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index e0b618851a53..43b38d76761c 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -191,6 +191,12 @@ enum port intel_ddi_get_encoder_port(struct intel_encoder *intel_encoder)
}
}
+static bool
+intel_dig_port_supports_hdmi(const struct intel_digital_port *intel_dig_port)
+{
+ return intel_dig_port->hdmi.hdmi_reg;
+}
+
/*
* Starting with Haswell, DDI port buffers must be programmed with correct
* values in advance. The buffer values are different for FDI and DP modes,
@@ -294,6 +300,9 @@ static void intel_prepare_ddi_buffers(struct drm_device *dev,
reg += 4;
}
+ if (!intel_dig_port_supports_hdmi(intel_dig_port))
+ return;
+
/* Choose a good default if VBT is badly populated */
if (hdmi_level == HDMI_LEVEL_SHIFT_UNKNOWN ||
hdmi_level >= n_hdmi_entries)