Skip to contentSkip to conversation

drm/amdgpu/vcn: finish delay work before release resources

PATCH In review Alex Deucher 2 participants 2 messages Nov 11, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/vcn: finish delay work before release resources

flush/cancel delayed works before doing finalization to avoid concurrently requests.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +2 -0
index 3199e4a5ff12..9d870444d7d6 100644
@@ -193,6 +193,8 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)
 {
 	int i, j;
 
+	cancel_delayed_work_sync(&adev->vcn.idle_work);
+
 	if (adev->vcn.indirect_sram) {
 		amdgpu_bo_free_kernel(&adev->vcn.dpg_sram_bo,
 				      &adev->vcn.dpg_sram_gpu_addr,
Signature · 6 lines
2.23.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20191111204938.836819-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 11.11.19 um 21:49 schrieb Alex Deucher:

Quoted 4 lines

flush/cancel delayed works before doing finalization to avoid concurrently requests.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +0 -0
index 3199e4a5ff12..9d870444d7d6 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c int amdgpu_vcn_sw_fini(struct amdgpu_device *adev) · line 200

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +2 -0
@@ -193,6 +193,8 @@ int amdgpu_vcn_sw_fini(struct amdgpu_device *adev)
  {
  	int i, j;
 
+	cancel_delayed_work_sync(&adev->vcn.idle_work);
+
  	if (adev->vcn.indirect_sram) {
  		amdgpu_bo_free_kernel(&adev->vcn.dpg_sram_bo,
  				      &adev->vcn.dpg_sram_gpu_addr,

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx