[PATCH 021/120] drm/amd/display: Fix generic_reg_wait 1000ms case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Eric Yang <Eric.Yang2@xxxxxxx>

Change-Id: I1259c3903bbdc35d31153ff0247f5eea7b73ad3d
Signed-off-by: Eric Yang <Eric.Yang2 at amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng at amd.com>
Acked-by: Harry Wentland <Harry.Wentland at amd.com>
---
 drivers/gpu/drm/amd/display/dc/dc_helper.c | 7 +++----
 1 file 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);
-- 
2.11.0



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux