浏览代码

msm: camera: cci: Increase HW block support for CCI

Increase hw block support for CCI to 3 for v780 and
onwards.

CRs-Fixed: 3042539
Change-Id: I4a6b594a22373047e243bfefa22d304eab969e71
Signed-off-by: Jigarkumar Zala <[email protected]>
Jigarkumar Zala 3 年之前
父节点
当前提交
1d400147b7
共有 2 个文件被更改,包括 5 次插入6 次删除
  1. 4 5
      drivers/cam_sensor_module/cam_cci/cam_cci_dev.c
  2. 1 1
      drivers/cam_sensor_module/cam_cci/cam_cci_dev.h

+ 4 - 5
drivers/cam_sensor_module/cam_cci/cam_cci_dev.c

@@ -11,19 +11,18 @@
 
 #define CCI_MAX_DELAY 1000000
 
-static struct v4l2_subdev *g_cci_subdev[MAX_CCI];
+static struct v4l2_subdev *g_cci_subdev[MAX_CCI] = { 0 };
 static struct dentry *debugfs_root;
 
 struct v4l2_subdev *cam_cci_get_subdev(int cci_dev_index)
 {
 	struct v4l2_subdev *sub_device = NULL;
 
-	if (cci_dev_index < MAX_CCI)
+	if ((cci_dev_index < MAX_CCI) && (g_cci_subdev[cci_dev_index] != NULL))
 		sub_device = g_cci_subdev[cci_dev_index];
 	else
-		CAM_WARN(CAM_CCI, "Index: %u is beyond max num CCI allowed: %u",
-			cci_dev_index,
-			MAX_CCI);
+		CAM_WARN(CAM_CCI, "CCI subdev not available at Index: %u, MAX_CCI : %u",
+			cci_dev_index, MAX_CCI);
 
 	return sub_device;
 }

+ 1 - 1
drivers/cam_sensor_module/cam_cci/cam_cci_dev.h

@@ -59,7 +59,7 @@
 
 #define CAM_CCI_WORKQUEUE_NAME "cam_cci_wq"
 
-#define MAX_CCI 2
+#define MAX_CCI 3
 
 #define PRIORITY_QUEUE (QUEUE_0)
 #define SYNC_QUEUE (QUEUE_1)