drm/mst: use DP_GET_SINK_COUNT() for sink count in ESI
authorJani Nikula <jani.nikula@intel.com>
Tue, 4 Jan 2022 18:48:57 +0000 (20:48 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 11 Jan 2022 15:28:54 +0000 (17:28 +0200)
Take bit 7 into account when reading sink count from
DP_DEVICE_SERVICE_IRQ_VECTOR_ESI0.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220104184857.784563-2-jani.nikula@intel.com
drivers/gpu/drm/drm_dp_mst_topology.c

index f3d79ed..ab4372e 100644 (file)
@@ -4196,7 +4196,7 @@ int drm_dp_mst_hpd_irq(struct drm_dp_mst_topology_mgr *mgr, u8 *esi, bool *handl
        int ret = 0;
        int sc;
        *handled = false;
-       sc = esi[0] & 0x3f;
+       sc = DP_GET_SINK_COUNT(esi[0]);
 
        if (sc != mgr->sink_count) {
                mgr->sink_count = sc;