diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2022-07-19 13:15:40 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-11-15 11:51:36 -0500 |
commit | a347ca9720335028686b16302bd0d2075880b3d7 (patch) | |
tree | a94af35fd2353a0fb20ddbe9206354d8c98fae03 /drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | |
parent | 25263da37693c764e198b31ab4c647934bf80e07 (diff) | |
download | lwn-a347ca9720335028686b16302bd0d2075880b3d7.tar.gz lwn-a347ca9720335028686b16302bd0d2075880b3d7.zip |
drm/amdgpu: move non-DC vblank handling out of irq code
Move it into the DCE code for each generation. This avoids
confusion with the different display paths.
v2: no need for a hotplug worker for vkms
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/dce_v11_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c index c928bc9eb202..6ac680c4c6e2 100644 --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c @@ -2947,6 +2947,17 @@ static int dce_v11_0_sw_init(void *handle) if (r) return r; + /* 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); + if (r) + return r; + + INIT_WORK(&adev->hotplug_work, + amdgpu_display_hotplug_work_func); + drm_kms_helper_poll_init(adev_to_drm(adev)); adev->mode_info.mode_config_initialized = true; @@ -3020,6 +3031,8 @@ static int dce_v11_0_hw_fini(void *handle) dce_v11_0_pageflip_interrupt_fini(adev); + flush_work(&adev->hotplug_work); + return 0; } |