Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1410796lqj; Mon, 3 Jun 2024 23:58:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWCYOrsinYIJKNQQvKFgKkcccXfi9BqGHTdzOH21i4HRy+r6m0S80UEwK+eKg/9EZ79B7SgEgs/pbSdZbJD18xzhJmo1DlIL0CKud+BSw== X-Google-Smtp-Source: AGHT+IEbPksf1KJ/PtI9COWoPGB5cN7xwXLIn+r7Olsi6RTOnFuWDDf9/iqW0M2K8xj5umUIC3cw X-Received: by 2002:a05:6359:4c8d:b0:19c:3b76:2116 with SMTP id e5c5f4694b2df-19c3b764c25mr145637555d.11.1717484293940; Mon, 03 Jun 2024 23:58:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717484293; cv=pass; d=google.com; s=arc-20160816; b=zg5pu0kyW9HUZLGWsXXlpXGjickEIHL1+Pmtf306jYrow/BqSUgwlXJPm9+k9cdhM2 T9GYifEm75J27YqfKKJVtPUCQPAtHg/YsB/97mdjDjHUgXktETPLsgokYtUWA0cpTApH +SZ3SfJP3JwZjU4OlOuNXh9Hpftjd958a6nVq5JKidp/qGAbTn1GjQxEMFdqmf4uONqo K70kcHnBszUUDudnFvq+swKGdRxnWOcYTM7FMQ9JfiTmaA+WY6eJfZ6Ei3ayFql+A/TF zvYVq2YVixmAVnj7iwTJXDMX1HrPGDwZDduJU1iwKPW3+Kez5el9ocG6gTKHU36JOMkb ZE0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=7c3nb+7azuxd71hyVzQ9JDWmVC1llrC8TgSr7KR9524=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=q/rk9S1gmNWhUq4nGp4cQB4/Dr8iDFWiXN/p/At9yfDpWB+MQaq1LgDqrE7Tgh/KZu CZry4zeouwRQQ4FQyshRgjcL+JwSQ9xf1t8lJE76JCGyIdoMxsn0np066wTOsvQKInMn d05KuWWkq7/jxjn4Atyc+wz8n9IH7e24oz974/DsklHUv/KO7IDvmyroxUkgBjBICYOd RHT+WR++gvsa+vT56fQUIc3h6rQv5zhnuehjUqT7Cs0t7ZSyH5PL5fWRnVgvOZo3OOVj 7NUPjlHQqH9oRg1R8HysAxIg0kyJnCVDdQRY+9RE1uZhL9/ZZshYO02OQ4Bp97vlr6QA Zf5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FL5gpbHm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35c73b83fsi7692116a12.725.2024.06.03.23.58.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 23:58:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FL5gpbHm; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199926-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199926-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 83A4DB258B3 for ; Tue, 4 Jun 2024 01:56:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 918C3140E2F; Tue, 4 Jun 2024 01:54:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FL5gpbHm" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (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 7F83713D8B2 for ; Tue, 4 Jun 2024 01:54:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717466080; cv=none; b=VM6QLq4nMKvv12m3KUU2YRiQqrsEVos1CENxdMAfVZegvXIHvTX5nVREuqk8PV/7vYaD6yuCURrktaHMshGRH4scHZuhSAdV7UiW3g/3e1FO/1kjtmEWGYk2YO4gT3mouKuISskQvOn/zInOBAlJMr70EvG00BWgMCAkbOHbHTg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717466080; c=relaxed/simple; bh=gcVUdhVM6KwB99b7OFzWjZ/BBZdHQiOtwXYtd2+KA+I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=u4lSDFm76w/aElTaaPOfEmClptmmNkqZe4c1SnqksqREXxoB7S2sR4lOVjRK/n0Ttl1zXXRf9IedsBQFeE539HJNJkzSAXWspQAf1U9zPDuBe4cm/iOA99YRTbB55ZExWhexvG/ySp7r/JUSMvTQ8fZtgdk3n+BtbaXKxagPYk8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=FL5gpbHm; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717466079; x=1749002079; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gcVUdhVM6KwB99b7OFzWjZ/BBZdHQiOtwXYtd2+KA+I=; b=FL5gpbHmswqWlvgbMoIZUAg3aC7e4NA6gaMdEiJ3zfBKvNsz4q/X9qT8 P2/o8X04zhfy3PcLQKIGtO+4kSrvyFMXnFPDhcrU8kPxf4saGljctvqSB yGhPtA3ikr/noNfTuNWjNaFZrs6rdYKDYGXUKSsVLUwKz+aATQwUOHR// fg6uDTsKrG3wzjgv8KS++rbZWd/OEOs5/WWgMkd3Cfk/G/wy7ThbZAHIo 9nuJJzAqF0ox+v2neVI6Qx2GT2Zs04Wip5hsYx7MB0B7rbMLNJTsZt4VL 5hEXtilWyIA5qvb6va3gKhUq8M8v2LyJXWfgqBLqt9ZPvxz9HyUAbQYC0 w==; X-CSE-ConnectionGUID: otzPST2pQdiStmDDaB1LrQ== X-CSE-MsgGUID: Lpts8uLORXSyje8V+nCtGA== X-IronPort-AV: E=McAfee;i="6600,9927,11092"; a="25385002" X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="25385002" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2024 18:54:39 -0700 X-CSE-ConnectionGUID: DnPnbKhAQ6KevfMrXwRsWg== X-CSE-MsgGUID: pW7vflF4TpC0dcW3FuGODA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="37661878" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by orviesa008.jf.intel.com with ESMTP; 03 Jun 2024 18:54:35 -0700 From: Lu Baolu To: Joerg Roedel , Will Deacon , Robin Murphy , Jason Gunthorpe , Kevin Tian Cc: Yi Liu , David Airlie , Daniel Vetter , Kalle Valo , Bjorn Andersson , Mathieu Poirier , Alex Williamson , mst@redhat.com, Jason Wang , Thierry Reding , Jonathan Hunter , Mikko Perttunen , iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v2 09/22] media: nvidia: tegra: Use iommu_paging_domain_alloc() Date: Tue, 4 Jun 2024 09:51:21 +0800 Message-Id: <20240604015134.164206-10-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604015134.164206-1-baolu.lu@linux.intel.com> References: <20240604015134.164206-1-baolu.lu@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit An iommu domain is allocated in tegra_vde_iommu_init() and is attached to vde->dev. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu --- drivers/media/platform/nvidia/tegra-vde/iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/nvidia/tegra-vde/iommu.c b/drivers/media/platform/nvidia/tegra-vde/iommu.c index 5521ed3e465f..b1d9d841d944 100644 --- a/drivers/media/platform/nvidia/tegra-vde/iommu.c +++ b/drivers/media/platform/nvidia/tegra-vde/iommu.c @@ -78,9 +78,10 @@ int tegra_vde_iommu_init(struct tegra_vde *vde) arm_iommu_release_mapping(mapping); } #endif - vde->domain = iommu_domain_alloc(&platform_bus_type); - if (!vde->domain) { - err = -ENOMEM; + vde->domain = iommu_paging_domain_alloc(dev); + if (IS_ERR(vde->domain)) { + err = PTR_ERR(vde->domain); + vde->domain = NULL; goto put_group; } -- 2.34.1