[PATCH v3 05/12] drm: Read DPCD receiver capability for DP++

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

 



Read from DPCD receiver capability field for the
DP++ devices. The features are

 - max TMDS charachter clock
 - max bits per component
 - support for conversion from 3D frame sequential to
   frame pack

Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx>
---
 drivers/gpu/drm/drm_dp_helper.c |  4 ++++
 include/drm/drm_dp_helper.h     | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index ccd0fcb..f98e4be 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -464,6 +464,10 @@ int drm_dp_bd(struct drm_dp_aux *aux, struct drm_dp_bd *bd)
 			bd->dfp.hdmi.ycbcr420_pass_through = info[3] & YCBCR420_PASS_THROUGH;
 			bd->dfp.hdmi.conversion_from_ycbcr444_to_ycbcr422 = info[3] & YCBCR444_TO_YCBCR422;
 			bd->dfp.hdmi.conversion_from_ycbcr444_to_ycbcr420 = info[3] & YCBCR444_TO_YCBCR420;
+		} else if (bd->type & DP_DS_PORT_TYPE_DP_DUALMODE) {
+			bd->dfp.dual_mode.tmds_clk = info[1] * 2500;
+			bd->dfp.dual_mode.bpc = info[2] & DP_DS_VGA_MAX_BPC_MASK;
+			bd->dfp.dual_mode.frame_seq_to_frame_pack = info[3] & FRAME_SEQ_TO_FRAME_PACK;
 		}
 	}
 
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index b8c4960..adf05a1 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -842,6 +842,15 @@ struct drm_dp_hdmi {
 };
 
 /*
+ * DP to DP++
+ */
+struct drm_dp_dual_mode {
+	int tmds_clk;
+	uint8_t bpc;
+	bool frame_seq_to_frame_pack;
+};
+
+/*
  * Branch device
  */
 struct drm_dp_bd {
@@ -852,6 +861,7 @@ struct drm_dp_bd {
 		struct drm_dp_vga vga;
 		struct drm_dp_dvi dvi;
 		struct drm_dp_hdmi hdmi;
+		struct drm_dp_dual_mode dual_mode;
 	} dfp;
 };
 
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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