[5/5] drm/amdgpu/si: add detect_hw_virtualization asic callback

Submitted by Liu, Monk on Sept. 20, 2016, 3:20 a.m.

Details

Message ID MWHPR12MB1182041EF1114E070C662FC484F70@MWHPR12MB1182.namprd12.prod.outlook.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Liu, Monk Sept. 20, 2016, 3:20 a.m.
All those 5 patches are :
Reviewed-by: Monk Liu <monk.liu@amd.com>


-----Original Message-----
From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf Of Alex Deucher

Sent: Tuesday, September 20, 2016 2:36 AM
To: amd-gfx@lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH 5/5] drm/amdgpu/si: add detect_hw_virtualization asic callback

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

---
 drivers/gpu/drm/amd/amdgpu/si.c | 7 +++++++
 1 file changed, 7 insertions(+)

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

Patch hide | download patch | download mbox

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

_______________________________________________