drm/amd/display: Add delay in dmub_srv_send_gpint_command
authorWyatt Wood <wyatt.wood@amd.com>
Mon, 22 Mar 2021 18:02:56 +0000 (14:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Apr 2021 20:51:29 +0000 (16:51 -0400)
commit6bdb2e3821616329125fea108c48fe5fe54aaafc
tree9a32622d11a0cd447d0e0aa303faf95e9a00f11d
parent04f3c88f09554714f25caa01d1a8ba999fc487bb
drm/amd/display: Add delay in dmub_srv_send_gpint_command

[Why]
Today a parameter is passed to dmub_srv_send_gpint_command
which specifies the max amount of time to wait for the command
to be acked.
This parameter instead specifies the number of times to check if
the command was acked.
We wish to add a lower bound to the timeout, which can be
accomplished by using a delay or a timestamp.
It has been decided to use udelay instead of a timestamp simply
because we don't want to expose a high precision counter if it
doesn't yield large benefits.

[How]
Add udelay(1) between each for loop iteration.

Signed-off-by: Wyatt Wood <wyatt.wood@amd.com>
Reviewed-by: Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dmub/src/dmub_srv.c