Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58c3182b authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: cpas: increase the max number of clients of cpas" into dev/msm-4.9-camx

parents bb7f28b7 2eec4f2b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1250,7 +1250,7 @@ static int cam_cpas_util_client_setup(struct cam_hw_info *cpas_hw)
	struct cam_cpas *cpas_core = (struct cam_cpas *) cpas_hw->core_info;
	int i;

	for (i = 0; i < CPAS_MAX_CLIENTS; i++) {
	for (i = 0; i < CAM_CPAS_MAX_CLIENTS; i++) {
		mutex_init(&cpas_core->client_mutex[i]);
		cpas_core->cpas_client[i] = NULL;
	}
@@ -1263,7 +1263,7 @@ static int cam_cpas_util_client_cleanup(struct cam_hw_info *cpas_hw)
	struct cam_cpas *cpas_core = (struct cam_cpas *) cpas_hw->core_info;
	int i;

	for (i = 0; i < CPAS_MAX_CLIENTS; i++) {
	for (i = 0; i < CAM_CPAS_MAX_CLIENTS; i++) {
		if (cpas_core->cpas_client[i]) {
			cam_cpas_hw_unregister_client(cpas_hw, i);
			cpas_core->cpas_client[i] = NULL;
+5 −4
Original line number Diff line number Diff line
@@ -17,13 +17,14 @@
#include "cam_cpas_hw_intf.h"
#include "cam_common_util.h"

#define CPAS_MAX_CLIENTS 20
#define CAM_CPAS_MAX_CLIENTS 30
#define CAM_CPAS_INFLIGHT_WORKS 5

#define CAM_CPAS_GET_CLIENT_IDX(handle) (handle)
#define CAM_CPAS_GET_CLIENT_HANDLE(indx) (indx)

#define CAM_CPAS_CLIENT_VALID(indx) ((indx >= 0) && (indx < CPAS_MAX_CLIENTS))
#define CAM_CPAS_CLIENT_VALID(indx) \
	((indx >= 0) && (indx < CAM_CPAS_MAX_CLIENTS))
#define CAM_CPAS_CLIENT_REGISTERED(cpas_core, indx)        \
	((CAM_CPAS_CLIENT_VALID(indx)) && \
	(cpas_core->cpas_client[indx]))
@@ -176,8 +177,8 @@ struct cam_cpas_axi_port {
 */
struct cam_cpas {
	struct cam_cpas_hw_caps hw_caps;
	struct cam_cpas_client *cpas_client[CPAS_MAX_CLIENTS];
	struct mutex client_mutex[CPAS_MAX_CLIENTS];
	struct cam_cpas_client *cpas_client[CAM_CPAS_MAX_CLIENTS];
	struct mutex client_mutex[CAM_CPAS_MAX_CLIENTS];
	uint32_t num_clients;
	uint32_t registered_clients;
	uint32_t streamon_clients;
+1 −1
Original line number Diff line number Diff line
@@ -14,8 +14,8 @@
#define _CAM_CPAS_SOC_H_

#include "cam_soc_util.h"
#include "cam_cpas_hw.h"

#define CAM_CPAS_MAX_CLIENTS 20
#define CAM_REGULATOR_LEVEL_MAX 16

/**