summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 04:27:26 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 04:27:26 +0000
commitdd15c3fc335602ba08102cbb9627068516569706 (patch)
tree2654606fa0828f8f2fff579a9dca8e398ad55691 /sys/dev/pci
parent9f3fc9128d1991b40e6ae0ad16b76f0ebc59c632 (diff)
drm/amd/display: Revalidate bandwidth before commiting DC updates
From Nicholas Kazlauskas b5232e2ee8df85891514c73472cac09921e5d51d in linux 5.7.y/5.7.6 a24eaa5c51255b344d5a321f1eeb3205f2775498 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
index 47431ca6986..4a619328101 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
+++ b/sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c
@@ -2517,6 +2517,12 @@ void dc_commit_updates_for_stream(struct dc *dc,
copy_stream_update_to_stream(dc, context, stream, stream_update);
+ if (!dc->res_pool->funcs->validate_bandwidth(dc, context, false)) {
+ DC_ERROR("Mode validation failed for stream update!\n");
+ dc_release_state(context);
+ return;
+ }
+
commit_planes_for_stream(
dc,
srf_updates,