drm/amd/display: Don't use fsleep for PSR exit waits on dmub replay
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 27 Sep 2023 19:06:41 +0000 (15:06 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:17:13 +0000 (16:17 -0400)
[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 flseep with a udelay for dmub_replay_enable.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c

index fe431bd9baa21d88fe6ac149e35c3c89029bd159..33cfeb730d7d64a96de4f3fc48769afcd6127c83 100644 (file)
@@ -96,7 +96,8 @@ static void dmub_replay_enable(struct dmub_replay *dmub, bool enable, bool wait,
                                        break;
                        }
 
-                       fsleep(500);
+                       /* must *not* be fsleep - this can be called from high irq levels */
+                       udelay(500);
                }
 
                /* assert if max retry hit */