[PATCH v2 6/7] drm: Read DPCD receiver capability for DP to Wireless Converter

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

 



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@xxxxxxxxx>
---
 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 c12c64b..a9d278d 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -229,6 +229,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
@@ -850,6 +853,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 {
@@ -861,6 +873,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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux