Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +39 −0 Original line number Diff line number Diff line Loading @@ -2512,6 +2512,45 @@ void sde_rotator_req_finish(struct sde_rot_mgr *mgr, req->finished = true; } void sde_rotator_abort_inline_request(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req) { struct kthread_work *commit_work; struct kthread_work *done_work; struct sde_rot_entry *entry; struct sde_rot_hw_resource *hw; int i; if (!mgr || !private || !req || !req->entries) return; for (i = 0; i < req->count; i++) { entry = &req->entries[i]; if (!entry) continue; commit_work = &entry->commit_work; done_work = &entry->done_work; hw = sde_rotator_get_hw_resource(entry->commitq, entry); if (!hw) { SDEROT_ERR("no hw for the queue\n"); SDEROT_EVTLOG(i, req->count, SDE_ROT_EVTLOG_ERROR); continue; } SDEROT_EVTLOG(i, req->count); mgr->ops_abort_hw(hw, entry); sde_rot_mgr_unlock(mgr); kthread_flush_work(commit_work); kthread_flush_work(done_work); sde_rot_mgr_lock(mgr); } } int sde_rotator_handle_request_common(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req) Loading drivers/media/platform/msm/sde/rotator/sde_rotator_core.h +15 −0 Original line number Diff line number Diff line Loading @@ -449,6 +449,8 @@ struct sde_rot_mgr { struct sde_rot_entry *entry); int (*ops_cancel_hw)(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry); int (*ops_abort_hw)(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry); int (*ops_kickoff_entry)(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry); int (*ops_wait_for_entry)(struct sde_rot_hw_resource *hw, Loading Loading @@ -669,6 +671,19 @@ void sde_rotator_req_finish(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req); /* * sde_rotator_abort_inline_request - abort inline rotation request after start * This function allows inline rotation requests to be aborted after * sde_rotator_req_set_start has already been issued. * @mgr: Pointer to rotator manager * @private: Pointer to rotator manager per file context * @req: Pointer to rotation request * return: none */ void sde_rotator_abort_inline_request(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req); /* * sde_rotator_handle_request_common - add the given request to rotator * manager and clean up completed requests Loading drivers/media/platform/msm/sde/rotator/sde_rotator_dev.c +10 −0 Original line number Diff line number Diff line Loading @@ -1714,6 +1714,16 @@ int sde_rotator_inline_commit(void *handle, struct sde_rotator_inline_cmd *cmd, sde_rotator_req_finish(rot_dev->mgr, ctx->private, req); sde_rotator_retire_request(request); } else if (cmd_type == SDE_ROTATOR_INLINE_CMD_ABORT) { if (!cmd->priv_handle) { ret = -EINVAL; SDEROT_ERR("invalid private handle\n"); goto error_invalid_handle; } request = cmd->priv_handle; sde_rotator_abort_inline_request(rot_dev->mgr, ctx->private, request->req); } sde_rot_mgr_unlock(rot_dev->mgr); Loading drivers/media/platform/msm/sde/rotator/sde_rotator_inline.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,12 +27,14 @@ * @SDE_ROTATOR_INLINE_CMD_COMMIT: commit command to hardware * @SDE_ROTATOR_INLINE_CMD_START: ready to start inline rotation * @SDE_ROTATOR_INLINE_CMD_CLEANUP: cleanup after commit is done * @SDE_ROTATOR_INLINE_CMD_ABORT: abort current commit and reset */ enum sde_rotator_inline_cmd_type { SDE_ROTATOR_INLINE_CMD_VALIDATE, SDE_ROTATOR_INLINE_CMD_COMMIT, SDE_ROTATOR_INLINE_CMD_START, SDE_ROTATOR_INLINE_CMD_CLEANUP, SDE_ROTATOR_INLINE_CMD_ABORT, }; /** Loading drivers/media/platform/msm/sde/rotator/sde_rotator_r1.c +7 −0 Original line number Diff line number Diff line Loading @@ -349,6 +349,12 @@ static int sde_rotator_cancel_hw(struct sde_rot_hw_resource *hw, return 0; } static int sde_rotator_abort_hw(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry) { return 0; } static int sde_rotator_kickoff_entry(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry) { Loading Loading @@ -691,6 +697,7 @@ int sde_rotator_r1_init(struct sde_rot_mgr *mgr) mgr->hw_data = hw_data; mgr->ops_config_hw = sde_rotator_config_hw; mgr->ops_cancel_hw = sde_rotator_cancel_hw; mgr->ops_abort_hw = sde_rotator_abort_hw; mgr->ops_kickoff_entry = sde_rotator_kickoff_entry; mgr->ops_wait_for_entry = sde_rotator_wait_for_entry; mgr->ops_hw_alloc = sde_rotator_hw_alloc_ext; Loading Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.c +39 −0 Original line number Diff line number Diff line Loading @@ -2512,6 +2512,45 @@ void sde_rotator_req_finish(struct sde_rot_mgr *mgr, req->finished = true; } void sde_rotator_abort_inline_request(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req) { struct kthread_work *commit_work; struct kthread_work *done_work; struct sde_rot_entry *entry; struct sde_rot_hw_resource *hw; int i; if (!mgr || !private || !req || !req->entries) return; for (i = 0; i < req->count; i++) { entry = &req->entries[i]; if (!entry) continue; commit_work = &entry->commit_work; done_work = &entry->done_work; hw = sde_rotator_get_hw_resource(entry->commitq, entry); if (!hw) { SDEROT_ERR("no hw for the queue\n"); SDEROT_EVTLOG(i, req->count, SDE_ROT_EVTLOG_ERROR); continue; } SDEROT_EVTLOG(i, req->count); mgr->ops_abort_hw(hw, entry); sde_rot_mgr_unlock(mgr); kthread_flush_work(commit_work); kthread_flush_work(done_work); sde_rot_mgr_lock(mgr); } } int sde_rotator_handle_request_common(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req) Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_core.h +15 −0 Original line number Diff line number Diff line Loading @@ -449,6 +449,8 @@ struct sde_rot_mgr { struct sde_rot_entry *entry); int (*ops_cancel_hw)(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry); int (*ops_abort_hw)(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry); int (*ops_kickoff_entry)(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry); int (*ops_wait_for_entry)(struct sde_rot_hw_resource *hw, Loading Loading @@ -669,6 +671,19 @@ void sde_rotator_req_finish(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req); /* * sde_rotator_abort_inline_request - abort inline rotation request after start * This function allows inline rotation requests to be aborted after * sde_rotator_req_set_start has already been issued. * @mgr: Pointer to rotator manager * @private: Pointer to rotator manager per file context * @req: Pointer to rotation request * return: none */ void sde_rotator_abort_inline_request(struct sde_rot_mgr *mgr, struct sde_rot_file_private *private, struct sde_rot_entry_container *req); /* * sde_rotator_handle_request_common - add the given request to rotator * manager and clean up completed requests Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_dev.c +10 −0 Original line number Diff line number Diff line Loading @@ -1714,6 +1714,16 @@ int sde_rotator_inline_commit(void *handle, struct sde_rotator_inline_cmd *cmd, sde_rotator_req_finish(rot_dev->mgr, ctx->private, req); sde_rotator_retire_request(request); } else if (cmd_type == SDE_ROTATOR_INLINE_CMD_ABORT) { if (!cmd->priv_handle) { ret = -EINVAL; SDEROT_ERR("invalid private handle\n"); goto error_invalid_handle; } request = cmd->priv_handle; sde_rotator_abort_inline_request(rot_dev->mgr, ctx->private, request->req); } sde_rot_mgr_unlock(rot_dev->mgr); Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_inline.h +2 −0 Original line number Diff line number Diff line Loading @@ -27,12 +27,14 @@ * @SDE_ROTATOR_INLINE_CMD_COMMIT: commit command to hardware * @SDE_ROTATOR_INLINE_CMD_START: ready to start inline rotation * @SDE_ROTATOR_INLINE_CMD_CLEANUP: cleanup after commit is done * @SDE_ROTATOR_INLINE_CMD_ABORT: abort current commit and reset */ enum sde_rotator_inline_cmd_type { SDE_ROTATOR_INLINE_CMD_VALIDATE, SDE_ROTATOR_INLINE_CMD_COMMIT, SDE_ROTATOR_INLINE_CMD_START, SDE_ROTATOR_INLINE_CMD_CLEANUP, SDE_ROTATOR_INLINE_CMD_ABORT, }; /** Loading
drivers/media/platform/msm/sde/rotator/sde_rotator_r1.c +7 −0 Original line number Diff line number Diff line Loading @@ -349,6 +349,12 @@ static int sde_rotator_cancel_hw(struct sde_rot_hw_resource *hw, return 0; } static int sde_rotator_abort_hw(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry) { return 0; } static int sde_rotator_kickoff_entry(struct sde_rot_hw_resource *hw, struct sde_rot_entry *entry) { Loading Loading @@ -691,6 +697,7 @@ int sde_rotator_r1_init(struct sde_rot_mgr *mgr) mgr->hw_data = hw_data; mgr->ops_config_hw = sde_rotator_config_hw; mgr->ops_cancel_hw = sde_rotator_cancel_hw; mgr->ops_abort_hw = sde_rotator_abort_hw; mgr->ops_kickoff_entry = sde_rotator_kickoff_entry; mgr->ops_wait_for_entry = sde_rotator_wait_for_entry; mgr->ops_hw_alloc = sde_rotator_hw_alloc_ext; Loading