summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-08-17 04:01:22 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-08-17 04:01:22 +0000
commitd1ff9ac1db24229ff55290fe46df03b28cbe60b0 (patch)
tree96a70c31ec67ae87a3b1dd46bd360501ef41ca50 /sys
parentad8f6c8dedaa657911b7b7710dd1bb284471efeb (diff)
drm/amd/display: Handle seamless boot stream
From Rodrigo Siqueira b2415df0afba5a114cececdb556f74b3d7965aa8 in linux-6.1.y/6.1.46 170390e587a69b2a24abac39eb3ae6ec28a4d7f2 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/display/dc/core/dc_resource.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
index 49a850a32ce..2b58cd310e1 100644
--- a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
+++ b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c
@@ -2788,6 +2788,21 @@ enum dc_status dc_validate_with_context(struct dc *dc,
goto fail;
}
+ /* Swap seamless boot stream to pipe 0 (if needed) to ensure pipe_ctx
+ * matches. This may change in the future if seamless_boot_stream can be
+ * multiple.
+ */
+ for (i = 0; i < add_streams_count; i++) {
+ mark_seamless_boot_stream(dc, add_streams[i]);
+ if (add_streams[i]->apply_seamless_boot_optimization && i != 0) {
+ struct dc_stream_state *temp = add_streams[0];
+
+ add_streams[0] = add_streams[i];
+ add_streams[i] = temp;
+ break;
+ }
+ }
+
/* Add new streams and then add all planes for the new stream */
for (i = 0; i < add_streams_count; i++) {
calculate_phy_pix_clks(add_streams[i]);