diff options
author | Eric Yang <Eric.Yang2@amd.com> | 2017-07-23 21:17:09 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-27 01:15:31 +0300 |
commit | 755d3bcfd44c16d344c7c6305ac6e7da19c27f5e (patch) | |
tree | eac6aa7d79474344e2b98c7252aed71113aa147f /drivers/gpu/drm/amd/display/dc/dc_helper.c | |
parent | 0a87425a37b4c1f06d75949ea39e60455a2b0a4f (diff) | |
download | linux-755d3bcfd44c16d344c7c6305ac6e7da19c27f5e.tar.xz |
drm/amd/display: Fix generic_reg_wait 1000ms case
Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_helper.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_helper.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c index 87b7f6f8870e..f219bd2068e5 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_helper.c +++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c @@ -143,11 +143,10 @@ uint32_t generic_reg_wait(const struct dc_context *ctx, for (i = 0; i <= time_out_num_tries; i++) { if (i) { - if (0 < delay_between_poll_us && delay_between_poll_us < 1000) - udelay(delay_between_poll_us); - - if (delay_between_poll_us > 1000) + if (delay_between_poll_us >= 1000) msleep(delay_between_poll_us/1000); + else if (delay_between_poll_us > 0) + udelay(delay_between_poll_us); } reg_val = dm_read_reg(ctx, addr); |