As far as the patches in other files are concerned, it should have been as follows.
---------------------------------------------------------- --- /usr/local/src/5.14.0.git/focal/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c 2021-11-29 22:43:48.637432730 +0000 +++ uvd_v6_0.c 2021-11-30 06:54:01.572401893 +0000 @@ -543,30 +543,8 @@ { struct amdgpu_device *adev = (struct amdgpu_device *)handle; - /* - * Proper cleanups before halting the HW engine: - * - cancel the delayed idle work - * - enable powergating - * - enable clockgating - * - disable dpm - * - * TODO: to align with the VCN implementation, move the - * jobs for clockgating/powergating/dpm setting to - * ->set_powergating_state(). - */ cancel_delayed_work_sync(&adev->uvd.idle_work); - if (adev->pm.dpm_enabled) { - amdgpu_dpm_enable_uvd(adev, false); - } else { - amdgpu_asic_set_uvd_clocks(adev, 0, 0); - /* shutdown the UVD block */ - amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD, - AMD_PG_STATE_GATE); - amdgpu_device_ip_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_UVD, - AMD_CG_STATE_GATE); - } - if (RREG32(mmUVD_STATUS) != 0) uvd_v6_0_stop(adev); @@ -578,6 +556,30 @@ int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; + /* + * Proper cleanups before halting the HW engine: + * - cancel the delayed idle work + * - enable powergating + * - enable clockgating + * - disable dpm + * + * TODO: to align with the VCN implementation, move the + * jobs for clockgating/powergating/dpm setting to + * ->set_powergating_state(). + */ + cancel_delayed_work_sync(&adev->uvd.idle_work); + + if (adev->pm.dpm_enabled) { + amdgpu_dpm_enable_uvd(adev, false); + } else { + amdgpu_asic_set_uvd_clocks(adev, 0, 0); + /* shutdown the UVD block */ + amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_UVD, + AMD_PG_STATE_GATE); + amdgpu_device_ip_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_UVD, + AMD_CG_STATE_GATE); + } + r = uvd_v6_0_hw_fini(adev); if (r) return r; ---------------------------------------------------------- -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux-oem-5.14 in Ubuntu. https://bugs.launchpad.net/bugs/1952568 Title: AMD GPU kernel driver unload error Status in linux-oem-5.14 package in Ubuntu: New Bug description: After updating the kernel from 5.14.0-1005 to 5.14.0-1007 on ubuntu20.04, if you unload the driver with the following command, the command will be forcibly terminated and the driver cannot be unloaded. Can be unloaded with 5.14.0-1005 without any problem sudo modprob -s -r amdgpu Driver information in lsmod ----- sudo lsmod |grep amdgpu amdgpu 7049216 -1 iommu_v2 24576 1 amdgpu gpu_sched 36864 1 amdgpu drm_ttm_helper 16384 1 amdgpu ttm 73728 2 amdgpu,drm_ttm_helper drm_kms_helper 258048 1 amdgpu drm 557056 6 gpu_sched,drm_kms_helper,amdgpu,drm_ttm_helper,ttm i2c_algo_bit 16384 2 igb,amdgpu ----- ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: linux-modules-5.14.0-1007-oem 5.14.0-1007.7 ProcVersionSignature: Ubuntu 5.14.0-1007.7-oem 5.14.14 Uname: Linux 5.14.0-1007-oem x86_64 ApportVersion: 2.20.11-0ubuntu27.21 Architecture: amd64 CasperMD5CheckResult: skip CurrentDesktop: LXQt Date: Mon Nov 29 13:46:48 2021 InstallationDate: Installed on 2019-07-24 (858 days ago) InstallationMedia: Ubuntu-Server 19.04 "Disco Dingo" - Release amd64 (20190416.1) SourcePackage: linux-oem-5.14 UpgradeStatus: Upgraded to focal on 2020-05-02 (575 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-oem-5.14/+bug/1952568/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp