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

Commit 6c62eceb authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: npu: Increase maximum patch number for v2 commands"

parents 79df7547 6a523c77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
#define NPU_MAX_DT_NAME_LEN	    21
#define NPU_MAX_PWRLEVELS		8
#define NPU_MAX_STATS_BUF_SIZE 16384
#define NPU_MAX_PATCH_NUM		160
#define NPU_MAX_BW_DEVS			4

enum npu_power_level {
+6 −4
Original line number Diff line number Diff line
@@ -1142,9 +1142,10 @@ static int npu_load_network_v2(struct npu_client *client,
		return -EFAULT;
	}

	if (req.patch_info_num > MSM_NPU_MAX_PATCH_LAYER_NUM) {
	if ((req.patch_info_num > NPU_MAX_PATCH_NUM) ||
		(req.patch_info_num == 0)) {
		NPU_ERR("Invalid patch info num %d[max:%d]\n",
			req.patch_info_num, MSM_NPU_MAX_PATCH_LAYER_NUM);
			req.patch_info_num, NPU_MAX_PATCH_NUM);
		return -EINVAL;
	}

@@ -1229,9 +1230,10 @@ static int npu_exec_network_v2(struct npu_client *client,
		return -EFAULT;
	}

	if (req.patch_buf_info_num > MSM_NPU_MAX_PATCH_LAYER_NUM) {
	if ((req.patch_buf_info_num > NPU_MAX_PATCH_NUM) ||
		(req.patch_buf_info_num == 0)) {
		NPU_ERR("Invalid patch buf info num %d[max:%d]\n",
			req.patch_buf_info_num, MSM_NPU_MAX_PATCH_LAYER_NUM);
			req.patch_buf_info_num, NPU_MAX_PATCH_NUM);
		return -EINVAL;
	}