diff options
| author | Victor Zhao <[email protected]> | 2022-01-24 04:13:58 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-01-27 20:47:34 +0000 |
| commit | 039cacd2393971fe11f855118eea6c83c8f506fa (patch) | |
| tree | 075c9a74d55381c76802175a7af5aefadcbb4b14 | |
| parent | drm/amd/display: convert to DCE IP version checking (diff) | |
| download | kernel-039cacd2393971fe11f855118eea6c83c8f506fa.tar.gz kernel-039cacd2393971fe11f855118eea6c83c8f506fa.zip | |
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 <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h index c5edd84c1c12..645093610aa0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h @@ -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 |
