From: Austin Zheng <[email protected]>

[Why/How]
Parameters for dml2_core_utils_get_segment_horizontal_contiguous() should be 
flipped.
Should be swizzle mode then bytes per pixel.

Cc: Dillon Varone <[email protected]>
Cc: Mario Limonciello <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: [email protected]
Signed-off-by: Austin Zheng <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
---
 .../dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
index 09cfb5046c81..569ab02ea080 100644
--- 
a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
+++ 
b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn5_calcs_dchub.c
@@ -836,7 +836,7 @@ void dcn5_calculate_swath_and_det_configuration(struct 
dml2_core_internal_scratc
                        p->SwathHeightC[k] = MaximumSwathHeightC[k];
                        RoundedUpSwathSizeBytesY[k] = p->full_swath_bytes_l[k] 
/ 2;
                        RoundedUpSwathSizeBytesC[k] = p->full_swath_bytes_c[k];
-                       p->request_size_bytes_luma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->BytePerPixY[k], 
p->display_cfg->plane_descriptors[k].surface.tiling)
+                       p->request_size_bytes_luma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->display_cfg->plane_descriptors[k].surface.tiling,
 p->BytePerPixY[k])
                                == 
dml2_core_utils_is_vertical_rotation(p->display_cfg->plane_descriptors[k].composition.rotation_angle)
 ? 64 : 128;
                        p->request_size_bytes_chroma[k] = 256;
 
@@ -846,7 +846,7 @@ void dcn5_calculate_swath_and_det_configuration(struct 
dml2_core_internal_scratc
                        RoundedUpSwathSizeBytesY[k] = p->full_swath_bytes_l[k];
                        RoundedUpSwathSizeBytesC[k] = p->full_swath_bytes_c[k] 
/ 2;
                        p->request_size_bytes_luma[k] = 256;
-                       p->request_size_bytes_chroma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->BytePerPixC[k], 
p->display_cfg->plane_descriptors[k].surface.tiling)
+                       p->request_size_bytes_chroma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->display_cfg->plane_descriptors[k].surface.tiling,
 p->BytePerPixC[k])
                                == 
dml2_core_utils_is_vertical_rotation(p->display_cfg->plane_descriptors[k].composition.rotation_angle)
 ? 64 : 128;
 
                } else {
@@ -854,9 +854,9 @@ void dcn5_calculate_swath_and_det_configuration(struct 
dml2_core_internal_scratc
                        p->SwathHeightC[k] = MaximumSwathHeightC[k] / 2;
                        RoundedUpSwathSizeBytesY[k] = p->full_swath_bytes_l[k] 
/ 2;
                        RoundedUpSwathSizeBytesC[k] = p->full_swath_bytes_c[k] 
/ 2;
-                       p->request_size_bytes_luma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->BytePerPixY[k], 
p->display_cfg->plane_descriptors[k].surface.tiling)
+                       p->request_size_bytes_luma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->display_cfg->plane_descriptors[k].surface.tiling,
 p->BytePerPixY[k])
                                == 
dml2_core_utils_is_vertical_rotation(p->display_cfg->plane_descriptors[k].composition.rotation_angle)
 ? 64 : 128;
-                       p->request_size_bytes_chroma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->BytePerPixC[k], 
p->display_cfg->plane_descriptors[k].surface.tiling)
+                       p->request_size_bytes_chroma[k] = 
dml2_core_utils_get_segment_horizontal_contiguous(p->display_cfg->plane_descriptors[k].surface.tiling,
 p->BytePerPixC[k])
                                == 
dml2_core_utils_is_vertical_rotation(p->display_cfg->plane_descriptors[k].composition.rotation_angle)
 ? 64 : 128;
                }
 
-- 
2.43.0

Reply via email to