drm/amd/display: Fix a test CalculatePrefetchSchedule()
authorjsg <jsg@openbsd.org>
Thu, 20 Jul 2023 08:37:42 +0000 (08:37 +0000)
committerjsg <jsg@openbsd.org>
Thu, 20 Jul 2023 08:37:42 +0000 (08:37 +0000)
From Christophe JAILLET
36786e2a733143426dd7628e939735465425fbb1 in linux-6.1.y/6.1.39
960e27a5741cd3001996ff6ddfb3eb0ed3a4909d in mainline linux

sys/dev/pci/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c

index b7c2844..f294f2f 100644 (file)
@@ -810,7 +810,7 @@ static bool CalculatePrefetchSchedule(
                        *swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockWidth256BytesC) + myPipe->BlockWidth256BytesC;
        } else {
                *swath_width_luma_ub = dml_ceil(SwathWidthY - 1, myPipe->BlockHeight256BytesY) + myPipe->BlockHeight256BytesY;
-               if (myPipe->BlockWidth256BytesC > 0)
+               if (myPipe->BlockHeight256BytesC > 0)
                        *swath_width_chroma_ub = dml_ceil(SwathWidthY / 2 - 1, myPipe->BlockHeight256BytesC) + myPipe->BlockHeight256BytesC;
        }