Browse Source

Merge "video: driver: skip core deinit if deinited already"

qctecmdr 4 years ago
parent
commit
deb6f40b1d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      driver/vidc/src/venus_hfi.c

+ 2 - 1
driver/vidc/src/venus_hfi.c

@@ -2823,7 +2823,6 @@ int venus_hfi_core_init(struct msm_vidc_core *core)
 
 
 error:
 error:
 	d_vpr_h("%s(): failed\n", __func__);
 	d_vpr_h("%s(): failed\n", __func__);
-	venus_hfi_core_deinit(core);
 	return rc;
 	return rc;
 }
 }
 
 
@@ -2835,6 +2834,8 @@ int venus_hfi_core_deinit(struct msm_vidc_core *core)
 	}
 	}
 	d_vpr_h("%s(): core %pK\n", __func__, core);
 	d_vpr_h("%s(): core %pK\n", __func__, core);
 	__strict_check(core);
 	__strict_check(core);
+	if (core->state == MSM_VIDC_CORE_DEINIT)
+		return 0;
 	__resume(core);
 	__resume(core);
 	__flush_debug_queue(core, core->packet, core->packet_size);
 	__flush_debug_queue(core, core->packet, core->packet_size);
 	__disable_subcaches(core);
 	__disable_subcaches(core);