mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-06 06:35:12 +00:00
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
This commit is contained in:
parent
75af4c8c4c
commit
7a11a334aa
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
snprintf(proppath, proppath_size, "mst:%d", mstb->mgr->conn_base_id);
|
||||||
for (i = 0; i < (mstb->lct - 1); i++) {
|
for (i = 0; i < (mstb->lct - 1); i++) {
|
||||||
int shift = (i % 2) ? 0 : 4;
|
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);
|
snprintf(temp, sizeof(temp), "-%d", port_num);
|
||||||
strlcat(proppath, temp, proppath_size);
|
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++) {
|
for (i = 0; i < lct - 1; i++) {
|
||||||
int shift = (i % 2) ? 0 : 4;
|
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) {
|
list_for_each_entry(port, &mstb->ports, next) {
|
||||||
if (port->port_num == port_num) {
|
if (port->port_num == port_num) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue