drm/amd/display: Ignore k1/k2 values for virtual signal
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tue, 6 Sep 2022 20:36:41 +0000 (16:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Sep 2022 19:15:17 +0000 (15:15 -0400)
[Why and How]
We are hitting k1/k2 assert when we are using a virtual signal in the
test; as a result, we are failing some automated tests with a false
positive. This commit addresses this issue by ignoring the assert
condition if we use SIGNAL_TYPE_VIRTUAL.

Reviewed-by: Aurabindo Pillai <Aurabindo.Pillai@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@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/dcn314/dcn314_hwseq.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c

index f4d1b83979fe0cd19f7ac3f8c1d58bb576d396b7..588c1c71241fac112b27902e60b7233a4a459e42 100644 (file)
@@ -348,6 +348,9 @@ unsigned int dcn314_calculate_dccg_k1_k2_values(struct pipe_ctx *pipe_ctx, unsig
        two_pix_per_container = optc2_is_two_pixels_per_containter(&stream->timing);
        odm_combine_factor = get_odm_config(pipe_ctx, NULL);
 
+       if (pipe_ctx->stream->signal == SIGNAL_TYPE_VIRTUAL)
+               return odm_combine_factor;
+
        if (is_dp_128b_132b_signal(pipe_ctx)) {
                *k2_div = PIXEL_RATE_DIV_BY_1;
        } else if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal) || dc_is_dvi_signal(pipe_ctx->stream->signal)) {
index 931dcf3e5ada74b26637a366a9e08ff836a24f3f..c1261cb0e001cfe3065ae5603f6c770d276e000a 100644 (file)
@@ -1184,6 +1184,9 @@ unsigned int dcn32_calculate_dccg_k1_k2_values(struct pipe_ctx *pipe_ctx, unsign
        two_pix_per_container = optc2_is_two_pixels_per_containter(&stream->timing);
        odm_combine_factor = get_odm_config(pipe_ctx, NULL);
 
+       if (pipe_ctx->stream->signal == SIGNAL_TYPE_VIRTUAL)
+               return odm_combine_factor;
+
        if (is_dp_128b_132b_signal(pipe_ctx)) {
                *k2_div = PIXEL_RATE_DIV_BY_1;
        } else if (dc_is_hdmi_tmds_signal(pipe_ctx->stream->signal) || dc_is_dvi_signal(pipe_ctx->stream->signal)) {