@@ -769,24 +769,6 @@ static void vpu_service_session_clear(struct vpu_subdev_data *data,
769769 }
770770}
771771
772- static void vpu_service_clear (struct vpu_subdev_data * data )
773- {
774- struct vpu_reg * reg , * n ;
775- struct vpu_session * session , * s ;
776- struct vpu_service_info * pservice = data -> pservice ;
777-
778- list_for_each_entry_safe (reg , n , & pservice -> waiting , status_link ) {
779- reg_deinit (reg -> data , reg );
780- }
781-
782- /* wake up session wait event to prevent the timeout hw reset
783- * during reboot procedure.
784- */
785- list_for_each_entry_safe (session , s ,
786- & pservice -> session , list_session )
787- wake_up (& session -> wait );
788- }
789-
790772#if VCODEC_CLOCK_ENABLE
791773static void set_div_clk (struct clk * clock , int divide )
792774{
@@ -3503,13 +3485,15 @@ static void vcodec_shutdown(struct platform_device *pdev)
35033485{
35043486 struct vpu_subdev_data * data = platform_get_drvdata (pdev );
35053487 struct vpu_service_info * pservice = data -> pservice ;
3506- struct device_node * np = pdev -> dev .of_node ;
35073488 int val ;
35083489 int ret ;
3509- int i ;
35103490
35113491 dev_info (& pdev -> dev , "vcodec shutdown" );
35123492
3493+ /*
3494+ * just wait for hardware finishing his work
3495+ * and do nothing else.
3496+ */
35133497 mutex_lock (& pservice -> shutdown_lock );
35143498 atomic_set (& pservice -> service_on , 0 );
35153499 mutex_unlock (& pservice -> shutdown_lock );
@@ -3521,22 +3505,6 @@ static void vcodec_shutdown(struct platform_device *pdev)
35213505 dev_err (& pdev -> dev , "wait total running time out\n" );
35223506
35233507 data -> pservice -> curr_mode = VCODEC_RUNNING_MODE_NONE ;
3524- vpu_service_clear (data );
3525- if (of_property_read_bool (np , "subcnt" )) {
3526- for (i = 0 ; i < pservice -> subcnt ; i ++ ) {
3527- struct device_node * sub_np ;
3528- struct platform_device * sub_pdev ;
3529-
3530- sub_np = of_parse_phandle (np , "rockchip,sub" , i );
3531- sub_pdev = of_find_device_by_node (sub_np );
3532- vcodec_subdev_remove (platform_get_drvdata (sub_pdev ));
3533- }
3534-
3535- } else {
3536- vcodec_subdev_remove (data );
3537- }
3538-
3539- pm_runtime_disable (& pdev -> dev );
35403508}
35413509
35423510MODULE_DEVICE_TABLE (of , vcodec_service_dt_ids );
0 commit comments