OSDN Git Service

drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled
[tomoyo/tomoyo-test1.git] / drivers / gpu / drm / amd / display / amdgpu_dm / amdgpu_dm.c
index 05e4a09..4b76eb1 100644 (file)
@@ -1599,9 +1599,6 @@ 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");
@@ -4264,6 +4261,14 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
 
        }
 
+       /*
+        * Disable vblank IRQs aggressively for power-saving.
+        *
+        * TODO: Fix vblank control helpers to delay PSR entry to allow this when PSR
+        * is also supported.
+        */
+       adev_to_drm(adev)->vblank_disable_immediate = !psr_feature_enabled;
+
        /* Software is initialized. Now we can register interrupt handlers. */
        switch (adev->asic_type) {
 #if defined(CONFIG_DRM_AMD_DC_SI)