drm/amdgpu: Add sdma v7_0 ip block support (v7)
v1: Add sdma v7_0 ip block support. (Likun) v2: Move vmhub from ring_funcs to ring. (Hawking) v3: Switch to AMDGPU_GFXHUB(0). (Hawking) v4: Move microcode init into early_init. (Likun) v5: Fix warnings (Alex) v6: Squash in various fixes (Alex) v7: Rebase (Alex) v8: Rebase (Alex) Signed-off-by: Likun Gao <Likun.Gao@amd.com> Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
7c0ac60338
commit
b412351e91
4 changed files with 1668 additions and 1 deletions
|
@ -179,7 +179,8 @@ amdgpu-y += \
|
|||
sdma_v4_4_2.o \
|
||||
sdma_v5_0.o \
|
||||
sdma_v5_2.o \
|
||||
sdma_v6_0.o
|
||||
sdma_v6_0.o \
|
||||
sdma_v7_0.o
|
||||
|
||||
# add MES block
|
||||
amdgpu-y += \
|
||||
|
|
|
@ -158,6 +158,7 @@ static int amdgpu_sdma_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
|
|||
const struct common_firmware_header *header = NULL;
|
||||
const struct sdma_firmware_header_v1_0 *hdr;
|
||||
const struct sdma_firmware_header_v2_0 *hdr_v2;
|
||||
const struct sdma_firmware_header_v3_0 *hdr_v3;
|
||||
|
||||
header = (const struct common_firmware_header *)
|
||||
sdma_inst->fw->data;
|
||||
|
@ -174,6 +175,11 @@ static int amdgpu_sdma_init_inst_ctx(struct amdgpu_sdma_instance *sdma_inst)
|
|||
sdma_inst->fw_version = le32_to_cpu(hdr_v2->header.ucode_version);
|
||||
sdma_inst->feature_version = le32_to_cpu(hdr_v2->ucode_feature_version);
|
||||
break;
|
||||
case 3:
|
||||
hdr_v3 = (const struct sdma_firmware_header_v3_0 *)sdma_inst->fw->data;
|
||||
sdma_inst->fw_version = le32_to_cpu(hdr_v3->header.ucode_version);
|
||||
sdma_inst->feature_version = le32_to_cpu(hdr_v3->ucode_feature_version);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
1630
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
Normal file
1630
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.c
Normal file
File diff suppressed because it is too large
Load diff
30
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.h
Normal file
30
drivers/gpu/drm/amd/amdgpu/sdma_v7_0.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright 2023 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __SDMA_V7_0_H__
|
||||
#define __SDMA_V7_0_H__
|
||||
|
||||
extern const struct amd_ip_funcs sdma_v7_0_ip_funcs;
|
||||
extern const struct amdgpu_ip_block_version sdma_v7_0_ip_block;
|
||||
|
||||
#endif /* __SDMA_V7_0_H__ */
|
Loading…
Add table
Reference in a new issue