drm/dp_mst: Use DP_MST_LOGICAL_PORT_0 instead of magic number
authorImre Deak <imre.deak@intel.com>
Mon, 1 Feb 2021 12:01:45 +0000 (14:01 +0200)
committerImre Deak <imre.deak@intel.com>
Thu, 4 Feb 2021 17:22:36 +0000 (19:22 +0200)
Use the macro defined for the first logical port instead of the
corresponding magic number.

Cc: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210201120145.350258-4-imre.deak@intel.com
drivers/gpu/drm/drm_dp_mst_topology.c

index 1979c57..2fb84e7 100644 (file)
@@ -4219,9 +4219,8 @@ drm_dp_mst_detect_port(struct drm_connector *connector,
        case DP_PEER_DEVICE_SST_SINK:
                ret = connector_status_connected;
                /* for logical ports - cache the EDID */
-               if (port->port_num >= 8 && !port->cached_edid) {
+               if (port->port_num >= DP_MST_LOGICAL_PORT_0 && !port->cached_edid)
                        port->cached_edid = drm_get_edid(connector, &port->aux.ddc);
-               }
                break;
        case DP_PEER_DEVICE_DP_LEGACY_CONV:
                if (port->ldps)