Skip to content

Commit 9ebb6bc

Browse files
emersionalexdeucher
authored andcommitted
amd/display: allow non-linear multi-planar formats
Accept non-linear buffers which use a multi-planar format, as long as they don't use DCC. Tested on GFX9 with NV12. Signed-off-by: Simon Ser <contact@emersion.fr> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <hwentlan@amd.com> Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent 6d638b3 commit 9ebb6bc

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4071,13 +4071,6 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
40714071
if (modifier == DRM_FORMAT_MOD_LINEAR)
40724072
return true;
40734073

4074-
/*
4075-
* The arbitrary tiling support for multiplane formats has not been hooked
4076-
* up.
4077-
*/
4078-
if (info->num_planes > 1)
4079-
return false;
4080-
40814074
/*
40824075
* For D swizzle the canonical modifier depends on the bpp, so check
40834076
* it here.
@@ -4096,6 +4089,10 @@ static bool dm_plane_format_mod_supported(struct drm_plane *plane,
40964089
/* Per radeonsi comments 16/64 bpp are more complicated. */
40974090
if (info->cpp[0] != 4)
40984091
return false;
4092+
/* We support multi-planar formats, but not when combined with
4093+
* additional DCC metadata planes. */
4094+
if (info->num_planes > 1)
4095+
return false;
40994096
}
41004097

41014098
return true;

0 commit comments

Comments
 (0)