diff options
author | Mykola Lysenko <Mykola.Lysenko@amd.com> | 2015-12-25 16:14:48 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-01-04 12:11:20 -0500 |
commit | 7a11a334aa6af4c65c6a0d81b60c97fc18673532 (patch) | |
tree | 1af2712e1eb37550fab59bddaea80f457e565263 | |
parent | 75af4c8c4c0f60d7ad135419805798f144e9baf9 (diff) | |
download | op-kernel-dev-7a11a334aa6af4c65c6a0d81b60c97fc18673532.zip op-kernel-dev-7a11a334aa6af4c65c6a0d81b60c97fc18673532.tar.gz |
drm/dp/mst: fix in RAD element access
This is needed to receive correct port
number from RAD, so MSTB could be found
Acked-by: Dave Airlie <airlied@gmail.com>
Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
-rw-r--r-- | drivers/gpu/drm/drm_dp_mst_topology.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index d809ce8..6ed90a2 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1044,7 +1044,7 @@ static void build_mst_prop_path(const struct drm_dp_mst_branch *mstb, snprintf(proppath, proppath_size, "mst:%d", mstb->mgr->conn_base_id); for (i = 0; i < (mstb->lct - 1); i++) { int shift = (i % 2) ? 0 : 4; - int port_num = mstb->rad[i / 2] >> shift; + int port_num = (mstb->rad[i / 2] >> shift) & 0xf; snprintf(temp, sizeof(temp), "-%d", port_num); strlcat(proppath, temp, proppath_size); } @@ -1195,7 +1195,7 @@ static struct drm_dp_mst_branch *drm_dp_get_mst_branch_device(struct drm_dp_mst_ for (i = 0; i < lct - 1; i++) { int shift = (i % 2) ? 0 : 4; - int port_num = rad[i / 2] >> shift; + int port_num = (rad[i / 2] >> shift) & 0xf; list_for_each_entry(port, &mstb->ports, next) { if (port->port_num == port_num) { |