OSDN Git Service

drm/amd/display: Fix a test CalculatePrefetchSchedule()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 17 Apr 2023 21:35:08 +0000 (23:35 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:20:31 +0000 (09:20 -0400)
It is likely Height was expected here, instead of Width.

Test the correct variable.

Fixes: 17529ea2acfa ("drm/amd/display: Optimizations for DML math")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/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;
        }