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 D6CFE35839C for ; Mon, 20 Apr 2026 14:02:37 +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=1776693759; cv=none; b=c8T2ApY4/yiGd7NOnWFY2dkMHtRTqSZCO/UdzJile4cgd9hHaRHSqRzqfb760k4zaqsPmFTMn7YcdbHKitvm1edKQ2R2tnGhTCIrXvewJ3EXUwWHNbG8YI9r/MeU+z7NsTTPdc4fjfrz+UV3xrKN8lXfE5dDKruHd13rzJjHmuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776693759; c=relaxed/simple; bh=lGmqSKRT6CM/TxRcqxDkVJvKI4sTpx9Qlqby2pYKzIw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=FqDBgvWhZbVds8rdkTbd/YGQX0XgXwlKGxOAOhghXoN6G/WNonA6lSpol2t39AdGCXLlq0aCEO0B3ZMbXb9OWWfdHMsXcrqoMmiBVptprSmVM0V2yEVuyP/R1RV+DsBDzM1en7Y3yxnXLaR0BkuAp+z5NZ4eBYkEv1SpE+auTK8= 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=Sd9Al1z2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=dxnoR6Ic; 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="Sd9Al1z2"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="dxnoR6Ic" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 63KCj3Os1532093 for ; Mon, 20 Apr 2026 14:02:37 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= kzOPLkbup/xZQgzFN0xvKjJCRL775HS/q+EXgkWm92w=; b=Sd9Al1z2o0RljW9X gdXXQHjsnb3eduC3tOnsYEAI4Eae4XCFSS8Q4+hIr1FGuhKx1xiQavvugLpFHI2G hE3jdCyu6dCDDJckL1tImFbnrR37mQf/SWuvz+HeKWwJMelbZnoj8x7pJ9gJw7Bs g0lBCic/2MPo8XetUritDWxONQbTP5OB5/EJyX9AVILU2czuEM3A72KoxCRa2H94 DzH8Smi8PWyd7t3QguT16pNE2lyd+wfPqBwviZnsglcUKJxbvsUU4BUeAiebJp2Y HfPuNjF0R+rlOK4MkBDu6WH58SYe7MYWhEJfdZOTCpTVV/PvcJaRtzKz+6SiuPq8 wOLeLg== Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dnfus1pmm-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 20 Apr 2026 14:02:37 +0000 (GMT) Received: by mail-pg1-f198.google.com with SMTP id 41be03b00d2f7-c79798cd9b9so751478a12.2 for ; Mon, 20 Apr 2026 07:02:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1776693756; x=1777298556; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=kzOPLkbup/xZQgzFN0xvKjJCRL775HS/q+EXgkWm92w=; b=dxnoR6IcDWtnFuwISX4+u2a1VD9u1QzFuct1fAutOKeXgUAbBvPyfcFXiaQic+tqja qDHk/T+Q4HDpVkzwoDymM3a6UEH8BA4VYcOMg/CSNno9GKtB/1uyKCK/WDLmmpBVVS/B FVEdMczHzxJOWPmD5HyYHhWH0oWASMppiYBF9NeX2QjNkVgwhHGJLfSaOS6gBQgxcluZ VQtqkbCEXcfqmRJIlcZFlK9kbnhmm7TfA8MtPdn3TeUXnWs+njh5KkW8XEEpRUlGBkeE ZZIMbL4CrJCc43SLRT18FshYYKQ+yRMZmVi3GV3gMo08+QM1k82l6Aijg56T/fywcLzE qhng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776693756; x=1777298556; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language: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=kzOPLkbup/xZQgzFN0xvKjJCRL775HS/q+EXgkWm92w=; b=HF+0eJPQLSHU89U3K6BaUhhgkh5RafttvCVeZh0EgMP2GC04Dsw98RnZO24yycfaO0 ity5Ti8ZUucZFaZ523aSdC7ooGIuH5tHlmllx0lLuvpgfBnx36s7guuzBwAbPGcsasGQ j3xkLelykHNaZCu7W1uzpAAQrdoV+AjObpoUvteT48O7gQKCesTYqhZxzVxWG5iuvzH3 l0LgWiuzZuZGx9ZgspMiZIILtixsfUlKiQnz8qFlEzhGTemPthAtSHx8Nu4PhHsOUeLQ vcEgdhhSVAM/ovy1+CAVnG90Lqi/pnMPPPW10LB+9KruWH3KkPBR+2d6JTXjApHx6kak 7OoA== X-Forwarded-Encrypted: i=1; AFNElJ9+xzv8g3XC5/OZKleMfYrBwhWnZJ0hs4NEkl9gMhjQBBeOeq18dPh6eEILM5YMQrUNPTCOt3v5N5Da@vger.kernel.org X-Gm-Message-State: AOJu0YwolbugSaGOeDmvooecXmwQX4JUPSTPc8aGjonasAJpJMa+Rxjd K0HVEseB2kep5Vns1Ieuob4b/i0FwXxrqtAWb5NL9PZWSenu2NLXyoPu1TU8w26noDFZyBclDW0 25xBkoOOiWggvGYg7BNPFrgZy1j3oXCsoydgIeYvj2yUTjNBhrYWjJEUda8FzHA+o X-Gm-Gg: AeBDievRnuEvUZ6yqW4zX1NuMaLmEKZEfj0JjspX2Xs/JVk9uuasLtl1u9Hr1pyiQFg pVLJDTOgPpLKkXBjSsARunbYcDkNCUI8cG3YsuiKKmFqBJk1CAfCTz9aIfUnurORPHl1lv91iam nOwCgzkhezBBq11zdzl43vr6NRke8J8i135hwsp7cfI8Ow0pzu8z6VMXL+sZjKOvq+M8/yjG2EV 8RvjRoYctNGT/0wXQJSz8MMGEltrq/Y+7aPggdIBxRyXlsRO7GS2xL8xTGSuS6QY+laywO/UemH qxUuG3OYTvCdmo6dzfJV9f1bL6Q7C6cajSGuJSjlXn7pPUmLAjum1n0JLfB04NW34RIvJk1fjLX bdUIhygljE+BrkeaxXK1F5pa6QMkTBaMfTicSeWmoXpNKXDx61wvJV7+YEg99gZnW X-Received: by 2002:a05:6a00:391c:b0:781:2291:1045 with SMTP id d2e1a72fcca58-82f8c7d1002mr13029217b3a.8.1776693756117; Mon, 20 Apr 2026 07:02:36 -0700 (PDT) X-Received: by 2002:a05:6a00:391c:b0:781:2291:1045 with SMTP id d2e1a72fcca58-82f8c7d1002mr13028935b3a.8.1776693753924; Mon, 20 Apr 2026 07:02:33 -0700 (PDT) Received: from [10.206.105.200] ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8ec037e1sm13078240b3a.54.2026.04.20.07.02.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 20 Apr 2026 07:02:32 -0700 (PDT) Message-ID: <1f73fad2-1d53-dd35-2668-750eaf3fe00e@oss.qualcomm.com> Date: Mon, 20 Apr 2026 19:32:23 +0530 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 02/11] media: iris: Add iris vpu bus support and register it with iommu_buses Content-Language: en-US To: Dmitry Baryshkov Cc: Bryan O'Donoghue , Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Joerg Roedel , Will Deacon , Robin Murphy , Bjorn Andersson , Konrad Dybcio , Stefan Schmidt , Hans Verkuil , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev References: <20260414-glymur-v1-0-7d3d1cf57b16@oss.qualcomm.com> <20260414-glymur-v1-2-7d3d1cf57b16@oss.qualcomm.com> <5dee6da0-9170-d9e0-5ff7-f8436331c6a9@oss.qualcomm.com> <26b71f52-3355-d4e9-f640-007123e3aba2@oss.qualcomm.com> <7bnl34zyexz4z54fmz6ymax7izfey6nyp7lenhvfp3hkfmhdia@lssovgsnas72> From: Vishnu Reddy In-Reply-To: <7bnl34zyexz4z54fmz6ymax7izfey6nyp7lenhvfp3hkfmhdia@lssovgsnas72> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDIwMDEzNyBTYWx0ZWRfX7qxPWwBaWbV9 DZRTR5Xy5wpuHjVEMatEopZmG7yNnPU0axwhXPEtzYu7ggsCJN8meMVzOpbTNOklRxysdxfyUDz Atcsxc/an5Y5VCk1xy2N0uFCgW+FRY65s2sOfcgmQ+wdD2GnBfQrMH1Xjp++eXZrfi6sden0TtH wXz4Wz8/ngh0hUFbEK2otXh8JKZH/poluIrCe8I+eUx2gMRonKEU2pK7FG1p5rLxosgoy1tANyw +USMsiAviICf1giVAo+6v3yLwDO22STWRPkgpIYfpBkgXCLSNG44acjJcM9AJ02uwVy332KQm/j pYRMdTgXG4vIgOpTg1N7jyfqj3qfwOOzNOLgnXEe+ByFl9+X+P2OvzbAR29oRmF51u0kmYD+ttz 6I95FHFvn5CuAzWGgBOmbnoURMSniBtqyws4xOnbgzkVGlNnEs2lkAuNjf0GQ5aGs84DOllxQtl +kn8VXw00gjvHValnrA== X-Proofpoint-GUID: WT305iKHKbFYLzDHZjMY27fUmBj-j53h X-Authority-Analysis: v=2.4 cv=PMQ/P/qC c=1 sm=1 tr=0 ts=69e631fd cx=c_pps a=Qgeoaf8Lrialg5Z894R3/Q==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=yYSL5V0MIfFtLobc5GMA:9 a=QEXdDO2ut3YA:10 a=x9snwWr2DeNwDh03kgHS:22 X-Proofpoint-ORIG-GUID: WT305iKHKbFYLzDHZjMY27fUmBj-j53h X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-20_03,2026-04-17_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 spamscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604070000 definitions=main-2604200137 On 4/17/2026 11:49 PM, Dmitry Baryshkov wrote: > On Fri, Apr 17, 2026 at 08:29:21PM +0530, Vishnu Reddy wrote: >> apologies for re-sending (earlier responses was rejected due to HTML format) > Ugh. > >> On 4/17/2026 8:22 PM, Vishnu Reddy wrote: >>> On 4/14/2026 8:44 PM, Dmitry Baryshkov wrote: >>>> On Tue, Apr 14, 2026 at 10:29:58AM +0530, Vishnu Reddy wrote: >>>>> From: Vikash Garodia >>>>> >>>>> Add a dedicated iris VPU bus type and register it into the iommu_buses >>>>> list. Iris devices require their own bus so that each device can run its >>>>> own dma_configure() logic. >>>> This really tells nothing, unless one has full context about the Iris >>>> needs. Start by describing the issue (that the device needs to have >>>> multiple devices talking to describe IOMMUs / VAs for several hardware >>>> functions), then continue by describing what is needed from the IOMMU >>>> subsys. >>> This series handles firmware device which do not require multiple >>> devices part. >>> given this device need for specific IOMMU configuration, I'll update the >>> description >>> accordingly. >>> >>>>> Signed-off-by: Vikash Garodia >>>>> Signed-off-by: Vishnu Reddy >>>>> --- >>>>> drivers/iommu/iommu.c | 4 ++++ >>>>> drivers/media/platform/qcom/iris/Makefile | 4 ++++ >>>>> drivers/media/platform/qcom/iris/iris_vpu_bus.c | 32 +++++++++++++++++++++++++ >>>>> include/linux/iris_vpu_bus.h | 13 ++++++++++ >>>> How are you supposed to merge this? Through IOMMU tree? Through venus >>>> tree? Can we add one single bus to the IOMMU code and use it for Iris, >>>> Venus, FastRPC, host1x and all other device drivers which require >>>> per-device DMA configuration? >>> Separating out the bus definition and the Iris driver handling would >>> provide a >>> cleaner merge path. > Then why wasn't it done from the ground up? > >>>> Your colleagues from the FastRPC team posted a very similar code few >>>> weeks ago and got exactly the same feedback. Is there a reason why your >>>> teams don't sync on the IOMMU parts at all? >>> I would admit that I missed to review that, thank you for bringing that >>> discussion. >>> FastRPC patches generalizes the handling for host1x, FastRPC and the >>> same can be >>> extended for Iris. I have left few comments there. >>> >>>>> 4 files changed, 53 insertions(+) >>>>> >>>>> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c >>>>> index 61c12ba78206..d8ed6ef70ecd 100644 >>>>> --- a/drivers/iommu/iommu.c >>>>> +++ b/drivers/iommu/iommu.c >>>>> @@ -13,6 +13,7 @@ >>>>> #include >>>>> #include >>>>> #include >>>>> +#include >>>>> #include >>>>> #include >>>>> #include >>>>> @@ -179,6 +180,9 @@ static const struct bus_type * const iommu_buses[] = { >>>>> #ifdef CONFIG_CDX_BUS >>>>> &cdx_bus_type, >>>>> #endif >>>>> +#if IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS) >>>>> + &iris_vpu_bus_type, >>>>> +#endif >>>>> }; >>>>> /* >>>>> diff --git a/drivers/media/platform/qcom/iris/Makefile b/drivers/media/platform/qcom/iris/Makefile >>>>> index 2abbd3aeb4af..6f4052b98491 100644 >>>>> --- a/drivers/media/platform/qcom/iris/Makefile >>>>> +++ b/drivers/media/platform/qcom/iris/Makefile >>>>> @@ -31,3 +31,7 @@ qcom-iris-objs += iris_platform_gen1.o >>>>> endif >>>>> obj-$(CONFIG_VIDEO_QCOM_IRIS) += qcom-iris.o >>>>> + >>>>> +ifdef CONFIG_VIDEO_QCOM_IRIS >>>>> +obj-y += iris_vpu_bus.o >>>>> +endif >>>>> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_bus.c b/drivers/media/platform/qcom/iris/iris_vpu_bus.c >>>>> new file mode 100644 >>>>> index 000000000000..b51bb4b82b0e >>>>> --- /dev/null >>>>> +++ b/drivers/media/platform/qcom/iris/iris_vpu_bus.c >>>>> @@ -0,0 +1,32 @@ >>>>> +// SPDX-License-Identifier: GPL-2.0-only >>>>> +/* >>>>> + * Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved. >>>>> + */ >>>>> + >>>>> +#include >>>>> +#include >>>>> + >>>>> +#include "iris_platform_common.h" >>>>> + >>>>> +static int iris_vpu_bus_dma_configure(struct device *dev) >>>>> +{ >>>>> + const u32 *f_id = dev_get_drvdata(dev); >>>>> + >>>>> + if (!f_id) >>>>> + return -ENODEV; >>>>> + >>>>> + return of_dma_configure_id(dev, dev->parent->of_node, true, f_id); >>>> I think it was discussed that this is not enough. Some of devices need >>>> multiple function IDs. >>> In this glymur series we are following the legacy way of handling IOMMUs >>> and does not >>> require multi map. > Why can't we land the version that has multiple entries? It's as if the > teams are totally not in sync. The corresponding version is in works, it > has been implemented, etc. The main idea is to introduce firmware stream ID with iommu-map, while keeping the other stream IDs described in legacy iommus way. or, are you suggesting that, going forward, we should have VPU stream IDs described _only_ with iommu-map for any new dts/bindings? Thanks, Vishnu Reddy.