mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/amdgpu: add new data types F8 and Vector for PTL
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>
This commit is contained in:
parent
b6dc8f7536
commit
d31098cb31
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user