drm/amd/display: fix dcc swath size calculations on dcn1
authorJosip Pavic <Josip.Pavic@amd.com>
Fri, 21 Feb 2020 17:26:19 +0000 (12:26 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Mar 2020 05:30:29 +0000 (00:30 -0500)
commitf9b9b6d9722b571c35f30228505cdffd449cd1d6
tree73363791ae61a88832ef867fd83fdbff513c1abc
parent3cfe9fb69adfdb966b3ab3aec0e1837af3c9e072
drm/amd/display: fix dcc swath size calculations on dcn1

[Why]
Swath sizes are being calculated incorrectly. The horizontal swath size
should be the product of block height, viewport width, and bytes per
element, but the calculation uses viewport height instead of width. The
vertical swath size is similarly incorrectly calculated. The effect of
this is that we report the wrong DCC caps.

[How]
Use viewport width in the horizontal swath size calculation and viewport
height in the vertical swath size calculation.

Signed-off-by: Josip Pavic <Josip.Pavic@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c