Skip to content

Commit 2a79e92

Browse files
Nicholas Kazlauskasgregkh
Nicholas Kazlauskas
authored andcommitted
drm/amd/display: Don't use fsleep for PSR exit waits
[ Upstream commit 79df45d ] [Why] These functions can be called from high IRQ levels and the OS will hang if it tries to use a usleep_highres or a msleep. [How] Replace the fsleep with a udelay. Reviewed-by: Aric Cyr <[email protected]> Acked-by: Tom Chung <[email protected]> Signed-off-by: Nicholas Kazlauskas <[email protected]> Tested-by: Daniel Wheeler <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent ffc2532 commit 2a79e92

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,8 @@ static void dcn10_dmcu_set_psr_enable(struct dmcu *dmcu, bool enable, bool wait)
586586
if (state == PSR_STATE0)
587587
break;
588588
}
589-
fsleep(500);
589+
/* must *not* be fsleep - this can be called from high irq levels */
590+
udelay(500);
590591
}
591592

592593
/* assert if max retry hit */

drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ static void dmub_psr_enable(struct dmub_psr *dmub, bool enable, bool wait, uint8
216216
break;
217217
}
218218

219-
fsleep(500);
219+
/* must *not* be fsleep - this can be called from high irq levels */
220+
udelay(500);
220221
}
221222

222223
/* assert if max retry hit */

0 commit comments

Comments
 (0)