[PATCH] drm/i915: Don't write the HDMI buffer translation entries on eDP/FDI DDIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Suggested-by: Satheeshakrishna M <satheeshakrishna.m@xxxxxxxxx>
Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_ddi.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index ca1f9a8..95933b2 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -163,6 +163,7 @@ static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port)
 	const u32 *ddi_translations_edp;
 	const u32 *ddi_translations_hdmi;
 	const u32 *ddi_translations;
+	bool need_hdmi = false;
 
 	if (IS_BROADWELL(dev)) {
 		ddi_translations_fdi = bdw_ddi_translations_fdi;
@@ -195,12 +196,15 @@ static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port)
 	case PORT_B:
 	case PORT_C:
 		ddi_translations = ddi_translations_dp;
+		need_hdmi = true;
 		break;
 	case PORT_D:
 		if (intel_dp_is_edp(dev, PORT_D))
 			ddi_translations = ddi_translations_edp;
-		else
+		else {
 			ddi_translations = ddi_translations_dp;
+			need_hdmi = true;
+		}
 		break;
 	case PORT_E:
 		ddi_translations = ddi_translations_fdi;
@@ -215,6 +219,9 @@ static void intel_prepare_ddi_buffers(struct drm_device *dev, enum port port)
 		reg += 4;
 	}
 
+	if (!need_hdmi)
+		return;
+
 	/* Choose a good default if VBT is badly populated */
 	if (hdmi_level == HDMI_LEVEL_SHIFT_UNKNOWN ||
 	    hdmi_level >= n_hdmi_entries)
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux