drm/amdgpu/display: Allow DCC for video formats on GFX12
Subsystems (3)
PATCH 1/1 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 commit.
Signed-off-by David Rosca <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +5 -2
@@ -277,8 +277,11 @@ static int amdgpu_dm_plane_validate_dcc(struct amdgpu_device *adev,if (!dcc->enable)return 0 ; -if (format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN || - !dc->cap_funcs.get_dcc_compression_cap) +if (adev->family <AMDGPU_FAMILY_GC_12_0_0 && + format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN ) +return -EINVAL ; + +if (!dc->cap_funcs.get_dcc_compression_cap)return -EINVAL ; input.format = format;
Signature · 1 line
2.43.0
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by Ruijing Dong <[email protected]>
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of David Rosca
Sent: Thursday, February 13, 2025 12:07 PM
To: [email protected]
Cc: Rosca, David <[email protected]>
Subject: [PATCH] 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 commit.
Signed-off-by David Rosca <[email protected]>
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c +5 -2
@@ -277,8 +277,11 @@ static int amdgpu_dm_plane_validate_dcc(struct amdgpu_device *adev,if (!dcc->enable)return 0 ; -if (format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN || - !dc->cap_funcs.get_dcc_compression_cap) +if (adev->family <AMDGPU_FAMILY_GC_12_0_0 && + format >=SURFACE_PIXEL_FORMAT_VIDEO_BEGIN ) +return -EINVAL ; + +if (!dc->cap_funcs.get_dcc_compression_cap)return -EINVAL ; input.format = format;
--
2.43.0