drm/amd/display: Use u16 for drm_bpp in DSC calculations
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Thu, 21 May 2020 16:32:45 +0000 (12:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2020 05:59:20 +0000 (01:59 -0400)
commitca8e2084e54b0c81638d94dfcaae84accb05869d
tree334d547343201455e30189d56a74a277e186d8fa
parentb7efa4f5cdb4c44311483ffacc1cfe235af28b25
drm/amd/display: Use u16 for drm_bpp in DSC calculations

[Why]
DSC calculations fail because the u16 bits_per_pixel from
the DRM struct is being casted to the u8 drm_bpp parameters
and locals. Integer wraparound is happening because this
value is greater than 255.

[How]
Use u16 to match what's in the structure instead of u8.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Acked-by: Qingqing Zhuo <qingqing.zhuo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c