Skip to content

Commit

Permalink
drm/amdgpu/display: use msleep rather than udelay for long delays
Browse files Browse the repository at this point in the history
[ Upstream commit 98fdcac ]

Some architectures (e.g., ARM) throw an compilation error if the
udelay is too long.  In general udelays of longer than 2000us are
not recommended on any architecture.  Switch to msleep in these
cases.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
alexdeucher authored and gregkh committed Feb 16, 2022
1 parent b556287 commit 6a97718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -6058,7 +6058,7 @@ bool dpcd_write_128b_132b_sst_payload_allocation_table(
}
}
retries++;
udelay(5000);
msleep(5);
}

if (!result && retries == max_retries) {
Expand Down Expand Up @@ -6110,7 +6110,7 @@ bool dpcd_poll_for_allocation_change_trigger(struct dc_link *link)
break;
}

udelay(5000);
msleep(5);
}

if (result == ACT_FAILED) {
Expand Down

0 comments on commit 6a97718

Please sign in to comment.