Commit 37457013 authored by Mykola Lysenko's avatar Mykola Lysenko Committed by Kamal Mostafa

drm/dp/mst: fix in RAD element access

commit 7a11a334 upstream.

This is needed to receive correct port
number from RAD, so MSTB could be found
Acked-by: default avatarDave Airlie <airlied@gmail.com>
Signed-off-by: default avatarMykola Lysenko <Mykola.Lysenko@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent d76eafd5
......@@ -1035,7 +1035,7 @@ static void build_mst_prop_path(struct drm_dp_mst_port *port,
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);
}
......@@ -1185,7 +1185,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment