]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Re-validate streams on commit_streams
authorDillon Varone <dillon.varone@amd.com>
Thu, 5 Dec 2024 22:33:06 +0000 (17:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2024 17:21:26 +0000 (12:21 -0500)
To prevent invalid HW programming, streams should be revalidated first
before committing to HW.

Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c

index 81f5996f2edb3e25279928d4e1c0aeedecad5832..dfa36368ae63f616b110fbddd95e03314ea54bbe 100644 (file)
@@ -2153,6 +2153,11 @@ enum dc_status dc_commit_streams(struct dc *dc, struct dc_commit_streams_params
                struct dc_stream_state *stream = params->streams[i];
                struct dc_stream_status *status = dc_stream_get_status(stream);
 
+               /* revalidate streams */
+               res = dc_validate_stream(dc, stream);
+               if (res != DC_OK)
+                       return res;
+
                dc_stream_log(dc, stream);
 
                set[i].stream = stream;