Skip to content

Commit ba79523

Browse files
nowrepalexdeucher
authored andcommitted
drm/amdgpu/display: Allow DCC for video formats on GFX12
We advertise DCC as supported for NV12/P010 formats on GFX12, but it would fail on this check on atomic commit. Signed-off-by: David Rosca <david.rosca@amd.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 148084b commit ba79523

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,11 @@ static int amdgpu_dm_plane_validate_dcc(struct amdgpu_device *adev,
277277
if (!dcc->enable)
278278
return 0;
279279

280-
if (format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN ||
281-
!dc->cap_funcs.get_dcc_compression_cap)
280+
if (adev->family < AMDGPU_FAMILY_GC_12_0_0 &&
281+
format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
282+
return -EINVAL;
283+
284+
if (!dc->cap_funcs.get_dcc_compression_cap)
282285
return -EINVAL;
283286

284287
input.format = format;

0 commit comments

Comments
 (0)