summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
diff options
context:
space:
mode:
authorAurabindo Pillai <aurabindo.pillai@amd.com>2022-06-28 16:25:28 -0400
committerAlex Deucher <alexander.deucher@amd.com>2022-06-29 17:12:18 -0400
commitff15cea338d2c78e0086d55c8a9dd637a5dd3ccc (patch)
tree538e5646b18ab2e7f2c4e11264feffc1732bdd2c /drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
parent7268f0a9e842c52fa73b9f5afc1bebcf9f7d48b7 (diff)
downloadlwn-ff15cea338d2c78e0086d55c8a9dd637a5dd3ccc.tar.gz
lwn-ff15cea338d2c78e0086d55c8a9dd637a5dd3ccc.zip
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 <aurabindo.pillai@amd.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c3
1 files changed, 1 insertions, 2 deletions
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);