]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu/display: set vblank_disable_immediate for DC
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Nov 2021 15:23:25 +0000 (10:23 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Nov 2021 19:45:03 +0000 (14:45 -0500)
Disable vblanks immediately to save power.  I think this was
missed when we merged DC support.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1781
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index cc2e0c9cfe0a132f68f3d93c785517e25bd6537d..4f3c62adccbdef85d46b979e2db56ec3cf116dd0 100644 (file)
@@ -333,7 +333,6 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
        if (!amdgpu_device_has_dc_support(adev)) {
                if (!adev->enable_virtual_display)
                        /* Disable vblank IRQs aggressively for power-saving */
-                       /* XXX: can this be enabled for DC? */
                        adev_to_drm(adev)->vblank_disable_immediate = true;
 
                r = drm_vblank_init(adev_to_drm(adev), adev->mode_info.num_crtc);
index 49c5dd436bfccbfe1a4a130f8f0d5c9230f3484b..3ace7227381e4ff95c8a959330d7f2bae12a0a2c 100644 (file)
@@ -1592,6 +1592,9 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
        adev_to_drm(adev)->mode_config.cursor_width = adev->dm.dc->caps.max_cursor_size;
        adev_to_drm(adev)->mode_config.cursor_height = adev->dm.dc->caps.max_cursor_size;
 
+       /* Disable vblank IRQs aggressively for power-saving */
+       adev_to_drm(adev)->vblank_disable_immediate = true;
+
        if (drm_vblank_init(adev_to_drm(adev), adev->dm.display_indexes_num)) {
                DRM_ERROR(
                "amdgpu: failed to initialize sw for display support.\n");