drm/amd/display: fix k1 k2 divider programming for phantom streams
authorjsg <jsg@openbsd.org>
Fri, 31 Mar 2023 01:32:38 +0000 (01:32 +0000)
committerjsg <jsg@openbsd.org>
Fri, 31 Mar 2023 01:32:38 +0000 (01:32 +0000)
From Aurabindo Pillai
0ac86f7dda2b1f895304919ee9035c170a6af419 in linux-6.1.y/6.1.22
3b214bb7185d8284d7d4c53e15127f69a375abf6 in mainline linux

sys/dev/pci/drm/amd/display/dc/dcn32/dcn32_hwseq.c

index 41bc83f..3aaa1a4 100644 (file)
@@ -1174,13 +1174,13 @@ unsigned int dcn32_calculate_dccg_k1_k2_values(struct pipe_ctx *pipe_ctx, unsign
        if (is_dp_128b_132b_signal(pipe_ctx)) {
                *k1_div = PIXEL_RATE_DIV_BY_1;
                *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)) {
+       } else if (dc_is_hdmi_tmds_signal(stream->signal) || dc_is_dvi_signal(stream->signal)) {
                *k1_div = PIXEL_RATE_DIV_BY_1;
                if (stream->timing.pixel_encoding == PIXEL_ENCODING_YCBCR420)
                        *k2_div = PIXEL_RATE_DIV_BY_2;
                else
                        *k2_div = PIXEL_RATE_DIV_BY_4;
-       } else if (dc_is_dp_signal(pipe_ctx->stream->signal) || dc_is_virtual_signal(pipe_ctx->stream->signal)) {
+       } else if (dc_is_dp_signal(stream->signal) || dc_is_virtual_signal(stream->signal)) {
                if (two_pix_per_container) {
                        *k1_div = PIXEL_RATE_DIV_BY_1;
                        *k2_div = PIXEL_RATE_DIV_BY_2;