drm/dp/mst: add some defines for logical/physical ports
authorDave Airlie <airlied@redhat.com>
Thu, 1 Oct 2015 06:28:25 +0000 (16:28 +1000)
committerSasha Levin <alexander.levin@verizon.com>
Sat, 26 Nov 2016 03:57:02 +0000 (22:57 -0500)
[ Upstream commit ccf03d6995fa4b784f5b987726ba98f4859bf326 ]

This just removes the magic number.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/gpu/drm/drm_dp_mst_topology.c
include/drm/drm_dp_helper.h

index ec54c21bae3de7d3c90b5fb9c174ef5ca5511f87..e22a22baf511d79fa5b5097e3e5473c90a234fce 100644 (file)
@@ -1156,7 +1156,7 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
                        drm_dp_put_port(port);
                        goto out;
                }
-               if (port->port_num >= 8) {
+               if (port->port_num >= DP_MST_LOGICAL_PORT_0) {
                        port->cached_edid = drm_get_edid(port->connector, &port->aux.ddc);
                }
        }
index 523f04c90dea45826af4a3de70a43d54896f6043..cede0a45b9c08823671e34a684b7a94da34f66a1 100644 (file)
 #define MODE_I2C_READ  4
 #define MODE_I2C_STOP  8
 
+/* DP 1.2 MST PORTs - Section 2.5.1 v1.2a spec */
+#define DP_MST_PHYSICAL_PORT_0 0
+#define DP_MST_LOGICAL_PORT_0 8
+
 #define DP_LINK_STATUS_SIZE       6
 bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
                          int lane_count);