Skip to contentSkip to conversation

drm/amdgpu/display: Allow DCC for video formats on GFX12

PATCH In review David Rosca 2 participants 2 messages Feb 13, 2025 – Feb 14, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 774cc3f4f3fd..92472109f84a 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

-----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.

---
 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
index 774cc3f4f3fd..92472109f84a 100644
@@ -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