Revert "drm/dp_mst: Remove single tx msg restriction."
[linux-2.6-microblaze.git] / include / drm / drm_dp_mst_helper.h
index bcb39da..96bcf33 100644 (file)
@@ -81,7 +81,7 @@ struct drm_dp_vcpi {
  * &drm_dp_mst_topology_mgr.base.lock.
  * @num_sdp_stream_sinks: Number of stream sinks. Protected by
  * &drm_dp_mst_topology_mgr.base.lock.
- * @available_pbn: Available bandwidth for this port. Protected by
+ * @full_pbn: Max possible bandwidth for this port. Protected by
  * &drm_dp_mst_topology_mgr.base.lock.
  * @next: link to next port on this branch device
  * @aux: i2c aux transport to talk to device connected to this port, protected
@@ -126,7 +126,7 @@ struct drm_dp_mst_port {
        u8 dpcd_rev;
        u8 num_sdp_streams;
        u8 num_sdp_stream_sinks;
-       uint16_t available_pbn;
+       uint16_t full_pbn;
        struct list_head next;
        /**
         * @mstb: the branch device connected to this port, if there is one.
@@ -157,9 +157,38 @@ struct drm_dp_mst_port {
         */
        bool has_audio;
 
+       /**
+        * @fec_capable: bool indicating if FEC can be supported up to that
+        * point in the MST topology.
+        */
        bool fec_capable;
 };
 
+/* sideband msg header - not bit struct */
+struct drm_dp_sideband_msg_hdr {
+       u8 lct;
+       u8 lcr;
+       u8 rad[8];
+       bool broadcast;
+       bool path_msg;
+       u8 msg_len;
+       bool somt;
+       bool eomt;
+       bool seqno;
+};
+
+struct drm_dp_sideband_msg_rx {
+       u8 chunk[48];
+       u8 msg[256];
+       u8 curchunk_len;
+       u8 curchunk_idx; /* chunk we are parsing now */
+       u8 curchunk_hdrlen;
+       u8 curlen; /* total length of the msg */
+       bool have_somt;
+       bool have_eomt;
+       struct drm_dp_sideband_msg_hdr initial_hdr;
+};
+
 /**
  * struct drm_dp_mst_branch - MST branch device.
  * @rad: Relative Address to talk to this branch device.
@@ -232,24 +261,16 @@ struct drm_dp_mst_branch {
        int last_seqno;
        bool link_address_sent;
 
+       /**
+        * @down_rep_recv: Message receiver state for down replies.
+        */
+       struct drm_dp_sideband_msg_rx down_rep_recv[2];
+
        /* global unique identifier to identify branch devices */
        u8 guid[16];
 };
 
 
-/* sideband msg header - not bit struct */
-struct drm_dp_sideband_msg_hdr {
-       u8 lct;
-       u8 lcr;
-       u8 rad[8];
-       bool broadcast;
-       bool path_msg;
-       u8 msg_len;
-       bool somt;
-       bool eomt;
-       bool seqno;
-};
-
 struct drm_dp_nak_reply {
        u8 guid[16];
        u8 reason;
@@ -306,18 +327,6 @@ struct drm_dp_remote_i2c_write_ack_reply {
 };
 
 
-struct drm_dp_sideband_msg_rx {
-       u8 chunk[48];
-       u8 msg[256];
-       u8 curchunk_len;
-       u8 curchunk_idx; /* chunk we are parsing now */
-       u8 curchunk_hdrlen;
-       u8 curlen; /* total length of the msg */
-       bool have_somt;
-       bool have_eomt;
-       struct drm_dp_sideband_msg_hdr initial_hdr;
-};
-
 #define DRM_DP_MAX_SDP_STREAMS 16
 struct drm_dp_allocate_payload {
        u8 port_number;
@@ -479,9 +488,6 @@ struct drm_dp_mst_topology_mgr;
 struct drm_dp_mst_topology_cbs {
        /* create a connector for a port */
        struct drm_connector *(*add_connector)(struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port, const char *path);
-       void (*register_connector)(struct drm_connector *connector);
-       void (*destroy_connector)(struct drm_dp_mst_topology_mgr *mgr,
-                                 struct drm_connector *connector);
 };
 
 #define DP_MAX_PAYLOAD (sizeof(unsigned long) * 8)
@@ -556,10 +562,6 @@ struct drm_dp_mst_topology_mgr {
         */
        int conn_base_id;
 
-       /**
-        * @down_rep_recv: Message receiver state for down replies.
-        */
-       struct drm_dp_sideband_msg_rx down_rep_recv;
        /**
         * @up_req_recv: Message receiver state for up requests.
         */
@@ -590,6 +592,11 @@ struct drm_dp_mst_topology_mgr {
         */
        bool payload_id_table_cleared : 1;
 
+       /**
+        * @is_waiting_for_dwn_reply: whether we're waiting for a down reply.
+        */
+       bool is_waiting_for_dwn_reply : 1;
+
        /**
         * @mst_primary: Pointer to the primary/first branch device.
         */
@@ -619,11 +626,6 @@ struct drm_dp_mst_topology_mgr {
         */
        struct mutex qlock;
 
-       /**
-        * @is_waiting_for_dwn_reply: indicate whether is waiting for down reply
-        */
-       bool is_waiting_for_dwn_reply;
-
        /**
         * @tx_msg_downq: List of pending down replies.
         */
@@ -635,11 +637,13 @@ struct drm_dp_mst_topology_mgr {
        struct mutex payload_lock;
        /**
         * @proposed_vcpis: Array of pointers for the new VCPI allocation. The
-        * VCPI structure itself is &drm_dp_mst_port.vcpi.
+        * VCPI structure itself is &drm_dp_mst_port.vcpi, and the size of
+        * this array is determined by @max_payloads.
         */
        struct drm_dp_vcpi **proposed_vcpis;
        /**
-        * @payloads: Array of payloads.
+        * @payloads: Array of payloads. The size of this array is determined
+        * by @max_payloads.
         */
        struct drm_dp_payload *payloads;
        /**
@@ -733,8 +737,6 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
                       struct drm_dp_mst_topology_mgr *mgr,
                       struct drm_dp_mst_port *port);
 
-bool drm_dp_mst_port_has_audio(struct drm_dp_mst_topology_mgr *mgr,
-                                       struct drm_dp_mst_port *port);
 struct edid *drm_dp_mst_get_edid(struct drm_connector *connector, struct drm_dp_mst_topology_mgr *mgr, struct drm_dp_mst_port *port);