[PATCH] drm/amd/amdgpu: Cancel the hrtimer in sw_fini
Deng, Emily
Emily.Deng at amd.com
Mon May 10 03:01:13 UTC 2021
Reviewed-by: Emily Deng <Emily.Deng at amd.com>
>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Sun, Roy
>Sent: Saturday, May 8, 2021 12:35 PM
>To: Sun, Roy <Roy.Sun at amd.com>; amd-gfx at lists.freedesktop.org
>Subject: RE: [PATCH] drm/amd/amdgpu: Cancel the hrtimer in sw_fini
>
>[AMD Official Use Only - Internal Distribution Only]
>
>Ping
>
>-----Original Message-----
>From: Roy Sun <Roy.Sun at amd.com>
>Sent: Tuesday, April 6, 2021 8:21 PM
>To: amd-gfx at lists.freedesktop.org
>Cc: Sun, Roy <Roy.Sun at amd.com>
>Subject: [PATCH] drm/amd/amdgpu: Cancel the hrtimer in sw_fini
>
>Move the process of cancelling hrtimer to sw_fini
>
>Signed-off-by: Roy Sun <Roy.Sun at amd.com>
>---
> drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>index 5c11144da051..33324427b555 100644
>--- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>+++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
>@@ -421,6 +421,11 @@ static int dce_virtual_sw_init(void *handle) static int
>dce_virtual_sw_fini(void *handle) {
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>+ int i = 0;
>+
>+ for (i = 0; i < adev->mode_info.num_crtc; i++)
>+ if (adev->mode_info.crtcs[i])
>+ hrtimer_cancel(&adev->mode_info.crtcs[i]-
>>vblank_timer);
>
> kfree(adev->mode_info.bios_hardcoded_edid);
>
>@@ -480,13 +485,6 @@ static int dce_virtual_hw_init(void *handle)
>
> static int dce_virtual_hw_fini(void *handle) {
>- struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>- int i = 0;
>-
>- for (i = 0; i<adev->mode_info.num_crtc; i++)
>- if (adev->mode_info.crtcs[i])
>- hrtimer_cancel(&adev->mode_info.crtcs[i]-
>>vblank_timer);
>-
> return 0;
> }
>
>--
>2.29.0
>_______________________________________________
>amd-gfx mailing list
>amd-gfx at lists.freedesktop.org
>https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.fre
>edesktop.org%2Fmailman%2Flistinfo%2Famd-
>gfx&data=04%7C01%7CEmily.Deng%40amd.com%7Cc36a726027e043366d
>9308d911daafc6%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637
>560453220959024%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiL
>CJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=tgM
>OtVhydrjPcZCF%2BZwE04DKVdYfTDDwl%2Bl0mHa0HOo%3D&reserved=0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 16406 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210510/1fe68b7a/attachment-0001.bin>
More information about the amd-gfx
mailing list