From: jsg Date: Mon, 19 Jul 2021 09:58:16 +0000 (+0000) Subject: drm/amd/display: fix use_max_lb flag for 420 pixel formats X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=008c8b19993004ec367e1edd92dc05f60e36dfda;p=openbsd drm/amd/display: fix use_max_lb flag for 420 pixel formats From Dmytro Laktyushkin 3ca86d44b9023cd96c893d6dd90aacbca90e4d74 in linux 5.10.y/5.10.51 8809a7a4afe90ad9ffb42f72154d27e7c47551ae in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c b/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c index fce37c527a0..8bb5912d837 100644 --- a/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c +++ b/sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c @@ -482,10 +482,13 @@ static enum lb_memory_config dpp1_dscl_find_lb_memory_config(struct dcn10_dpp *d int vtaps_c = scl_data->taps.v_taps_c; int ceil_vratio = dc_fixpt_ceil(scl_data->ratios.vert); int ceil_vratio_c = dc_fixpt_ceil(scl_data->ratios.vert_c); - enum lb_memory_config mem_cfg = LB_MEMORY_CONFIG_0; - if (dpp->base.ctx->dc->debug.use_max_lb) - return mem_cfg; + if (dpp->base.ctx->dc->debug.use_max_lb) { + if (scl_data->format == PIXEL_FORMAT_420BPP8 + || scl_data->format == PIXEL_FORMAT_420BPP10) + return LB_MEMORY_CONFIG_3; + return LB_MEMORY_CONFIG_0; + } dpp->base.caps->dscl_calc_lb_num_partitions( scl_data, LB_MEMORY_CONFIG_1, &num_part_y, &num_part_c);