diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c index 87b7f6f8870e6e56811461e1c0fef59728642f3b..f219bd2068e50d0b6624f7b6bfdbff032a6e953a 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);