drm/amdgpu/virt: enable virtual display
authorXiangliang Yu <Xiangliang.Yu@amd.com>
Wed, 11 Jan 2017 09:18:40 +0000 (17:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 27 Jan 2017 16:13:26 +0000 (11:13 -0500)
Virtual display is default setting for virtualization, enable it.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk Liu <Monk.Liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

index 6e63e7f3025caccc480fa82417308252ae456ce0..3fd951c71d1b8563d6a2d2fd4cdf15c6faf15db2 100644 (file)
@@ -94,6 +94,10 @@ int amdgpu_map_static_csa(struct amdgpu_device *adev, struct amdgpu_vm *vm)
 
 void amdgpu_virt_init_setting(struct amdgpu_device *adev)
 {
+       /* enable virtual display */
+       adev->mode_info.num_crtc = 1;
+       adev->enable_virtual_display = true;
+
        mutex_init(&adev->virt.lock);
 }