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

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

Merge "msm: npu: Reduce maximum stats buffer size"

parents 7ce5b5ba 022eebdc
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@
#define NPU_MAX_REGULATOR_NUM	2
#define NPU_MAX_DT_NAME_LEN	    21
#define NPU_MAX_PWRLEVELS		8
#define NPU_MAX_STATS_BUF_SIZE 16384

/* -------------------------------------------------------------------------
 * Data Structures
+2 −2
Original line number Diff line number Diff line
@@ -1116,9 +1116,9 @@ static int npu_exec_network_v2(struct npu_client *client,
		return -EINVAL;
	}

	if (req.stats_buf_size > MSM_NPU_MAX_STATS_BUF_SIZE) {
	if (req.stats_buf_size > NPU_MAX_STATS_BUF_SIZE) {
		pr_err("Invalid stats buffer size %d max %d\n",
			req.stats_buf_size, MSM_NPU_MAX_STATS_BUF_SIZE);
			req.stats_buf_size, NPU_MAX_STATS_BUF_SIZE);
		return -EINVAL;
	}

+1 −1
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ static struct npu_network *alloc_network(struct npu_host_ctx *ctx,
		network->fw_error = false;
		network->cmd_pending = false;
		network->client = client;
		network->stats_buf = kzalloc(MSM_NPU_MAX_STATS_BUF_SIZE,
		network->stats_buf = kzalloc(NPU_MAX_STATS_BUF_SIZE,
			GFP_KERNEL);
		if (!network->stats_buf) {
			free_network(ctx, network->id);
+0 −1
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@
#define MSM_NPU_MAX_OUTPUT_LAYER_NUM 4
#define MSM_NPU_MAX_PATCH_LAYER_NUM (MSM_NPU_MAX_INPUT_LAYER_NUM +\
	MSM_NPU_MAX_OUTPUT_LAYER_NUM)
#define MSM_NPU_MAX_STATS_BUF_SIZE 65536

/* -------------------------------------------------------------------------
 * Data Structures