diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-19 09:58:17 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-07-19 09:58:17 +0000 |
commit | c89e95432a7e4061dee5471343b5a6127d6ff57c (patch) | |
tree | c9b7e0a2d0063b82733103672d98b6d4de3fa3f8 /sys/dev | |
parent | 0944e01b1c2f3c4dd65b4d64ce14f2ff3c643c88 (diff) |
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
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/amd/display/dc/dcn10/dcn10_dpp_dscl.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |