drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately

Submitted by Deng, Emily on Aug. 18, 2017, 5:48 a.m.

Details

Message ID 1503035321-28800-1-git-send-email-Emily.Deng@amd.com
State New
Headers show
Series "drm/amdgpu/virtual_dce: Virtual display doesn't support disable vblank immediately" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Deng, Emily Aug. 18, 2017, 5:48 a.m.
For virtual display, it uses software timer to emulate the vsync interrupt,
it doesn't have high precision, so doesn't support disable vblank immediately.

BUG: SWDEV-129274

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index dc74c0b..914c5bf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -237,9 +237,11 @@  int amdgpu_irq_init(struct amdgpu_device *adev)
 	}
 
 	if (!amdgpu_device_has_dc_support(adev)) {
-		/* Disable vblank irqs aggressively for power-saving */
-		/* XXX: can this be enabled for DC? */
-		adev->ddev->vblank_disable_immediate = true;
+		if (!adev->enable_virtual_display) {
+			/* Disable vblank irqs aggressively for power-saving */
+			/* XXX: can this be enabled for DC? */
+			adev->ddev->vblank_disable_immediate = true;
+		}
 
 		r = drm_vblank_init(adev->ddev, adev->mode_info.num_crtc);
 		if (r)

Comments

On 18/08/17 02:48 PM, Emily Deng wrote:
> For virtual display, it uses software timer to emulate the vsync interrupt,
> it doesn't have high precision, so doesn't support disable vblank immediately.
> 
> BUG: SWDEV-129274
> 
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index dc74c0b..914c5bf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -237,9 +237,11 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>  	}
>  
>  	if (!amdgpu_device_has_dc_support(adev)) {
> -		/* Disable vblank irqs aggressively for power-saving */
> -		/* XXX: can this be enabled for DC? */
> -		adev->ddev->vblank_disable_immediate = true;
> +		if (!adev->enable_virtual_display) {
> +			/* Disable vblank irqs aggressively for power-saving */
> +			/* XXX: can this be enabled for DC? */
> +			adev->ddev->vblank_disable_immediate = true;
> +		}
>  
>  		r = drm_vblank_init(adev->ddev, adev->mode_info.num_crtc);
>  		if (r)
> 

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>