OSDN Git Service

drm/amdgpu: load sdma ucode in the guest machine
authorYuanShang <YuanShang.Mao@amd.com>
Fri, 30 Jun 2023 08:40:28 +0000 (16:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Jul 2023 17:47:26 +0000 (13:47 -0400)
commit30b59910d9d003424ae1dc327070ad59195c87b2
tree87f58151e5f4b1c3a3ab97fc80e091fdda4ec9a2
parentfc8e55f378cf11f3abe25ec5cd67b6fc5e915a96
drm/amdgpu: load sdma ucode in the guest machine

[why]
User mode driver need to check the sdma ucode version to
see whether the sdma engine supports a new type of PM4 packet.
In SRIOV, sdma is loaded by the host. And, there is no way
to check the sdma ucode version of CHIP_NAVI12 and
CHIP_SIENNA_CICHLID of the host in the guest machine.

[how]
Load the sdma ucode for CHIP_NAVI12 and CHIP_SIENNA_CICHLID
in the guest machine.

Signed-off-by: YuanShang <YuanShang.Mao@amd.com>
Reviewed-By: Horace Chen <horace.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c