diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-01-27 22:58:57 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2022-01-27 22:58:57 +0000 |
commit | b0caa83da169ef41641ec8c597fb978b2a9239aa (patch) | |
tree | d4f30799b9e0cbc0dc243357fd90e0e7abe982f5 /sys | |
parent | f5a555a91a3f87b03e49445af45a976c634ac455 (diff) |
drm/amdgpu/display: set vblank_disable_immediate for DC
From Alex Deucher
f94cf1cb17963905910c2adc332ebb9e44e7fa4b in linux 5.15.y/5.15.17
92020e81ddbeac351ea4a19bcf01743f32b9c800 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_irq.c | 1 | ||||
-rw-r--r-- | sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_irq.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_irq.c index 2396d266bd4..ea10001d87b 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_irq.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_irq.c @@ -341,7 +341,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); 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 bb3a87196aa..e60d708ea6b 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,6 +1281,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"); |