Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/si.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index a0b6b7e..dc9511c 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -1118,9 +1118,16 @@ static int si_set_uvd_clocks(struct amdgpu_device *adev, 
u32 vclk, u32 dclk)
        return 0;
 }
 
+static void si_detect_hw_virtualization(struct amdgpu_device *adev)
+{
+       if (is_virtual_machine()) /* passthrough mode */
+               adev->virtualization.virtual_caps |= AMDGPU_PASSTHROUGH_MODE;
+}
+
 static const struct amdgpu_asic_funcs si_asic_funcs =
 {
        .read_disabled_bios = &si_read_disabled_bios,
+       .detect_hw_virtualization = si_detect_hw_virtualization,
        .read_register = &si_read_register,
        .reset = &si_asic_reset,
        .set_vga_state = &si_vga_set_state,
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to