diff options
| author | Nicholas Kazlauskas <[email protected]> | 2023-09-27 19:06:41 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-10-09 20:58:55 +0000 |
| commit | 79df45dc4bfb13d9bd3a75338b9d9dab948be3d6 (patch) | |
| tree | 9e7aa1fbdec18e805326d42ecbd3f34cc89a415b | |
| parent | drm/amd/display: Update cursor limits based on SW cursor fallback limits (diff) | |
| download | kernel-79df45dc4bfb13d9bd3a75338b9d9dab948be3d6.tar.gz kernel-79df45dc4bfb13d9bd3a75338b9d9dab948be3d6.zip | |
drm/amd/display: Don't use fsleep for PSR exit waits
[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]>
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c index b87bfecb7755..a8e79104b684 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c @@ -586,7 +586,8 @@ static void dcn10_dmcu_set_psr_enable(struct dmcu *dmcu, bool enable, bool wait) if (state == PSR_STATE0) break; } - fsleep(500); + /* must *not* be fsleep - this can be called from high irq levels */ + udelay(500); } /* assert if max retry hit */ diff --git a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c index f27cc8f9d0aa..9d4170a356a2 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c +++ b/drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c @@ -217,7 +217,8 @@ static void dmub_psr_enable(struct dmub_psr *dmub, bool enable, bool wait, uint8 break; } - fsleep(500); + /* must *not* be fsleep - this can be called from high irq levels */ + udelay(500); } /* assert if max retry hit */ |
