From: jsg Date: Thu, 7 Apr 2022 07:08:07 +0000 (+0000) Subject: drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3d75244078accfab62fdbcb5c3fb57811db55e75;p=openbsd drm/amdgpu/display: Only set vblank_disable_immediate when PSR is not enabled From Nicholas Kazlauskas 48cf33ee6b04ccd1a188ac692a6f260b3682fe9f in linux 5.15.y/5.15.27 70897848730470cc477d5d89e6222c0f6a9ac173 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index b6b1f759023..465a749017c 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1281,9 +1281,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"); @@ -3868,6 +3865,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)