drm/amd/display: block dcn315 dynamic crb allocation when unintended
authorDmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Mon, 13 Nov 2023 18:12:44 +0000 (13:12 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 21:49:23 +0000 (16:49 -0500)
[WHY/HOW]
Limit the dynamic crb to dual stream configs that include eDP

Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Dmytro Laktyushkin <dmytro.laktyushkin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/resource/dcn315/dcn315_resource.c

index cb8024eee8e4d90cfd4559c1508a5a7e450750b0..515ba435f759c8dcb143ac3478b6914516b5f853 100644 (file)
@@ -1631,8 +1631,10 @@ static bool allow_pixel_rate_crb(struct dc *dc, struct dc_state *context)
        int i;
        struct resource_context *res_ctx = &context->res_ctx;
 
-       /*Don't apply for single stream*/
-       if (context->stream_count < 2)
+       /* Only apply for dual stream scenarios with edp*/
+       if (context->stream_count != 2)
+               return false;
+       if (context->streams[0]->signal != SIGNAL_TYPE_EDP && context->streams[1]->signal != SIGNAL_TYPE_EDP)
                return false;
 
        for (i = 0; i < dc->res_pool->pipe_count; i++) {