[PATCH 02/21] drm/i915: Add support for DDI control DP outputs

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

 



From: Shobhit Kumar <shobhit.kumar at intel.com>

These are driven by DDIs on Haswell architecture, so we need to keep
track of which DDI is being used on each output.

Signed-off-by: Shobhit Kumar <shobhit.kumar at intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
Signed-off-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c  | 10 +++++++---
 drivers/gpu/drm/i915/intel_drv.h |  1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 65280a0a..e324c7a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2458,12 +2458,16 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 
 	connector->polled = DRM_CONNECTOR_POLL_HPD;
 
-	if (output_reg == DP_B || output_reg == PCH_DP_B)
+	if (output_reg == DP_B || output_reg == PCH_DP_B) {
 		intel_encoder->clone_mask = (1 << INTEL_DP_B_CLONE_BIT);
-	else if (output_reg == DP_C || output_reg == PCH_DP_C)
+		intel_dp->ddi_port = PORT_B;
+	} else if (output_reg == DP_C || output_reg == PCH_DP_C) {
 		intel_encoder->clone_mask = (1 << INTEL_DP_C_CLONE_BIT);
-	else if (output_reg == DP_D || output_reg == PCH_DP_D)
+		intel_dp->ddi_port = PORT_C;
+	} else if (output_reg == DP_D || output_reg == PCH_DP_D) {
 		intel_encoder->clone_mask = (1 << INTEL_DP_D_CLONE_BIT);
+		intel_dp->ddi_port = PORT_D;
+	}
 
 	if (is_edp(intel_dp)) {
 		intel_encoder->clone_mask = (1 << INTEL_EDP_CLONE_BIT);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 4047b68..7cffb12 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -319,6 +319,7 @@ struct intel_dp {
 	uint8_t  link_configuration[DP_LINK_CONFIGURATION_SIZE];
 	bool has_audio;
 	enum hdmi_force_audio force_audio;
+	int ddi_port;
 	uint32_t color_range;
 	int dpms_mode;
 	uint8_t link_bw;
-- 
1.7.11.1



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