[PATCH 09/09] drm/i915: init DP instead of HDMI on port B

Paulo Zanoni
2012-06-29T19:04:57Z

This is needed if you want to test DisplayPort on Haswell, but this is
not the correct solution.

Not-signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

---
drivers/gpu/drm/i915/intel_ddi.c | 2 ++
1 file changed, 2 insertions(+)

This patch is equivalent to this one:
[PATCH 06/21] drm/i915: Hook DP init in ddi module

Just as I don't expect 06/21 be committed, I don't expect this one to
be committed. IMHO these patches should be used just for testing. You
can't test DP on Haswell if you don't have this patch.

What we really need to do is to either create a DP and an HDMI
connector for each port (and then try to properly detect what is
connected to the port, and this is not as easy on Haswell as it was on
previous gens) or we create a new "Digital" connector and use it
instead of the DP and HDMI ones...

The main diference between this patch and 06/21 is that this patch
calls intel_dp_init with DDI_BUF_CTL_B as an argument instead of using
PCH_DP_B. The intel_dp->output_reg will contain the value we pass in
this argument. PCH_DP_B does not exist on Haswell, so code using
intel_dp->output_reg will be writing to an inexistent register. If we
pass DDI_BUF_CTL_B to it, intel_dp->output_reg will point to the
actual DP register, so code writing to output_reg will be correct.

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 082b923..a6b84e5 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -249,6 +249,8 @@ void intel_ddi_init(struct drm_device *dev, enum port port)
break;
/* Assume that the ports B, C and D are working in HDMI mode for now */
case PORT_B:
+ intel_dp_init(dev, DDI_BUF_CTL_B);
+ break;
case PORT_C:
case PORT_D:
intel_hdmi_init(dev, DDI_BUF_CTL(port));
--
1.7.10.2