[PATCH v3 06/12] drm: Read DPCD receiver capability for DP to Wireless Converter

Mika Kahola mika.kahola at intel.com
Mon May 23 10:50:51 UTC 2016


Read from DPCD receiver capability field for the
DP to Wireless converter. The only supported wireless
technology on DP1.3 spec is WiGig display extension. If WiGig
display extension is present, then read out the

 - number of wde tx on device
 - the number of wde txs that can be concurrently active

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 drivers/gpu/drm/drm_dp_helper.c |  7 +++++++
 include/drm/drm_dp_helper.h     | 13 +++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index f98e4be..2c91771 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -468,6 +468,13 @@ int drm_dp_bd(struct drm_dp_aux *aux, struct drm_dp_bd *bd)
 			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;
+		} else if (bd->type & DP_DS_PORT_TYPE_WIRELESS) {
+			bd->dfp.wireless.wireless_tech = info[1] & DP_DS_WIRELESS_TECH_MASK;
+
+			if (bd->dfp.wireless.wireless_tech == 0x0) {
+				bd->dfp.wireless.number_of_wde_tx_on_device = info[2] & WIRELESS_MASK;
+				bd->dfp.wireless.wde_tx_concurrency_cap = (info[2]>>2) & WIRELESS_MASK;
+			}
 		}
 	}
 
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index adf05a1..831f944 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -230,6 +230,9 @@
 # define YCBCR420_PASS_THROUGH              (1<<2)
 # define YCBCR444_TO_YCBCR422               (1<<3)
 # define YCBCR444_TO_YCBCR420               (1<<4)
+/* offset 3 for Wireless */
+# define DP_DS_WIRELESS_TECH_MASK           0xf
+# define WIRELESS_MASK                      3
 
 /* link configuration */
 #define	DP_LINK_BW_SET		            0x100
@@ -851,6 +854,15 @@ struct drm_dp_dual_mode {
 };
 
 /*
+ * DP to Wireless
+ */
+struct drm_dp_wireless {
+	int wireless_tech;
+	int number_of_wde_tx_on_device;
+	int wde_tx_concurrency_cap;
+};
+
+/*
  * Branch device
  */
 struct drm_dp_bd {
@@ -862,6 +874,7 @@ struct drm_dp_bd {
 		struct drm_dp_dvi dvi;
 		struct drm_dp_hdmi hdmi;
 		struct drm_dp_dual_mode dual_mode;
+		struct drm_dp_wireless wireless;
 	} dfp;
 };
 
-- 
1.9.1



More information about the dri-devel mailing list