From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796198147; b=AD32Pc3Fikl0kUPhrZ60YrGzHo6IfUm+4S57mcMzKg4DKhW7Cz5m0mJQf3FBJRBv6DY0 0W0FyiENQoHjXJzLATA8DEZEQj7ImugGTcbKH8NkRL3x97xbxnXvCO9j0rytjzjQy5+sQ 9ZFI+BGI1Xb87NNzQq4/RyRmAjlM6eLjsb4D8edSIGUXDWd44Gxk359kzdbJiu3cQl+gA UXaKfk9cHXhXm608UNnsODetSE6QlB9rQs4kq8gIZo+hrTjPOu7fbUvzFGRmwnYXFuK5+ FwWDV+CzQp4ZatFF38kliGExVt552KVf70493pVWO0ElpVh+QvabsqMsooc05Z8qGzw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796198147; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To: References:MIME-Version:Content-Transfer-Encoding: X-Proofpoint-Reinject:X-QCInternal:X-QCInternal: X-Proofpoint-Spam-Info:X-Authority-Analysis:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=JkFeBAeIFGXP9H+b0e/Iowj6DYNaFp8sLF647Rx6ZZg=; b=jqk0kdSBh2YJ/lQUKrZeFLpVJo9REhi6F5I7cCaoIQAalme3f7Q21zEy/Yrz3s3PLotM oS3Vqsxp8mSMjZ3GuB5TXVn8JSQi5iCYXmvZ6PY5af353jOeI2VAycKC2QkgMYnxCE9ep etivBSH6dssgZDPdDEG7tYXxHKqdhN5r5erfBI+Iiaq9l3hTSmcLJQwLWTnv226888wdV UCCJfQl6ODKN6pm34QevUCOPRBBzUj6yZqFIenedJBU4nrMfSZSQLj0H2VaoDkFP2AHsk LD3LYmuyW59NpCwcM3i45iDLW7cxDgJNZynqLYwWXpP9Emy4K5+Az8X2LxHtImYdH/w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=FVChtQl3; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A1BB606A338; Wed, 2 Dec 2026 07:55:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3A1BB606A338 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=FVChtQl3 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B26p0km267783; Wed, 2 Dec 2026 07:55:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=JkFeBAeIFGX P9H+b0e/Iowj6DYNaFp8sLF647Rx6ZZg=; b=FVChtQl3rCXvQXMM/SB/bUcBxll PTDlahn22BDeKNvXs8Amiz4hxxhu0f8V8onYSS0i21Vm4ETWlj3suIwVvWRO1p/U xA+c/AkfNfyo1suVZKGSzRUeMSNXHDsytgMKlHDntBQebTSZcEkL3lTEphxoDlSK sEt99fBGA/3HGWXUo4V3muqJvi4RLW1JMZlzzxuezuI7a2E51f4P9zf5PIPuROTa NMkhtqCbK47uOUsIGtRyFqW1cEBFxxYBk/ak7uCdZxQYl1pLzDQ/Dl7fl+cHR3YP 2lvYwjfLn0xo+q0cgVV9VJrbAK5q2FHcV11gjb5hK6v8ds1f03Ci6QfBIYg== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4ja3ax2tt4-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 02 Dec 2026 07:55:17 +0000 (GMT) Received: from pps.filterd (apblrppmta02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B27tDX43251449; Wed, 2 Dec 2026 07:55:13 GMT Received: from hu-devc-hyd-u22-c.qualcomm.com (hu-mohis-hyd.qualcomm.com [10.147.253.64]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 6B27tDCW3251438 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Wed, 02 Dec 2026 07:55:13 +0000 (GMT) Received: by hu-devc-hyd-u22-c.qualcomm.com (Postfix, from userid 4840500) id 894F36AF; Wed, 2 Dec 2026 13:25:12 +0530 (+0530) From: Mohit Sharma To: Srinivas Kandagatla , Bjorn Andersson , Mark Brown Cc: Ajay Kumar Nandam , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Rob Clark , Will Deacon , Robin Murphy , Joerg Roedel , Konrad Dybcio , Abel Vesa , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mohit Sharma Subject: [PATCH v2 4/4] ASoC: qcom: q6apm-dai: Allow the mDSP IOMMU path Date: Wed, 2 Dec 2026 13:25:12 +0530 Message-Id: <20261202075512.3112173-5-mohit.sharma@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261202075512.3112173-1-mohit.sharma@oss.qualcomm.com> References: <20261202075512.3112173-1-mohit.sharma@oss.qualcomm.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Reinject: loops=2 maxloops=12 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAyMDAzMSBTYWx0ZWRfX3UsGSGGtuuaT eJjRQQ2QwzwP30+4X61iQ5Qbid8j8m3WsRm3m8UCX6n9xDVuhdGvkEY3SBqcM5CGAYDciveDbQM 8ZsznRc5EgxGFoD3SFy9TXaP86YOtG8= X-Authority-Analysis: v=2.4 cv=J5s/fwnS c=1 sm=1 tr=0 ts=6b0fcee5 cx=c_pps a=Ou0eQOY4+eZoSc0qltEV5Q==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=2pjKgLFfhSI-GXVsdeUA:9 X-Proofpoint-GUID: jyszB7e2e8TNqmsKS9MebSAMrU0uikLQ X-Proofpoint-ORIG-GUID: jyszB7e2e8TNqmsKS9MebSAMrU0uikLQ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAyMDAzMSBTYWx0ZWRfX1iCq8ge80uSX lm68ei5G1GgGQJQ1EtLPXyCom6LM4or8IDGjJKAlskVHwYJ7wSQQXbHFvIHL6tWxzDeYffadb6l piLQkx4tQYj2GI9gMyIHdMiXcJo82Xxe7udsSmgBqqpXL4CJPHHc4eEt8zvDisrx6Ls+2z4o4y4 uczIWy7LF3mscZSwoHpJ5agdbQAdnrtePoZc+OHd3xE1BNau1vm59KN49W3sKHEyl/c6ew7Ny9O NTgxhNpRG02bDiiJ+iBUljVWM/25jAEygn9ASx+LAbOo5gDmyb1iUTZt8oqetfYHnbWN7MjAlRa Y03yk1xAvb3SrdWsjHhMbffCUNSdNS6WKWy+JwfAMz/WNpe7dEOyZfKZ5+7GD/xYduNTYnT8Yd9 bFi+5z2FuKgYNAafwJOMn2S4zi3vjQtQb5BVtOfs5MmF0R4JAw2D3Yx/m+trg7dmTHu0M1hw5pu pXh2hjVS2W0jazQG+ZQ== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-02_02,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 spamscore=0 clxscore=1015 bulkscore=0 malwarescore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612020031 The q6apm DAI currently selects SCM buffer assignment solely from the GPR domain. This prevents an mDSP-backed DAI from using an IOMMU, even when the device tree provides an iommus property for environments where the mDSP stream is routed through the apps SMMU. Use the parsed stream ID to distinguish the two memory access models. An mDSP DAI without an IOMMU continues to use SCM-assigned buffers, while an mDSP DAI with an IOMMU follows the existing DMA/IOMMU path. This also avoids requiring SCM availability for the IOMMU configuration. Fixes: bb8afd437d79 ("ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms") Co-developed-by: Ajay Kumar Nandam Signed-off-by: Ajay Kumar Nandam Signed-off-by: Mohit Sharma --- sound/soc/qcom/qdsp6/q6apm-dai.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c index afa4bb095e09..94302837b93b 100644 --- a/sound/soc/qcom/qdsp6/q6apm-dai.c +++ b/sound/soc/qcom/qdsp6/q6apm-dai.c @@ -1221,16 +1221,11 @@ static int q6apm_dai_probe(struct platform_device *pdev) } if (apm && apm->gdev && - apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM) { + apm->gdev->domain_id == GPR_DOMAIN_ID_MODEM && + pdata->sid < 0) { if (!qcom_scm_is_available()) return -EPROBE_DEFER; - if (pdata->sid >= 0) { - dev_err(dev, - "iommus and mDSP SCM path are mutually exclusive\n"); - return -EINVAL; - } - pdata->use_scm_assign = true; rc = devm_add_action_or_reset(dev, q6apm_dai_scm_cleanup, -- 2.34.1