From ff15cea338d2c78e0086d55c8a9dd637a5dd3ccc Mon Sep 17 00:00:00 2001 From: Aurabindo Pillai Date: Tue, 28 Jun 2022 16:25:28 -0400 Subject: drm/amd/display: expose additional modifier for DCN32/321 [Why&How] Some userspace expect a backwards compatible modifier on DCN32/321. For hardware with num_pipes more than 16, we expose the most efficient modifier first. As a fall back method, we need to expose slightly inefficient modifier AMD_FMT_MOD_TILE_GFX9_64K_R_X after the best option. Also set the number of packers to fixed value as required per hardware documentation. This value is cached during hardware initialization and can be read through the base driver. Signed-off-by: Aurabindo Pillai Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index 8ef489fad707..97fff4727724 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -744,8 +744,7 @@ static int convert_tiling_flags_to_modifier(struct amdgpu_framebuffer *afb) switch (version) { case AMD_FMT_MOD_TILE_VER_GFX11: pipe_xor_bits = min(block_size_bits - 8, pipes); - packers = min(block_size_bits - 8 - pipe_xor_bits, - ilog2(adev->gfx.config.gb_addr_config_fields.num_pkrs)); + packers = ilog2(adev->gfx.config.gb_addr_config_fields.num_pkrs); break; case AMD_FMT_MOD_TILE_VER_GFX10_RBPLUS: pipe_xor_bits = min(block_size_bits - 8, pipes); -- cgit