drm/amdgpu: add determine passthrough under arm64

add determine for passthrough mode under arm64 by reading
CurrentEL register

v2: squash in warning fix (Alex)

Signed-off-by: Victor Zhao <Victor.Zhao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Victor Zhao 2022-01-24 12:13:58 +08:00 committed by Alex Deucher
parent 3b36f50d3a
commit 039cacd239

View File

@ -294,8 +294,10 @@ struct amdgpu_video_codec_info;
static inline bool is_virtual_machine(void)
{
#ifdef CONFIG_X86
#if defined(CONFIG_X86)
return boot_cpu_has(X86_FEATURE_HYPERVISOR);
#elif defined(CONFIG_ARM64)
return !is_kernel_in_hyp_mode();
#else
return false;
#endif