]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: add new data types F8 and Vector for PTL
authorPerry Yuan <perry.yuan@amd.com>
Sun, 8 Feb 2026 16:42:11 +0000 (00:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 11 May 2026 19:55:56 +0000 (15:55 -0400)
Add F8 and VECTOR to amdgpu_ptl_fmt and PSP format mapping.
Update PTL format strings and GFX format enum to keep PSP/KFD in sync.

Signed-off-by: Perry Yuan <perry.yuan@amd.com>
Reviewed-by: Yifan Zhang <yifan1.zhang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

index 9c588323e9b95d6b18c94ed374c3cf0d0cee8807..580e68f02bbee1ef41a93742e0b488f7b8edddb5 100644 (file)
@@ -58,6 +58,8 @@ static const char * const amdgpu_ptl_fmt_str[] = {
        [AMDGPU_PTL_FMT_BF16]    = "BF16",
        [AMDGPU_PTL_FMT_F32]     = "F32",
        [AMDGPU_PTL_FMT_F64]     = "F64",
+       [AMDGPU_PTL_FMT_F8]      = "F8",
+       [AMDGPU_PTL_FMT_VECTOR]  = "VECTOR",
        [AMDGPU_PTL_FMT_INVALID] = "INVALID",
 };
 
@@ -1236,6 +1238,12 @@ static int psp_ptl_fmt_verify(struct psp_context *psp, enum amdgpu_ptl_fmt fmt,
        case AMDGPU_PTL_FMT_F64:
                *ptl_fmt = GFX_FTYPE_F64;
                break;
+       case AMDGPU_PTL_FMT_F8:
+               *ptl_fmt = GFX_FTYPE_F8;
+               break;
+       case AMDGPU_PTL_FMT_VECTOR:
+               *ptl_fmt = GFX_FTYPE_VECTOR;
+               break;
        default:
                return -EINVAL;
        }
index 575823f268498b5a401694e686957518c3da6457..4197179a770182b3c03fc6a424fcfdc22bdaa3dc 100644 (file)
@@ -371,6 +371,8 @@ enum psp_ptl_format_type {
        GFX_FTYPE_BF16        = 0x00000002,
        GFX_FTYPE_F32         = 0x00000003,
        GFX_FTYPE_F64         = 0x00000004,
+       GFX_FTYPE_F8          = 0x00000005,
+       GFX_FTYPE_VECTOR      = 0x00000006,
        GFX_FTYPE_INVALID     = 0xFFFFFFFF,
 };
 
index b59e944f7df0cb3b0da1fc6b59c525b121cff7a1..ed087e9152960570f791ca091742a1f1ca1e1a73 100644 (file)
@@ -2385,8 +2385,8 @@ static int gfx_v9_4_3_perf_monitor_ptl_init(struct amdgpu_device *adev, bool ena
                return -EOPNOTSUPP;
 
        if (!ptl->hw_supported) {
-               fmt1 = GFX_FTYPE_I8;
-               fmt2 = GFX_FTYPE_BF16;
+               fmt1 = GFX_FTYPE_VECTOR;
+               fmt2 = GFX_FTYPE_F8;
        } else {
                fmt1 = ptl->fmt1;
                fmt2 = ptl->fmt2;