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

Commit 3693d049 authored by Jilai Wang's avatar Jilai Wang
Browse files

msm: npu: Increase maximum patch number for v2 commands



Increase the maximum patch number for v2 commands to support
MIMO mode.

Change-Id: Id36b23a8b08e9cffe957cc0bee7ef3e496d68007
Signed-off-by: default avatarJilai Wang <jilaiw@codeaurora.org>
parent 9447b885
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -49,6 +49,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

enum npu_power_level {
	NPU_PWRLEVEL_MINSVS = 0,
+4 −4
Original line number Diff line number Diff line
@@ -1342,9 +1342,9 @@ 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) {
		pr_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;
	}

@@ -1467,9 +1467,9 @@ 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) {
		pr_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;
	}