[PATCH] drm/amd/display: Restore self-refresh fallback in DCN21 bandwidth validation
Julien Le Bourg <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx,org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
[Why]
Commit b96150a70696 ("drm/amd/display: Should support p-state under
dcn21") made dcn21_validate_bandwidth_fp() call dcn21_fast_validate_bw()
with allow_self_refresh_only = false. This removed the fallback that
re-runs dml_get_voltage_level() with dm_allow_self_refresh when the
first pass finds no voltage level with p-state support.
Some eDP panels advertise high refresh rate modes whose vertical
blanking is too short for a DRAM p-state switch. For example the AUO
1920x1080@360Hz panel of the ASUS ROG Strix G733QSA (Renoir/Cezanne,
DCN 2.1) uses a pixel clock of 800.01 MHz with vtotal 1111, i.e. a
vblank of 31 lines (~77 us). Such modes can only be validated through
the self-refresh fallback. Since the change they fail
dml_get_voltage_level(), dcn21_validate_bandwidth() returns
DC_NOT_SUPPORTED and the mode is pruned:
[drm] Mode Validation Warning: Unknown Status failed validation.
create_validate_stream_for_sink: Unhandled validation failure 24
Rejected mode: "1920x1080": 360 800010 1920 1968 2000 2000 1080 1090 1095 1111 0x48 0xa (ERROR)
leaving the panel with 1920x1080@60 only. This is a user-visible
regression versus v6.18, where the mode was available.
[How]
Pass allow_self_refresh_only = true again in
dcn21_validate_bandwidth_fp(). Modes that support p-state still validate
on the first pass; the fallback is only taken when no p-state capable
voltage level exists, which is exactly the case of these short-vblank
modes.
Note that the issue addressed by commit b96150a70696 ("drm/amd/display:
Should support p-state under dcn21") (atomic_check passing
while commit_tail fails, because sr_exit_time_us differs between
DC_VALIDATE_MODE_ONLY and DC_VALIDATE_MODE_AND_PROGRAMMING) is a
consistency problem between the two validation contexts rather than a
problem with the fallback itself. It should be solved without dropping
modes that have no p-state capable configuration at all.
Tested on ASUS ROG Strix G733QSA (Cezanne, DCN 2.1): 1920x1080@360 is
enumerated again on top of v7.1.8 with this change.
Fixes: b96150a70696 ("drm/amd/display: Should support p-state under dcn21")
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5628
Cc: Wayne Lin <[email protected]>
Cc: Nicholas Kazlauskas <[email protected]>
Cc: [email protected]
Signed-off-by: Julien Le Bourg <[email protected]>
---
drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
index e82f2d531211..ceb7ca312577 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.c
@@ -2336,7 +2336,8 @@ bool dcn21_validate_bandwidth_fp(struct dc *dc, struct dc_state *context,
/*Unsafe due to current pipe merge and split logic*/
ASSERT(context != dc->current_state);
- out = dcn21_fast_validate_bw(dc, context, pipes, &pipe_cnt, pipe_split_from, &vlevel, validate_mode, false);
+ out = dcn21_fast_validate_bw(dc, context, pipes, &pipe_cnt, pipe_split_from,
+ &vlevel, validate_mode, true);
if (pipe_cnt == 0)
goto validate_out;
--
2.55.0