From 13d3363ece2f01cde58d4fe605f3bacef29dfbd9 Mon Sep 17 00:00:00 2001 From: jjpprrrr Date: Thu, 19 Aug 2021 00:45:23 +0200 Subject: [PATCH] sdm710-common: powerhint: set /dev/cpu_dma_latency value in hex /dev/cpu_dma_latency accepts values in either s32 or hex format, so convert 67 (dec) to 43 (hex). sdm845-common comment: I assume Google meant to set cpu dma latency to 44 in decimal rather than hex because 44 is the lowest valid latency value for C3 LPM state, according to qcom,latency-us in sdm845-pm.dtsi. The pm qos request is only active when the fd is kept open, so the dummy value of 100 does not really matter. Keep it as is. Test: hexdump -C /dev/cpu_dma_latency 00000000 2c 00 00 00 |,...| 00000004 Test: kernel pr_err() in pm_qos_power_write() before pm_qos_update_request() Inspired by Artem's commit "qos: Workaround for faulty libperfmgr config". Signed-off-by: Chenyang Zhong --- configs/powerhint.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configs/powerhint.json b/configs/powerhint.json index 2a8d345..2ca1f75 100644 --- a/configs/powerhint.json +++ b/configs/powerhint.json @@ -179,7 +179,7 @@ "Name": "PMQoSCpuDmaLatency", "Path": "/dev/cpu_dma_latency", "Values": [ - "67", + "43", "100" ], "HoldFd": true @@ -322,7 +322,7 @@ "PowerHint": "LAUNCH", "Node": "PMQoSCpuDmaLatency", "Duration": 5000, - "Value": "67" + "Value": "43" }, { "PowerHint": "LAUNCH", @@ -412,7 +412,7 @@ "PowerHint": "CAMERA_LAUNCH", "Node": "PMQoSCpuDmaLatency", "Duration": 1000, - "Value": "67" + "Value": "43" }, { "PowerHint": "CAMERA_STREAMING_MID", @@ -472,7 +472,7 @@ "PowerHint": "CAMERA_SHOT", "Node": "PMQoSCpuDmaLatency", "Duration": 1000, - "Value": "67" + "Value": "43" }, { "PowerHint": "AUDIO_LAUNCH", @@ -484,7 +484,7 @@ "PowerHint": "AUDIO_LAUNCH", "Node": "PMQoSCpuDmaLatency", "Duration": 2000, - "Value": "67" + "Value": "43" }, { "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", @@ -496,7 +496,7 @@ "PowerHint": "AUDIO_STREAMING_LOW_LATENCY", "Node": "PMQoSCpuDmaLatency", "Duration": 0, - "Value": "67" + "Value": "43" } ] }