From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CB5032AABD for ; Thu, 27 Nov 2025 11:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764242114; cv=none; b=grX3vOVgHrXD6UDderJ2RXiTgGG1L/jdiyvgMrSL9xEhwAFNH9sUpdd5P6ri3JCmgbYMHxu4dsjtLhTy2xU2EyssJGF9G1npnrMYboisWjuo8KpWqRP/8bEqufnuKtVJAJK3Uj699HpDBURxHrevfiRZxAqOl/fhkBHItObuvOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764242114; c=relaxed/simple; bh=6WgfxlPID8Y3QmuhFS0bEtxUOha/js9WouYybXVTkxI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=R/cp7QgSnZM0S2GaW/B2HGwizQAfM6/vBGaR5kTvmaqqkhhiKJSXcFm43uJKe5VRpFiLYrowwQzJB1PNgkQXTNBiqeSQjYNiDB6DoWZFf8DfDLOOIW702dF/Y4dG9NZtOjXAJpMO9eLqqMMqYoQBny4BK1GsDCMcmmGud2jnSfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=eEy8uYLc; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=XEJpQpoX; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="eEy8uYLc"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="XEJpQpoX" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5ARAQJbl288807 for ; Thu, 27 Nov 2025 11:15:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ouZiG8FF8rCLx+8FqKvK99eWw/YkoBy6dG2bF+fQFWQ=; b=eEy8uYLcZqem5tvu 3mkyJNaz7g5++SkXoqbmRQ1yLo1V0l7qNknXu+57tZzpW1kVjB1Ii74VJfbg4nMW hLOpiQLrNwin4CADnFkxz4WRDnogZ8IHpexd4EdZW1W7AZ8TcVn9R+Ir3JNE1QL1 9rVeplvk5WZuH7Mf1nDWHGjmRCWSxJIxtNR1PremE2LW+FT2ZZonyPYqU0DE7Y2B YgmYUjsafFQN+t4tdu5oSSXO9VZjRWQEAjvtRfL6YvOOobwr1FzQJzYZsDa2ecOw Fv4pxSxVDE4y/g0H8osFl65cxLNreAKKo9nmkVaDeE9SEpEiB6Uh6kUzEZ5evbCE Xlnz7A== Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4apmvxg3ws-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 27 Nov 2025 11:15:11 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-bbcf3bd4c8fso540653a12.0 for ; Thu, 27 Nov 2025 03:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1764242111; x=1764846911; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ouZiG8FF8rCLx+8FqKvK99eWw/YkoBy6dG2bF+fQFWQ=; b=XEJpQpoXHoMDFar5bLBIC74qEnEtyjXDVz9CR9k3Y1VzoSuGi68o/BquUcU/VZhhcx cIZsx8TLoE1REnU/r89nui7oP4UtpoHCASnNiqBq9qXSamrQTbsUy96KXghR854J+VBu NtLgcgXBtwl45/aH/iiEmLOEFgfUexLpLwFwGHeeA5O8T0/tOthzQ5NM1yxsSQuWj03e S2nQvGJTGBfhkcx7CVHun4P3gRWPTMxlavcXJns8ia7/UOXcre6KzKHsfvCcNKUooy0n Vt0EcSj3yLg4/VxxYbRbZsAjovAxcC9JTXDOOwXNkUu3AuzSKlALP8Amp1rnMChbL9kf UzsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764242111; x=1764846911; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ouZiG8FF8rCLx+8FqKvK99eWw/YkoBy6dG2bF+fQFWQ=; b=jlHD2kfjpxOd7bB6NgIfCL4g/HUA9FGG8NT2ElIViCT6WJ8+8RS4aoSOTx+xxMxyQ9 sx/VftJ92bivH8tFMv0pdfXSdF5fre9vkwQutaWa2zDhQAYxL8HaE3gEJiEueuWf1E+I Jc/J2zWouwHwkvs15/l48tlg2ZIJCzIQU90imEZXNnt/oz+q0yTuuu4AipevG/Qz1Dwk nHQemRb+zfnvOyTDo11B6eXGvWeUU2y0fK9iuNcIhOMjJDEX5JRlpU78eG6h2BDi7fWo 1F+RFwulK+avfaJOC8/7bAfZjUVysx8Pj4I+8gVA07cFAtH8najXqK8HSqrvU2QxbzfM RGrA== X-Forwarded-Encrypted: i=1; AJvYcCWHDNdwmvQ3WUPaKuPzN3zeQG1rZglXD6+ulCtAFNx/F83TnmyoDGXqzN4fem1SxYxoT8LkbEaGFLuW8hw=@vger.kernel.org X-Gm-Message-State: AOJu0YzG2nww66yGeMZ7BH5lk9qf+lwK43zPWQtPm0MjubE6sVMX3lPp XQK1Rq0Y0GF0OOkdojPvYL3dUjX5B64Qb/TzzMhpp5anPJLXarzDhjwZIQIv1kKU9/00WaJD+Uq NLYdBedy9jmi+9/qXDaYRm2phiqmjWyPtIBWU9Q6O7m2l0PFxEc5TbLMwLzlSgxIO2YU= X-Gm-Gg: ASbGncuQNvFFvIqzyeTSZ7weEFkQUUHETHNSoL+xYnuTGzz7L9H2PYZKxAmNqn/TfF2 IaqV0jqNpaXiDrdBqqUT/JbNWdmE2AlrFiLIjiUC7EknLi2kGIuwba8Fhn1UEfftBlD/kUPl6xk TSeJIaVXum61vmvaQfOKoYSzTxEqWORxo4VXmae3mwO8mIPljzyTZjLUN5Y8X1Sh0Fm/kE8KpAC RiSeJm2nLplG5+k6RotadMZXHZ+eBgfiZSaqxNL+sAsKLlIdBH6QzL3jieOMGLSBQgThz4IKroM DCk+NuPtk0Ais/tTHSklwtlxHQ5EXmhEeCdsuU27Xej500js31GFpPs5o6geY3qaJbQZxMM0io1 P+3mlLhycgNgF0iWVXHv6tt6kfJifdlc8FqFR X-Received: by 2002:a05:6a21:328f:b0:263:616e:b61d with SMTP id adf61e73a8af0-3613e56b300mr28425907637.23.1764242110675; Thu, 27 Nov 2025 03:15:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQMpXZfz/1tQ1M+zSZqz12+vq3ETE0Igc96Qyd9T1FJRvajJ/vF8AzDuqyu15xoKFLcakbBA== X-Received: by 2002:a05:6a21:328f:b0:263:616e:b61d with SMTP id adf61e73a8af0-3613e56b300mr28425872637.23.1764242110078; Thu, 27 Nov 2025 03:15:10 -0800 (PST) Received: from [10.218.29.36] ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-be4fbde37d7sm1671813a12.13.2025.11.27.03.15.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 27 Nov 2025 03:15:09 -0800 (PST) Message-ID: <9b4c895a-c822-40e6-bb92-8fdcd09c82d3@oss.qualcomm.com> Date: Thu, 27 Nov 2025 16:44:15 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] iommu/arm-smmu: add actlr settings for mdss and fastrpc To: Konrad Dybcio , Charan Teja Kalla , robin.clark@oss.qualcomm.com, will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, dmitry.baryshkov@oss.qualcomm.com Cc: iommu@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20251105075307.1658329-1-charan.kalla@oss.qualcomm.com> <02d7c0a9-0d24-4fd8-980a-da9d7307588a@oss.qualcomm.com> Content-Language: en-US From: Bibek Kumar Patro In-Reply-To: <02d7c0a9-0d24-4fd8-980a-da9d7307588a@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=Vtguwu2n c=1 sm=1 tr=0 ts=692832bf cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=COk6AnOGAAAA:8 a=j0LsKdlxD3o4FQvCk1AA:9 a=UnacWq3ggp9slQcj:21 a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-GUID: oSsfpG6_rIMrD4GKk8XBuuYmzdVE8HuR X-Proofpoint-ORIG-GUID: oSsfpG6_rIMrD4GKk8XBuuYmzdVE8HuR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTI3MDA4MiBTYWx0ZWRfXzs+cdpJbxRxd EmDcMjP67EGXFRdKkawCpoXHbg8zyIk/HijUhxD5O+M3JmdtThNTLoiBSzNtYPrA6wJfri1Q3fM JWeOKSfVTJ6dzYlrpbPqFt9H+WeyJH++fY/RCkXh+u3iabGVFxWsJFCCIuIZo7Le64TQ4uB8vFN +3VfGqm+yu08jwXCZhiRlK1RQq/jDrecf7KzaXT4HmgmOZ7dywA7v4sRs+F/Xhq8nXTb7K//Kfk cXf/Gjuz6SfhIdYlSv2FDczgJvhs0xVD5dlJVwDOQCfSHH832r9vBl72LYckUl9NMv0cL14LVXE rrm/cuf68HEmx3KCOkKQtWp4Gt1C/CawE/PVLwasgLfUvWNeuWKWI9TFwT8vESrP9J+MR5H5W1J NUeVbFp4pjuuX6t8nXeq3acPNLqFQQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2025-11-25_02,2025-11-26_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 impostorscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511270082 On 11/12/2025 7:32 PM, Konrad Dybcio wrote: > On 11/11/25 3:02 PM, Charan Teja Kalla wrote: >> >> >> On 11/5/2025 2:44 PM, Konrad Dybcio wrote: >>>> + { .compatible = "qcom,fastrpc-compute-cb", >>>> + .data = (const void *) (PREFETCH_DEEP | CPRE | CMTLB) }, >>> This will be globally applied to all smmu-v2 targets with fastrpc, >>> starting from MSM8996 ending at Kaanapali and everything inbetween >>> >>> Are these settings always valid? >> Oops, you are correct...this settings are not always applicable it seems. >> >> Example: lpass compute and cdsp compute node uses the >> "qcom,fastrpc-compute-cb", but it is for the later that ACTLR settings >> are valid. >> >> Then for these cases, should we be extending the actlr match array with >> additional compatible string and then add them in all the device nodes >> that require actlr setting? example: >> >> @@ -3119,7 +3119,8 @@ fastrpc { >> compute-cb@1 { >> - compatible = "qcom,fastrpc-compute-cb"; >> + compatible = "qcom,fastrpc-compute-cb", >> + "qcom,fastrpc-compute-cb-actlr"; > > dt-bindings (and especially compatible strings) must not be altered solely > to work around a driver being suboptimal > > But because you reported that these settings can change both between > platforms and instances of the same devices on these platforms, we could > possibly reconsider adding ACTRL settings to the consumer device nodes > where they stray away from the otherwise seemingly reasonable baseline > we have in the driver so far.. > During initial discussion of ACTLR design phase, It was concluded that prefetch alike QoS settings are not hardware definitions, and device tree would not be the right place to store such configurable/tunable settings [1]. So it might be contradicting to add it in consumer nodes. For fastrpc client, there are 2 hiccups: 1. For a particular SoC, Different SIDs of compute client are using the same compatible "qcom,fastrpc-compute-cb" but can have different prefetch settings e.g. CDSP and ADSP have same compat string "qcom,fastrpc-compute-cb" with different labels. e.g. fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "adsp"; /*---different label: adsp---*/ compute-cb@3 { compatible = "qcom,fastrpc-compute-cb"; reg = <3>; /*---Prefetch Default---*/ iommus = <&apps_smmu 0x1003 0x80>, <&apps_smmu 0x1063 0x0>; dma-coherent; fastrpc { compatible = "qcom,fastrpc"; qcom,glink-channels = "fastrpcglink-apps-dsp"; label = "cdsp"; /*---Different Label: cdsp---*/ qcom,non-secure-domain; #address-cells = <1>; #size-cells = <0>; compute-cb@1 { compatible = "qcom,fastrpc-compute-cb"; reg = <1>; /*---Prefetch DEEP----*/ iommus = <&apps_smmu 0x1961 0x0>, <&apps_smmu 0x0c01 0x20>, <&apps_smmu 0x19c1 0x10>; 2. Different SoCs having the same compatible string and same label but different prefetch settings. e.g: in below table sm6550, sm8250 and sm8550 compat string = "qcom,fastrpc-compute-cb" and label = "cdsp" but prefetch settings are different As per my idea both the above cases could be resolved by compat string addition, case 1 : compatible = "qcom,fastrpc-compute-cb-cdsp"; case 2 : compatible = "qcom,sm8550-fastrpc-compute-cb-cdsp" This discrpeancy is not applicable for other clients, except fastrpc. One way both the above cases could be resolved by additional fastrpc compat string with below format: compatible = "qcom,-fastrpc-compute-cb-" e.g: "qcom,sm8550-fastrpc-compute-cb-cdsp", "qcom,sm6550-fastrpc-compute-cb-adsp" This should handle both case 1 & case 2. But as you mentioned previously this might need change alteration of DT bindings addition which might not be allowed or favoured always. [1]: https://lore.kernel.org/all/a01e7e60-6ead-4a9e-ba90-22a8a6bbd03f@quicinc.com/ > Or we could introduce some more bespoke matching logic. > > I would like to know more about the scope of this issue, i.e. the matrix > of (soc, device, actlr_val) that needs special handling. > +---------+-----------------------------------------------+----------+ | SoC | Description | Prefetch | +---------+-----------------------------------------------+----------+ | sc7180 | qcom,fastrpc-compute-cb | label = cdsp | DEEP | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sc7280 | qcom,fastrpc-compute-cb | label = cdsp | DEEP | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sm6115 | qcom,fastrpc-compute-cb | label = cdsp | DEFAULT | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sm6125 | qcom,fastrpc-compute-cb (NA upstream) | | +---------+-----------------------------------------------+----------+ | sm6350 | qcom,fastrpc-compute-cb | label = cdsp | SHALLOW | | | qcom,fastrpc-compute-cb | label = adsp | SHALLOW | +---------+-----------------------------------------------+----------+ | sm8250 | qcom,fastrpc-compute-cb | label = cdsp | DEFAULT | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | | | qcom,fastrpc-compute-cb | label = sdsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sm8350 | qcom,fastrpc-compute-cb | label = cdsp | DEEP | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | | | qcom,fastrpc-compute-cb | label = sdsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sm8450 | qcom,fastrpc-compute-cb | label = cdsp | DEEP | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | | | qcom,fastrpc-compute-cb | label = sdsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sm8550 | qcom,fastrpc-compute-cb | label = cdsp | DEEP | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | +---------+-----------------------------------------------+----------+ | sm8650 | qcom,fastrpc-compute-cb | label = cdsp | DEEP | | | qcom,fastrpc-compute-cb | label = adsp | DEFAULT | +---------+-----------------------------------------------+----------+ Thanks & regards, Bibek > Konrad