Merge "msm: vidc: remove redundant init_completion() calls"

This commit is contained in:
Linux Build Service Account 2016-12-19 00:44:39 -08:00 committed by Gerrit - the friendly Code Review server
commit 1e762c1ec1
2 changed files with 0 additions and 25 deletions

View file

@ -2481,7 +2481,6 @@ static int msm_comm_session_abort(struct msm_vidc_inst *inst)
} }
hdev = inst->core->device; hdev = inst->core->device;
abort_completion = SESSION_MSG_INDEX(HAL_SESSION_ABORT_DONE); abort_completion = SESSION_MSG_INDEX(HAL_SESSION_ABORT_DONE);
init_completion(&inst->completions[abort_completion]);
rc = call_hfi_op(hdev, session_abort, (void *)inst->session); rc = call_hfi_op(hdev, session_abort, (void *)inst->session);
if (rc) { if (rc) {
@ -2663,8 +2662,6 @@ static int msm_comm_init_core(struct msm_vidc_inst *inst)
__func__); __func__);
} }
init_completion(&core->completions
[SYS_MSG_INDEX(HAL_SYS_INIT_DONE)]);
rc = call_hfi_op(hdev, core_init, hdev->hfi_device_data); rc = call_hfi_op(hdev, core_init, hdev->hfi_device_data);
if (rc) { if (rc) {
dprintk(VIDC_ERR, "Failed to init core, id = %d\n", dprintk(VIDC_ERR, "Failed to init core, id = %d\n",
@ -2768,8 +2765,6 @@ static int msm_comm_session_init(int flipped_state,
dprintk(VIDC_ERR, "Invalid session\n"); dprintk(VIDC_ERR, "Invalid session\n");
return -EINVAL; return -EINVAL;
} }
init_completion(
&inst->completions[SESSION_MSG_INDEX(HAL_SESSION_INIT_DONE)]);
rc = call_hfi_op(hdev, session_init, hdev->hfi_device_data, rc = call_hfi_op(hdev, session_init, hdev->hfi_device_data,
inst, get_hal_domain(inst->session_type), inst, get_hal_domain(inst->session_type),
@ -2907,8 +2902,6 @@ static int msm_vidc_start(int flipped_state, struct msm_vidc_inst *inst)
inst, inst->state); inst, inst->state);
goto exit; goto exit;
} }
init_completion(
&inst->completions[SESSION_MSG_INDEX(HAL_SESSION_START_DONE)]);
rc = call_hfi_op(hdev, session_start, (void *) inst->session); rc = call_hfi_op(hdev, session_start, (void *) inst->session);
if (rc) { if (rc) {
dprintk(VIDC_ERR, dprintk(VIDC_ERR,
@ -2938,8 +2931,6 @@ static int msm_vidc_stop(int flipped_state, struct msm_vidc_inst *inst)
goto exit; goto exit;
} }
dprintk(VIDC_DBG, "Send Stop to hal\n"); dprintk(VIDC_DBG, "Send Stop to hal\n");
init_completion(
&inst->completions[SESSION_MSG_INDEX(HAL_SESSION_STOP_DONE)]);
rc = call_hfi_op(hdev, session_stop, (void *) inst->session); rc = call_hfi_op(hdev, session_stop, (void *) inst->session);
if (rc) { if (rc) {
dprintk(VIDC_ERR, "Failed to send stop\n"); dprintk(VIDC_ERR, "Failed to send stop\n");
@ -2969,8 +2960,6 @@ static int msm_vidc_release_res(int flipped_state, struct msm_vidc_inst *inst)
} }
dprintk(VIDC_DBG, dprintk(VIDC_DBG,
"Send release res to hal\n"); "Send release res to hal\n");
init_completion(&inst->completions[
SESSION_MSG_INDEX(HAL_SESSION_RELEASE_RESOURCE_DONE)]);
rc = call_hfi_op(hdev, session_release_res, (void *) inst->session); rc = call_hfi_op(hdev, session_release_res, (void *) inst->session);
if (rc) { if (rc) {
dprintk(VIDC_ERR, dprintk(VIDC_ERR,
@ -3001,8 +2990,6 @@ static int msm_comm_session_close(int flipped_state,
} }
dprintk(VIDC_DBG, dprintk(VIDC_DBG,
"Send session close to hal\n"); "Send session close to hal\n");
init_completion(
&inst->completions[SESSION_MSG_INDEX(HAL_SESSION_END_DONE)]);
rc = call_hfi_op(hdev, session_end, (void *) inst->session); rc = call_hfi_op(hdev, session_end, (void *) inst->session);
if (rc) { if (rc) {
dprintk(VIDC_ERR, dprintk(VIDC_ERR,
@ -4048,8 +4035,6 @@ int msm_comm_try_get_prop(struct msm_vidc_inst *inst, enum hal_property ptype,
} }
mutex_unlock(&inst->sync_lock); mutex_unlock(&inst->sync_lock);
init_completion(&inst->completions[
SESSION_MSG_INDEX(HAL_SESSION_PROPERTY_INFO)]);
switch (ptype) { switch (ptype) {
case HAL_PARAM_PROFILE_LEVEL_CURRENT: case HAL_PARAM_PROFILE_LEVEL_CURRENT:
case HAL_CONFIG_VDEC_ENTROPY: case HAL_CONFIG_VDEC_ENTROPY:
@ -4279,8 +4264,6 @@ int msm_comm_release_scratch_buffers(struct msm_vidc_inst *inst,
if (inst->state != MSM_VIDC_CORE_INVALID && if (inst->state != MSM_VIDC_CORE_INVALID &&
core->state != VIDC_CORE_INVALID) { core->state != VIDC_CORE_INVALID) {
buffer_info.response_required = true; buffer_info.response_required = true;
init_completion(&inst->completions[SESSION_MSG_INDEX
(HAL_SESSION_RELEASE_BUFFER_DONE)]);
rc = call_hfi_op(hdev, session_release_buffers, rc = call_hfi_op(hdev, session_release_buffers,
(void *)inst->session, &buffer_info); (void *)inst->session, &buffer_info);
if (rc) { if (rc) {
@ -4351,9 +4334,6 @@ int msm_comm_release_persist_buffers(struct msm_vidc_inst *inst)
if (inst->state != MSM_VIDC_CORE_INVALID && if (inst->state != MSM_VIDC_CORE_INVALID &&
core->state != VIDC_CORE_INVALID) { core->state != VIDC_CORE_INVALID) {
buffer_info.response_required = true; buffer_info.response_required = true;
init_completion(
&inst->completions[SESSION_MSG_INDEX
(HAL_SESSION_RELEASE_BUFFER_DONE)]);
rc = call_hfi_op(hdev, session_release_buffers, rc = call_hfi_op(hdev, session_release_buffers,
(void *)inst->session, &buffer_info); (void *)inst->session, &buffer_info);
if (rc) { if (rc) {

View file

@ -934,8 +934,6 @@ err_create_pkt:
return rc; return rc;
} }
static DECLARE_COMPLETION(release_resources_done);
static int __alloc_imem(struct venus_hfi_device *device, unsigned long size) static int __alloc_imem(struct venus_hfi_device *device, unsigned long size)
{ {
struct imem *imem = NULL; struct imem *imem = NULL;
@ -2172,8 +2170,6 @@ static int venus_hfi_core_init(void *device)
dev = device; dev = device;
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
init_completion(&release_resources_done);
rc = __load_fw(dev); rc = __load_fw(dev);
if (rc) { if (rc) {
dprintk(VIDC_ERR, "Failed to load Venus FW\n"); dprintk(VIDC_ERR, "Failed to load Venus FW\n");
@ -3460,7 +3456,6 @@ static int __response_handler(struct venus_hfi_device *device)
break; break;
case HAL_SYS_RELEASE_RESOURCE_DONE: case HAL_SYS_RELEASE_RESOURCE_DONE:
dprintk(VIDC_DBG, "Received SYS_RELEASE_RESOURCE\n"); dprintk(VIDC_DBG, "Received SYS_RELEASE_RESOURCE\n");
complete(&release_resources_done);
break; break;
case HAL_SYS_INIT_DONE: case HAL_SYS_INIT_DONE:
dprintk(VIDC_DBG, "Received SYS_INIT_DONE\n"); dprintk(VIDC_DBG, "Received SYS_INIT_DONE\n");