From ba3cccd0be106170642f18cf33995b6eb6ad79e4 Mon Sep 17 00:00:00 2001 From: Om Deore Date: Fri, 10 Jan 2025 17:05:41 +0530 Subject: [PATCH 1/3] arm64: dts: msm: Increase GLINK intents There is currently a potential for a deadlock in the DSP when it wants to send a GLINK message but is waiting for an intent. Increase the number of intents to 1 more than the number of DSP supported threads so that the DSP won't have to wait for intents. Change-Id: I6fa6239573926fb8cef3ce56b8c8a7833435e8ba Signed-off-by: Om Deore --- tuna/tuna-dsp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tuna/tuna-dsp.dtsi b/tuna/tuna-dsp.dtsi index 3bd28a86..ddf2f69f 100644 --- a/tuna/tuna-dsp.dtsi +++ b/tuna/tuna-dsp.dtsi @@ -7,7 +7,7 @@ qcom,fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; - qcom,intents = <0x64 64>; + qcom,intents = <0x181 64>; label = "adsp"; memory-region = <&adsp_mem_heap>; qcom,vmids = <22 37>; @@ -88,7 +88,7 @@ qcom,fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; - qcom,intents = <0x64 64>; + qcom,intents = <0x3fA 64>; label = "cdsp"; qcom,fastrpc-gids = <2908>; qcom,rpc-latency-us = <235>; From a2a0bc1cd8efb58f684e95355da518fe3ad4efb2 Mon Sep 17 00:00:00 2001 From: Om Deore Date: Wed, 15 Jan 2025 10:39:56 +0530 Subject: [PATCH 2/3] arm64: dts: msm: Enable GLINK RT callback handling GLINK changed to using a non-RT priority when handling channel callbacks. For FastRPC configure GLINK to use RT priority when handling channel callbacks to avoid any performance regression. Change-Id: Ie6e04caceb8ca4fcd9688975c3335ef5d6c7b1c8 Signed-off-by: Om Deore --- tuna/tuna-dsp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tuna/tuna-dsp.dtsi b/tuna/tuna-dsp.dtsi index ddf2f69f..d4a41047 100644 --- a/tuna/tuna-dsp.dtsi +++ b/tuna/tuna-dsp.dtsi @@ -8,6 +8,7 @@ compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x181 64>; + qcom,ch-sched-rt; label = "adsp"; memory-region = <&adsp_mem_heap>; qcom,vmids = <22 37>; @@ -89,6 +90,7 @@ compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x3fA 64>; + qcom,ch-sched-rt; label = "cdsp"; qcom,fastrpc-gids = <2908>; qcom,rpc-latency-us = <235>; From ca5254fe54f1c03e902157172946a47ed2d0514a Mon Sep 17 00:00:00 2001 From: Om Deore Date: Wed, 15 Jan 2025 10:32:11 +0530 Subject: [PATCH 3/3] arm64: dts: msm: Enable cb handing in irq context GLINK changed their default handling of channel callbacks from the irq context to a callback thread. This change impacted FastRPC performance. Configure FastRPC to use irq context to handle channel callbacks to fix the performance regression. Change-Id: I8ab7a69127e66e046d10f5bd226cfb74e6ba2318 Signed-off-by: Om Deore --- tuna/tuna-dsp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tuna/tuna-dsp.dtsi b/tuna/tuna-dsp.dtsi index d4a41047..34cd57ea 100644 --- a/tuna/tuna-dsp.dtsi +++ b/tuna/tuna-dsp.dtsi @@ -9,6 +9,7 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x181 64>; qcom,ch-sched-rt; + qcom,cb-irq; label = "adsp"; memory-region = <&adsp_mem_heap>; qcom,vmids = <22 37>; @@ -91,6 +92,7 @@ qcom,glink-channels = "fastrpcglink-apps-dsp"; qcom,intents = <0x3fA 64>; qcom,ch-sched-rt; + qcom,cb-irq; label = "cdsp"; qcom,fastrpc-gids = <2908>; qcom,rpc-latency-us = <235>;