]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit95b01971dcc682ef848c59176b6e5f261884bd41
tree334d547343201455e30189d56a74a277e186d8fa
parentc1d1e4d213c2dd50fbdd8e07facc1ab6cf93dc44
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