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

Commit 1084d0b5 authored by Yan He's avatar Yan He Committed by Gerrit - the friendly Code Review server
Browse files

msm: sps: avoid register read for ignored debugging messages



When the detailed logging is not enabled, pr_debug() will not
output the logging message. However, the parameters of pr_debug()
are still calculated. Thus, the parameters involving register read
could consume significant CPU time when the function with this kind
of logging message is invoked frequently. The fix here is to ignore
the operation of logging involving register access when the
detailed logging is disabled.

Change-Id: I1aff13c6f054c319034d7a47356bdd345741f159
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent a6b58f17
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -1510,6 +1510,7 @@ int sps_bam_pipe_transfer_one(struct sps_bam *dev,
					       next_write);
	}

	if (dev->ipc_loglevel == 0)
		SPS_DBG(dev,
			"sps:%s: BAM phy addr:%pa; pipe %d; write pointer to tell HW: 0x%x; write pointer read from HW: 0x%x\n",
			__func__, BAM_ID(dev), pipe_index, next_write,
@@ -1802,6 +1803,7 @@ static void pipe_handler_eot(struct sps_bam *dev, struct sps_pipe *pipe)
	/* Get offset of last descriptor completed by the pipe */
	end_offset = bam_pipe_get_desc_read_offset(&dev->base, pipe_index);

	if (dev->ipc_loglevel == 0)
		SPS_DBG(dev,
			"sps:%s; pipe index:%d; read pointer:0x%x; write pointer:0x%x; sys.acked_offset:0x%x.\n",
			__func__, pipe->pipe_index, end_offset,