From: Charlene Liu <[email protected]> [Why&How] Incorrect dcc_control mode causes visual corruption in vertical mode.
For vertical scan with req128_vert_wc clear, use dcc_control__256_64_64 when the vertical segment order is non-contiguous and dcc_control__256_256_xxx otherwise. Reviewed-by: Chris Park <[email protected]> Signed-off-by: Charlene Liu <[email protected]> Signed-off-by: Ivan Lipski <[email protected]> --- .../gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c b/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c index 8dd4b7b9ba36..786843362061 100644 --- a/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c +++ b/drivers/gpu/drm/amd/display/dc/hubbub/dcn31/dcn31_hubbub.c @@ -838,9 +838,12 @@ static bool hubbub31_get_dcc_compression_cap(struct hubbub *hubbub, else dcc_control = dcc_control__256_64_64; } else if (input->scan == SCAN_DIRECTION_VERTICAL) { - if (!req128_vert_wc) - dcc_control = dcc_control__256_256_xxx; - else if (segment_order_vert == segment_order__contiguous) + if (!req128_vert_wc) { + if (segment_order_vert == segment_order__non_contiguous) + dcc_control = dcc_control__256_64_64; + else + dcc_control = dcc_control__256_256_xxx; + } else if (segment_order_vert == segment_order__contiguous) dcc_control = dcc_control__128_128_xxx; else dcc_control = dcc_control__256_64_64; -- 2.43.0
