From: Nicholas Kazlauskas Date: Wed, 27 Sep 2023 19:06:41 +0000 (-0400) Subject: drm/amd/display: Don't use fsleep for PSR exit waits on dmub replay X-Git-Tag: v6.11-rc1~141^2~18^2~127 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b5236da757adc75d7e52c69bdc233d29249a0d0c;p=thirdparty%2Fkernel%2Flinux.git drm/amd/display: Don't use fsleep for PSR exit waits on dmub replay [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 Signed-off-by: Nicholas Kazlauskas Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c index fe431bd9baa21..33cfeb730d7d6 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_replay.c @@ -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 */