drm/amdgpu/display: set vblank_disable_immediate for DC
authorjsg <jsg@openbsd.org>
Thu, 27 Jan 2022 22:58:56 +0000 (22:58 +0000)
committerjsg <jsg@openbsd.org>
Thu, 27 Jan 2022 22:58:56 +0000 (22:58 +0000)
From Alex Deucher
f94cf1cb17963905910c2adc332ebb9e44e7fa4b in linux 5.15.y/5.15.17
92020e81ddbeac351ea4a19bcf01743f32b9c800 in mainline linux

sys/dev/pci/drm/amd/amdgpu/amdgpu_irq.c
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 2396d26..ea10001 100644 (file)
@@ -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);
index bb3a871..e60d708 100644 (file)
@@ -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");