]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu/display: use msleep rather than udelay for long delays
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 20 Jan 2022 17:57:33 +0000 (12:57 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jan 2022 22:50:49 +0000 (17:50 -0500)
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>
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

index a012899e9dd47900ce1ea9992f3ab768c5fdebb3..4c3ab2575e4ba98d7a56ce75bfda44771b6945ea 100644 (file)
@@ -6935,7 +6935,7 @@ bool dpcd_write_128b_132b_sst_payload_allocation_table(
                        }
                }
                retries++;
-               udelay(5000);
+               msleep(5);
        }
 
        if (!result && retries == max_retries) {
@@ -6987,7 +6987,7 @@ bool dpcd_poll_for_allocation_change_trigger(struct dc_link *link)
                        break;
                }
 
-               udelay(5000);
+               msleep(5);
        }
 
        if (result == ACT_FAILED) {