Skip to contentSkip to conversation

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

PATCH In review Emily Deng 2 participants 2 messages Aug 18, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Emily Deng

author
#0 lore raw

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

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
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +5 -3
index dc74c0b..914c5bf 100644
@@ -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)
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1503035321-28800-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 20 lines · Emily Deng

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
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +0 -1
index dc74c0b..914c5bf 100644
@@ -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 */

drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c int amdgpu_irq_init(struct amdgpu_device *adev) · line 247

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c +5 -2
-		/* 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)
Signature · 6 lines
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx