drm/amd/display: Remove duplicate code across dcn30 and dcn31
authorMaíra Canal <mairacanal@riseup.net>
Thu, 30 Jun 2022 20:17:41 +0000 (17:17 -0300)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 5 Jul 2022 20:18:27 +0000 (16:18 -0400)
commitfd3bc691fc7b4e553f49bc79f86b515ce2638141
tree6fee5633b1cb773bd25b7d3301094f13ee485d27
parent61e419f651a65ebe01658b46bfc317896cac0eda
drm/amd/display: Remove duplicate code across dcn30 and dcn31

The function CalculateBytePerPixelAnd256BBlockSizes was defined four
times: on display_mode_vba_30.c, display_rq_dlg_calc_30.c,
display_mode_vba_31.c and display_rq_dlg_calc_31.c. In order to avoid
code duplication, the CalculateBytePerPixelAnd256BBlockSizes is defined
on display_mode_vba_30.h and used across dcn30 and dcn31.

Signed-off-by: Maíra Canal <mairacanal@riseup.net>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.c
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_mode_vba_30.h
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c
drivers/gpu/drm/amd/display/dc/dml/dcn31/display_rq_dlg_calc_31.c