diff options
author | 2023-06-06 14:27:04 +0800 | |
---|---|---|
committer | 2023-06-09 12:44:12 -0400 | |
commit | f2bcc0c7db0c004f0184675e7862648e8aa197f9 (patch) | |
tree | f12bdf34318797856ae712c944bd91d6d906db5b /drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h | |
parent | drm/amdkfd: potential error pointer dereference in ioctl (diff) | |
download | linux-f2bcc0c7db0c004f0184675e7862648e8aa197f9.tar.gz linux-f2bcc0c7db0c004f0184675e7862648e8aa197f9.tar.bz2 linux-f2bcc0c7db0c004f0184675e7862648e8aa197f9.zip |
drm/amdgpu/mmsch: Correct the definition for mmsch init header
For the header, it is version related, shouldn't use MAX_VCN_INSTANCES.
Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h b/drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h index 3e4e858a6965..a773ef61b78c 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h +++ b/drivers/gpu/drm/amd/amdgpu/mmsch_v3_0.h @@ -30,6 +30,8 @@ #define MMSCH_VERSION_MINOR 0 #define MMSCH_VERSION (MMSCH_VERSION_MAJOR << 16 | MMSCH_VERSION_MINOR) +#define MMSCH_V3_0_VCN_INSTANCES 0x2 + enum mmsch_v3_0_command_type { MMSCH_COMMAND__DIRECT_REG_WRITE = 0, MMSCH_COMMAND__DIRECT_REG_POLLING = 2, @@ -47,7 +49,7 @@ struct mmsch_v3_0_table_info { struct mmsch_v3_0_init_header { uint32_t version; uint32_t total_size; - struct mmsch_v3_0_table_info inst[AMDGPU_MAX_VCN_INSTANCES]; + struct mmsch_v3_0_table_info inst[MMSCH_V3_0_VCN_INSTANCES]; }; struct mmsch_v3_0_cmd_direct_reg_header { |