From: jsg Date: Thu, 27 Jan 2022 22:58:56 +0000 (+0000) Subject: drm/amdgpu/display: set vblank_disable_immediate for DC X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=427576e2bb74a0e455bf168c5088200e78415131;p=openbsd 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 --- 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");