msm: camera: mem_mgr: Add refcount to track in use buffers
The function cam_mem_mgr_release can unmap the buffers when in use. This change prevents unmapping the buffers when in use. CRs-Fixed: 3489559 Change-Id: I2e72e795d39ac15abfa56c19043c419a03686966 Signed-off-by: Shivakumar Malke <quic_smalke@quicinc.com>
这个提交包含在:

提交者
Camera Software Integration

父节点
87913e552d
当前提交
6d99262523
@@ -966,6 +966,7 @@ static int cam_isp_ctx_dump_req(
|
||||
CAM_ERR(CAM_ISP,
|
||||
"Invalid offset exp %u actual %u",
|
||||
req_isp->cfg[i].offset, (uint32_t)len);
|
||||
cam_mem_put_cpu_buf(req_isp->cfg[i].handle);
|
||||
return -EINVAL;
|
||||
}
|
||||
remain_len = len - req_isp->cfg[i].offset;
|
||||
@@ -976,6 +977,7 @@ static int cam_isp_ctx_dump_req(
|
||||
"Invalid len exp %u remain_len %u",
|
||||
req_isp->cfg[i].len,
|
||||
(uint32_t)remain_len);
|
||||
cam_mem_put_cpu_buf(req_isp->cfg[i].handle);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1001,6 +1003,7 @@ static int cam_isp_ctx_dump_req(
|
||||
return rc;
|
||||
} else
|
||||
cam_cdm_util_dump_cmd_buf(buf_start, buf_end);
|
||||
cam_mem_put_cpu_buf(req_isp->cfg[i].handle);
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
@@ -5294,6 +5297,7 @@ hw_dump:
|
||||
CAM_WARN(CAM_ISP,
|
||||
"Dump buffer overshoot len %zu offset %zu, ctx_idx: %u, link: 0x%x",
|
||||
buf_len, dump_info->offset, ctx->ctx_id, ctx->link_hdl);
|
||||
cam_mem_put_cpu_buf(dump_info->buf_handle);
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
@@ -5306,6 +5310,7 @@ hw_dump:
|
||||
CAM_WARN(CAM_ISP,
|
||||
"Dump buffer exhaust remain %zu min %u, ctx_idx: %u, link: 0x%x",
|
||||
remain_len, min_len, ctx->ctx_id, ctx->link_hdl);
|
||||
cam_mem_put_cpu_buf(dump_info->buf_handle);
|
||||
return -ENOSPC;
|
||||
}
|
||||
|
||||
@@ -5411,10 +5416,12 @@ hw_dump:
|
||||
&ife_dump_args);
|
||||
dump_info->offset = ife_dump_args.offset;
|
||||
}
|
||||
cam_mem_put_cpu_buf(dump_info->buf_handle);
|
||||
return rc;
|
||||
|
||||
end:
|
||||
spin_unlock_bh(&ctx->lock);
|
||||
cam_mem_put_cpu_buf(dump_info->buf_handle);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户