drm/amdgpu: Fix dead lock issue for vblank
authorEmily.Deng <Emily.Deng@amd.com>
Mon, 14 Sep 2020 09:57:01 +0000 (17:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 16:25:15 +0000 (12:25 -0400)
commit36499e4c776ad2e51bb6d0075acdfba9f728b8c2
treef691d5941276c1a0361db93d1a85efd8f622a308
parent9de9a54aba76ae6b3eb5da221114619977872ec6
drm/amdgpu: Fix dead lock issue for vblank

Always start vblank timer, but only calls vblank function
when vblank is enabled.

This is used to fix the dead lock issue.
When drm_crtc_vblank_off want to disable vblank,
it first get event_lock, and then call hrtimer_cancel,
but hrtimer_cancel want to wait timer handler function finished.
Timer handler also want to aquire event_lock in drm_handle_vblank.

Signed-off-by: Emily.Deng <Emily.Deng@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/dce_virtual.c