[PATCH] drm/amd/display: Improve 'dml32_TruncToValidBPP()' function
Rodrigo Siqueira Jordao
Rodrigo.Siqueira at amd.com
Mon Mar 18 23:03:25 UTC 2024
On 2/23/24 11:39 PM, Srinivasan Shanmugam wrote:
> Refactors the dml32_TruncToValidBPP function by removing a
> redundant return statement.
>
> The function previously had a return statement at the end that was
> never executed because all execution paths in the function ended with
> a return statement before this line.
>
> Fixes the below:
> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn32/display_mode_vba_util_32.c:1680 dml32_TruncToValidBPP() warn: ignoring unreachable code.
>
> Fixes: dda4fb85e433 ("drm/amd/display: DML changes for DCN32/321")
> Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
> Cc: Roman Li <roman.li at amd.com>
> Cc: Aurabindo Pillai <aurabindo.pillai at amd.com>
> Cc: Tom Chung <chiahsuan.chung at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
> ---
> .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> index 80fccd4999a5..54ac8242f7b0 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_util_32.c
> @@ -1678,8 +1678,6 @@ double dml32_TruncToValidBPP(
> }
>
> *RequiredSlots = dml_ceil(DesiredBPP / MaxLinkBPP * 64, 1);
> -
> - return BPP_INVALID;
> } // TruncToValidBPP
>
> double dml32_RequiredDTBCLK(
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com>
More information about the amd-gfx
mailing list