[V2,09/11] drm/amdgpu/virt: enable virtual display

Submitted by Yu, Xiangliang on Jan. 10, 2017, 10 a.m.

Details

Message ID 1484042450-22987-10-git-send-email-Xiangliang.Yu@amd.com
State New
Headers show
Series "Add support AMD GPU virtualization soultion" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Yu, Xiangliang Jan. 10, 2017, 10 a.m.
Virtual display is default setting for virtualization, enable it.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index f32a789..5baca9f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -25,6 +25,9 @@ 
 
 void amdgpu_virt_init_setting(struct amdgpu_device *adev)
 {
+	/* enable virtual display */
+	adev->mode_info.num_crtc = 1;
+
 	mutex_init(&adev->virt.lock);
 }
 

Comments

> -----Original Message-----

> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf

> Of Xiangliang Yu

> Sent: Tuesday, January 10, 2017 5:01 AM

> To: amd-gfx@lists.freedesktop.org

> Cc: Yu, Xiangliang

> Subject: [V2 09/11] drm/amdgpu/virt: enable virtual display

> 

> Virtual display is default setting for virtualization, enable it.

> 

> Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>

> ---

>  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 +++

>  1 file changed, 3 insertions(+)

> 

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

> b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

> index f32a789..5baca9f 100644

> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

> @@ -25,6 +25,9 @@

> 

>  void amdgpu_virt_init_setting(struct amdgpu_device *adev)

>  {

> +	/* enable virtual display */

> +	adev->mode_info.num_crtc = 1;

> +


Should probably also set adev->enable_virtual_display = true here.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>


As a follow on patch, it would be nice to rework amdgpu_device_enable_virtual_display() to set some sensible defaults in the sr-iov case, so it's all handled in one place.

Alex

>  	mutex_init(&adev->virt.lock);

>  }

> 

> --

> 2.7.4

> 

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx