Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1322423lqj; Mon, 3 Jun 2024 18:56:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+J2P62cQx7gcvHUqrthTDTfwAV1J/hOt/73w0N9SPt4PAjd0uDRzzcl0eEM/ZHgAQGmA2gR+6fpyl440qi2kiLjguKL62szn4J+3Taw== X-Google-Smtp-Source: AGHT+IE0vTpJ7d19yIJRlEBDcH54fQXS6K5phNZYGQ4TLSEQbfy2cNQQWvgKlguG/amyHDODB1hu X-Received: by 2002:a05:620a:1450:b0:794:8226:710c with SMTP id af79cd13be357-794f5eceacfmr1138238085a.70.1717466159731; Mon, 03 Jun 2024 18:55:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717466159; cv=pass; d=google.com; s=arc-20160816; b=sbrYuFdE8LxohjsHD3K568LuXnQEeuz7bRQ9wITTDe6KvYUxEht/RYa8eG1M/h/Ul4 L7OFrUQlvrOz2ELG4AFp9jWyW0S8uM1wpA4CfcBWwLzhgXTVE94egK2S9w38pmn3WqC+ LLa3sShR7O+FeHilmWkK2NfZ2BOTxK45FlwDQ8COOV+UGLo8t8maf+sesXgGD9eSzWaZ ub2+SY9br2NdfGYiIsOBZwEwJecn8r8edwTLCFMjRoHg4H+rZyJDYpIyFxhh+sfwtF3n g3RRyF6J1VmWBdvB9eeQs1sFV9HYBKR3K+f+19M/A3mHF1eR/DK51eCNj8DxzEyn/2Ai p/gw== 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=vOv+YN9h4ibDJtSzat5oLqqAArjLOrl0DnJ23PxND9Y=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=d83yz53leSYTiQPKmlDrnT+Zsbi+4aKBdKUIkEVV4bQ3GJrNiAmqqOeiG3yiskzT8s 2kRpmL0mklBc/3FMvTzTi3xRcfDCqcE19EAnxjJW42K+zhWUZ8IJbQGnWy3oL7THR1Rr K/T5GlH+Eu8rThPbQfeAC6uy9Q9heZyaBNjV5Q2d/F2w1KgpiQomlkvGg51zoXrOP1jI 9V8N3MTvmjJjHAgnCVv8XNFvfDdI+/yAO7qju5g9PJtUDbEVUgxEP+Vne5mLwPgeAxAP TgtOpxTcj0tvJJvVwSX5I91XkeWtwi6NCsqeoK642MUVb+8IwWocXHgqvmBFoRhxUU+2 Z9lQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Knq+jsgG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199924-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199924-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id af79cd13be357-794f32a72f2si969187685a.658.2024.06.03.18.55.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 18:55:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199924-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Knq+jsgG; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199924-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199924-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 768B01C23D7C for ; Tue, 4 Jun 2024 01:55:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 98A8D13D88B; Tue, 4 Jun 2024 01:54:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Knq+jsgG" 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 8056713D889 for ; Tue, 4 Jun 2024 01:54:29 +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=1717466070; cv=none; b=I0YCt4GZf2vBrGiIzwPXpWzgkWpgDEbGg7w5nl7ye48a0stz4+QHM9Av4J4tlL9md7d/ax8baxuB1qgzAo552vOMT1u3ZlgahoGOdC8Z3pSx46M1loZmUoYgUd5dFUpRVEvnQ5KlZonRAcdSl0Ylv5VQl0RwogerfwCDtHE6zo0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717466070; c=relaxed/simple; bh=GbpYXxZBS+r4Y0EiK3BFmXVZKaFfLeJ2IAlI0t0Upno=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EOvMxK2FrY2nz1kPU4PAcRXq/beUv985v40vrcOVHdVrDS9ns8tMaz29Vjtci3sHSgeBPPIUkZJdiLH5NwzIflCryHZl8Ll/4ckL0jOSNT5K+/GHeB8brqNX+aDU47vWJ8gwNIrF7G3R6lpb5iHSC+iajw8pYtzr1+IQuR7wSLk= 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=Knq+jsgG; 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=1717466069; x=1749002069; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GbpYXxZBS+r4Y0EiK3BFmXVZKaFfLeJ2IAlI0t0Upno=; b=Knq+jsgG4xMPmNKhDliI/BnsXKIVvkC+YjH9fLmnSz5LoxrLzSoh0WxX 6Nsf38vjwbM1TQv8PMFFABjaRddOPkXG18XkFr9RvvtL5BnLWAT+/xTff L5DF2EoQyXSHHg7IdBCGSagCHKygIv8EaOZ9JzMu0Yu1lcj7FhTHyWkUA gGcYEsd9fpYEUy5zzXpB4iaTyyDStCAOmS7giJa/AzKBFV8LmVt6ef5eU 5z/LbNH+fgR0Va60PwLvWL5fnqtJtyHJPEgzmDgNwXirgzbhfRowhpjUb 3g0DBJRRX4/5a/rF2WnW7YF38D3Y/GilHxet/kuc80oN0+DcKETPr6fLe g==; X-CSE-ConnectionGUID: ZjYk3wZsRVqugSpsYWZsig== X-CSE-MsgGUID: XVefv/QtTtqNZdkL8SR79w== X-IronPort-AV: E=McAfee;i="6600,9927,11092"; a="25384969" X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="25384969" 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:29 -0700 X-CSE-ConnectionGUID: szQ8yndbQgaTpYGWEJJX9g== X-CSE-MsgGUID: 5NNfCBxmSl2dOFakvCmPOQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="37661857" 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:25 -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 07/22] drm/nouveau/tegra: Use iommu_paging_domain_alloc() Date: Tue, 4 Jun 2024 09:51:19 +0800 Message-Id: <20240604015134.164206-8-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 In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev and attached to it on success. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index 87caa4a72921..763c4c2925f9 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -120,8 +120,8 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev) mutex_init(&tdev->iommu.mutex); if (device_iommu_mapped(dev)) { - tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type); - if (!tdev->iommu.domain) + tdev->iommu.domain = iommu_paging_domain_alloc(dev); + if (IS_ERR(tdev->iommu.domain)) goto error; /* -- 2.34.1