Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +16 −0 Original line number Original line Diff line number Diff line Loading @@ -1722,6 +1722,19 @@ static struct vb2_buffer *get_vb_from_device_addr(struct buf_queue *bufq, return vb; return vb; } } static void msm_vidc_try_suspend(struct msm_vidc_inst *inst) { bool batch_mode; batch_mode = msm_comm_g_ctrl_for_id(inst, V4L2_CID_VIDC_QBUF_MODE) == V4L2_VIDC_QBUF_BATCHED; if (batch_mode) { dprintk(VIDC_DBG, "Trying to suspend Venus after finishing Batch\n"); msm_comm_suspend(inst->core->id); } } static void handle_ebd(enum hal_command_response cmd, void *data) static void handle_ebd(enum hal_command_response cmd, void *data) { { struct msm_vidc_cb_data_done *response = data; struct msm_vidc_cb_data_done *response = data; Loading Loading @@ -1793,6 +1806,8 @@ static void handle_ebd(enum hal_command_response cmd, void *data) msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_EBD); msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_EBD); } } msm_vidc_try_suspend(inst); put_inst(inst); put_inst(inst); } } Loading Loading @@ -2092,6 +2107,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data) msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_FBD); msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_FBD); } } msm_vidc_try_suspend(inst); err_handle_fbd: err_handle_fbd: put_inst(inst); put_inst(inst); } } Loading drivers/media/platform/msm/vidc/venus_hfi.c +2 −10 Original line number Original line Diff line number Diff line Loading @@ -1297,17 +1297,9 @@ static int venus_hfi_suspend(void *dev) return -ENOTSUPP; return -ENOTSUPP; } } mutex_lock(&device->lock); dprintk(VIDC_DBG, "Suspending Venus\n"); rc = flush_delayed_work(&venus_hfi_pm_work); if (device->power_enabled) { dprintk(VIDC_DBG, "Venus is busy\n"); rc = -EBUSY; } else { dprintk(VIDC_DBG, "Venus is power suspended\n"); rc = 0; } mutex_unlock(&device->lock); return rc; return rc; } } Loading Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +16 −0 Original line number Original line Diff line number Diff line Loading @@ -1722,6 +1722,19 @@ static struct vb2_buffer *get_vb_from_device_addr(struct buf_queue *bufq, return vb; return vb; } } static void msm_vidc_try_suspend(struct msm_vidc_inst *inst) { bool batch_mode; batch_mode = msm_comm_g_ctrl_for_id(inst, V4L2_CID_VIDC_QBUF_MODE) == V4L2_VIDC_QBUF_BATCHED; if (batch_mode) { dprintk(VIDC_DBG, "Trying to suspend Venus after finishing Batch\n"); msm_comm_suspend(inst->core->id); } } static void handle_ebd(enum hal_command_response cmd, void *data) static void handle_ebd(enum hal_command_response cmd, void *data) { { struct msm_vidc_cb_data_done *response = data; struct msm_vidc_cb_data_done *response = data; Loading Loading @@ -1793,6 +1806,8 @@ static void handle_ebd(enum hal_command_response cmd, void *data) msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_EBD); msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_EBD); } } msm_vidc_try_suspend(inst); put_inst(inst); put_inst(inst); } } Loading Loading @@ -2092,6 +2107,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data) msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_FBD); msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_FBD); } } msm_vidc_try_suspend(inst); err_handle_fbd: err_handle_fbd: put_inst(inst); put_inst(inst); } } Loading
drivers/media/platform/msm/vidc/venus_hfi.c +2 −10 Original line number Original line Diff line number Diff line Loading @@ -1297,17 +1297,9 @@ static int venus_hfi_suspend(void *dev) return -ENOTSUPP; return -ENOTSUPP; } } mutex_lock(&device->lock); dprintk(VIDC_DBG, "Suspending Venus\n"); rc = flush_delayed_work(&venus_hfi_pm_work); if (device->power_enabled) { dprintk(VIDC_DBG, "Venus is busy\n"); rc = -EBUSY; } else { dprintk(VIDC_DBG, "Venus is power suspended\n"); rc = 0; } mutex_unlock(&device->lock); return rc; return rc; } } Loading