Skip to content

Commit 0aa0725

Browse files
Roy Sunalexdeucher
authored andcommitted
drm/amd/amdgpu: Cancel the hrtimer in sw_fini
Move the process of cancelling hrtimer to sw_fini Signed-off-by: Roy Sun <[email protected]> Reviewed-by: Emily Deng <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0064b0c commit 0aa0725

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/gpu/drm/amd/amdgpu/dce_virtual.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ static int dce_virtual_sw_init(void *handle)
421421
static int dce_virtual_sw_fini(void *handle)
422422
{
423423
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
424+
int i = 0;
425+
426+
for (i = 0; i < adev->mode_info.num_crtc; i++)
427+
if (adev->mode_info.crtcs[i])
428+
hrtimer_cancel(&adev->mode_info.crtcs[i]->vblank_timer);
424429

425430
kfree(adev->mode_info.bios_hardcoded_edid);
426431

@@ -480,13 +485,6 @@ static int dce_virtual_hw_init(void *handle)
480485

481486
static int dce_virtual_hw_fini(void *handle)
482487
{
483-
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
484-
int i = 0;
485-
486-
for (i = 0; i<adev->mode_info.num_crtc; i++)
487-
if (adev->mode_info.crtcs[i])
488-
hrtimer_cancel(&adev->mode_info.crtcs[i]->vblank_timer);
489-
490488
return 0;
491489
}
492490

0 commit comments

Comments
 (0)