From c82525e3219af5527ce0a9d40aa0d35327f452a2 Mon Sep 17 00:00:00 2001 From: Om Deore Date: Thu, 27 Feb 2025 15:01:04 +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: I31edbebe06738bb56a8305957fde74388c4a5154 Signed-off-by: Om Deore --- kera/kera-dsp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kera/kera-dsp.dtsi b/kera/kera-dsp.dtsi index 3bd28a86..ddf2f69f 100644 --- a/kera/kera-dsp.dtsi +++ b/kera/kera-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 bcd55c2a7bf01eef24cbe8d3ee1d0e6d57ee334e Mon Sep 17 00:00:00 2001 From: Om Deore Date: Thu, 27 Feb 2025 15:04:26 +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: Ia1b0a105b79fb450d1fe3437ad88b3ce5d9fd943 Signed-off-by: Om Deore --- kera/kera-dsp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kera/kera-dsp.dtsi b/kera/kera-dsp.dtsi index ddf2f69f..d4a41047 100644 --- a/kera/kera-dsp.dtsi +++ b/kera/kera-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 e0847f2bb351627dc60272883f48b5be7404f1d6 Mon Sep 17 00:00:00 2001 From: Om Deore Date: Thu, 27 Feb 2025 15:07:20 +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: I59b2611e2ebe3f5d33650666a8ad7912d79cc1d1 Signed-off-by: Om Deore --- kera/kera-dsp.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kera/kera-dsp.dtsi b/kera/kera-dsp.dtsi index d4a41047..34cd57ea 100644 --- a/kera/kera-dsp.dtsi +++ b/kera/kera-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>;