From: Joseph Gravenor Date: Thu, 17 Oct 2019 15:56:34 +0000 (-0400) Subject: drm/amd/display: Renoir chroma viewport WA change formula X-Git-Tag: v5.10.7~3266^2~25^2~256 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6b268dde4cdc4d0b35eb7997520327183957294;p=platform%2Fkernel%2Flinux-rpi.git drm/amd/display: Renoir chroma viewport WA change formula [why] we want to increase the pte row plus 1 line if chroma viewport height is integer multiple of the pte row height [how] instead of ceiling viewport height, we floor it. this allows us to accommodate both cases: those where the chroma viewport height is integer multiple of the pte row height and those where it is not Signed-off-by: Joseph Gravenor Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c index 1ddd6ae..d86b6b6 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c @@ -204,8 +204,8 @@ void hubp21_set_viewport( PTE_ROW_HEIGHT_LINEAR, &pte_row_height); pte_row_height = 1 << (pte_row_height + 3); - pte_rows = (viewport_c->height + pte_row_height - 1) / pte_row_height; - patched_viewport_height = pte_rows * pte_row_height + 3; + pte_rows = (viewport_c->height / pte_row_height) + 1; + patched_viewport_height = pte_rows * pte_row_height + 1; }