msm: eva: Avoid using wrong bus client to vote

Fix a racing between power voting and SSR shutdown.

Change-Id: I75c13353174a514ef175056dd98f827a987bff7a
Signed-off-by: George Shen <quic_sqiao@quicinc.com>
This commit is contained in:
George Shen
2023-06-22 12:50:47 -07:00
committed by Gerrit - the friendly Code Review server
parent fef6ef9ce5
commit b029f87904
2 changed files with 4 additions and 1 deletions

View File

@@ -219,6 +219,9 @@ int msm_cvp_update_power(struct msm_cvp_inst *inst)
return -ECONNRESET; return -ECONNRESET;
core = inst->core; core = inst->core;
if (!core || core->state == CVP_CORE_UNINIT)
return -ECONNRESET;
clocks = &core->resources.clock_set; clocks = &core->resources.clock_set;
cl = &clocks->clock_tbl[clocks->count - 1]; cl = &clocks->clock_tbl[clocks->count - 1];
if (!cl->has_scaling) { if (!cl->has_scaling) {

View File

@@ -290,7 +290,7 @@ int msm_cvp_map_buf_dsp(struct msm_cvp_inst *inst, struct eva_kmd_buffer *buf)
file = msm_cvp_fget(buf->fd, inst->task, FMODE_PATH, 1); file = msm_cvp_fget(buf->fd, inst->task, FMODE_PATH, 1);
if (file == NULL) { if (file == NULL) {
dprintk(CVP_WARN, "%s fail to get file from fd\n", __func__); dprintk(CVP_WARN, "%s fail to get file from fd %d %s\n", __func__, buf->fd, inst->proc_name);
return -EINVAL; return -EINVAL;
} }