From 8d1b53b0225ba16782cf147c9fa91f1c20504e93 Mon Sep 17 00:00:00 2001 From: Fernando Pacheco Date: Fri, 24 Jul 2020 17:29:04 -0700 Subject: [PATCH] msm: camera: icp: Increase request queue depth for ICP contexts Some usecases need more than the original max depth of 20 for ICP contexts. Accommodate these usecases by increasing the max request depth only for ICP. CRs-Fixed: 2739277 Change-Id: Ibeda16aa439b49815cbefc3a76580092351c3572 Signed-off-by: Fernando Pacheco --- drivers/cam_core/cam_context.h | 1 + drivers/cam_icp/cam_icp_context.c | 2 +- drivers/cam_icp/cam_icp_context.h | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/cam_core/cam_context.h b/drivers/cam_core/cam_context.h index 1f2f8154ae99..c959edb8a2cf 100644 --- a/drivers/cam_core/cam_context.h +++ b/drivers/cam_core/cam_context.h @@ -20,6 +20,7 @@ struct cam_context; /* max request number */ #define CAM_CTX_REQ_MAX 20 +#define CAM_CTX_ICP_REQ_MAX 36 #define CAM_CTX_CFG_MAX 20 #define CAM_CTX_RES_MAX 20 diff --git a/drivers/cam_icp/cam_icp_context.c b/drivers/cam_icp/cam_icp_context.c index 6a9f57b65f68..c2edab7d3fd5 100644 --- a/drivers/cam_icp/cam_icp_context.c +++ b/drivers/cam_icp/cam_icp_context.c @@ -285,7 +285,7 @@ int cam_icp_context_init(struct cam_icp_context *ctx, } rc = cam_context_init(ctx->base, icp_dev_name, CAM_ICP, ctx_id, - NULL, hw_intf, ctx->req_base, CAM_CTX_REQ_MAX); + NULL, hw_intf, ctx->req_base, CAM_CTX_ICP_REQ_MAX); if (rc) { CAM_ERR(CAM_ICP, "Camera Context Base init failed"); goto err; diff --git a/drivers/cam_icp/cam_icp_context.h b/drivers/cam_icp/cam_icp_context.h index edd8bd5617c9..1062e8f005ff 100644 --- a/drivers/cam_icp/cam_icp_context.h +++ b/drivers/cam_icp/cam_icp_context.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #ifndef _CAM_ICP_CONTEXT_H_ @@ -19,7 +19,7 @@ struct cam_icp_context { struct cam_context *base; struct cam_ctx_ops *state_machine; - struct cam_ctx_request req_base[CAM_CTX_REQ_MAX]; + struct cam_ctx_request req_base[CAM_CTX_ICP_REQ_MAX]; uint32_t state; void *ctxt_to_hw_map; };