Skip to content

Commit a24eaa5

Browse files
Nicholas Kazlauskasalexdeucher
authored andcommitted
drm/amd/display: Revalidate bandwidth before commiting DC updates
[Why] Whenever we switch between tiled formats without also switching pixel formats or doing anything else that recreates the DC plane state we can run into underflow or hangs since we're not updating the DML parameters before committing to the hardware. [How] If the update type is FULL then call validate_bandwidth again to update the DML parmeters before committing the state. This is basically just a workaround and protective measure against update types being added DC where we could run into this issue in the future. We can only fully validate the state in advance before applying it to the hardware if we recreate all the plane and stream states since we can't modify what's currently in use. The next step is to update DM to ensure that we're creating the plane and stream states for whatever could potentially be a full update in DC to pre-emptively recreate the state for DC global validation. The workaround can stay until this has been fixed in DM. Signed-off-by: Nicholas Kazlauskas <[email protected]> Reviewed-by: Hersen Wu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent b7f839d commit a24eaa5

File tree

1 file changed

+6
-0
lines changed
  • drivers/gpu/drm/amd/display/dc/core

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/display/dc/core/dc.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2538,6 +2538,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
25382538

25392539
copy_stream_update_to_stream(dc, context, stream, stream_update);
25402540

2541+
if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
2542+
DC_ERROR("Mode validation failed for stream update!\n");
2543+
dc_release_state(context);
2544+
return;
2545+
}
2546+
25412547
commit_planes_for_stream(
25422548
dc,
25432549
srf_updates,

0 commit comments

Comments
 (0)