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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Mar 2020 07:25:49 +0000 (08:25 +0100)
commit25c3f96370a1b853b066ce651d63edef20249b06
treec22bdddc4e3dfcdbdb6873dff12f0d1cb561ed22
parent46c5b0d8dfbb33aec1fa9ed9388ec728cd32d0d7
drm/amd/display: fix dcc swath size calculations on dcn1

[ Upstream commit a0275dfc82c9034eefbeffd556cca6dd239d7925 ]

[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c