Commit c3c584c1 authored by Vitaliy Shevtsov's avatar Vitaliy Shevtsov Committed by Alex Deucher
Browse files

drm/amd/display: fix type mismatch in CalculateDynamicMetadataParameters()



There is a type mismatch between what CalculateDynamicMetadataParameters()
takes and what is passed to it. Currently this function accepts several
args as signed long but it's called with unsigned integers and integer. On
some systems where long is 32 bits and one of these unsigned int params is
greater than INT_MAX it may cause passing input params as negative values.

Fix this by changing these argument types from long to unsigned int and to
int respectively. Also this will align the function's definition with
similar functions in other dcn* drivers.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Fixes: 6725a88f ("drm/amd/display: Add DCN3 DML")
Signed-off-by: default avatarVitaliy Shevtsov <v.shevtsov@mt-integration.ru>
Reviewed-by: default avatarAlex Hung <alex.hung@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a734a717
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment