Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp351760lqp; Mon, 10 Jun 2024 06:17:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXcWxCDV7dz2Abs0t1RJyfXBvCqKO/Je2GMz7JFHFTm92aUX+TxvzDQVzYqI4rpCQKmbbfKSuMMlz+Y30XsIPsjsNnUETkaBRoVU+e3Ug== X-Google-Smtp-Source: AGHT+IFE7D+AuhhxeZdf9PkmiHP5CMERKIN7rY+o5ywxa4DA51gtmEyQQRD9Z1KCUCSOZ+ZtIjS8 X-Received: by 2002:a17:90a:d686:b0:2c2:e41a:565a with SMTP id 98e67ed59e1d1-2c2e41a5769mr4099687a91.16.1718025435016; Mon, 10 Jun 2024 06:17:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718025435; cv=pass; d=google.com; s=arc-20160816; b=wepX2lOQAXq2DIDOKi8Qj0H3U2omftEW8hpLpNSj64kz5XaAT3FBNa+7ipqgfnKzak vAiRHRd/9VqpX44JP6TkjHNW+QogALMZQGD14/foj0Bce/VyJlzmXC7XjilC98jkBBfB ezM1NkYO0zCa8qzphJ4aPpQs3a9YsHfZyucpboRtpfl9+L0SleObsq/APHDi9Ccv/HNL TUckmwfJZygZ0hYWUydNtwgtbJgJfytGS5s58HJCDN2ztlOkgI/oUtKZ+86Pcj+9MdCX jJhVFiUUEeRn5dBd8WzI8OCj79wm/rDJPRt6SwVBgLDa6lZa30Xr1zT/UR425vCRUB68 tvEw== 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=oMfgzkEw/ooUXqvARCgNaSZrpwGw5y27+DEhhPidNdU=; b=RXHbj8hMAW90Yki9T/uSWmtGgeSdUuaRyGFHLzksAKC8u0kNa8mzIsC06DUt8xYfVJ VkabNGbW+YmAez3D+xXWaxmiAZpVfLnPMdEZ6GPAFXb1bWYF4QL7zH95P+QmO7G8o/+g EXjRHVkVmGuPAiAi9OCdUA1WeGRbgi140UsD8T8tRvsUTzWgNca8Bky+uxBt14FGAIUG 41+HLGWlDTfMLPUbnYc9+iyvIs8yxSOKxodCPPPW/usGUTqV91MJO3tDpHkwIlbo+N9z Nt3pwjY3KsyPMmnhiRGEHJ4jE1AJf2gA4nN/z7fnrn4VjfEyxcopGXe0bkIZlXeTXc2k nDzA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z3VsvgX2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207894-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2d112df16si3799238a91.126.2024.06.10.06.17.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 06:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z3VsvgX2; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207894-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207894-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 96DA8284981 for ; Mon, 10 Jun 2024 09:01:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0BC297F49B; Mon, 10 Jun 2024 08:58:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Z3VsvgX2" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 EB3B8768EF for ; Mon, 10 Jun 2024 08:58:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009929; cv=none; b=HIB1OFE9nvcSZnazmnYJdhn+Nw1soAXPncYtzdOTxLdUl8rGjv28uSp+KfbUthOQu8FeudgDkmV1PferdyuNjO6eWI8sumgzoVvWPPK/On9+1bfwVneEVp6OLZ14l6WNTF2SIBguR9UMx7nh3V/2n9ofon5LSg0n9itM9St8/DM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009929; c=relaxed/simple; bh=GbpYXxZBS+r4Y0EiK3BFmXVZKaFfLeJ2IAlI0t0Upno=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AFajLn3cU5viqNEC91e9Yj+a/c2BmIJmRbYjH99jwMmkD4gEMWv2vy9slIoAzonUlxfYHHQsJtAdpoJf3UFKmJzkhuomc3M7hJw5Bz9XtBC8G+WgaSzhBFYoMjXr1ZPs7FUzsvOxtWpDPQoX3VSF6Wfp1uyG5deLZQHjjozm5bc= 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=Z3VsvgX2; arc=none smtp.client-ip=192.198.163.13 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=1718009928; x=1749545928; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GbpYXxZBS+r4Y0EiK3BFmXVZKaFfLeJ2IAlI0t0Upno=; b=Z3VsvgX2vVlLgjm1BsrPRPQJpDPhKtvMcNfQA/5PX7bE2VOa2mBCi06A zZl2RiRitOfEw+89RTsGZmmfBlc51vDd5F8kFZiEIWKq3MB8K/UUSarvs v0q16NOutn6IrzS641kmPdqif32vItkT1X8DZkOMmjDwNuoenZC7gQ90m +Hme+MigYqwSLCsz1CBoIcueCEHTGuf+HdD6KmQGRKouMN/Ma0dbByzr2 88TGXY+zBt275/ZaTYK3mPpGlij479nqFm1ZIiS+6WtGX+ELjy3lN0HYM l+saF0Srs+tuZE5Ox4EgHJDGqFAh4pLY4RMQ0yIvLG77t15lFR2hTxZid g==; X-CSE-ConnectionGUID: ndx2wThmSoCs/ASo/Xfy/g== X-CSE-MsgGUID: yyx1AdmGTTyo5HazXwEsGg== X-IronPort-AV: E=McAfee;i="6600,9927,11098"; a="17581624" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="17581624" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 01:58:47 -0700 X-CSE-ConnectionGUID: VamhjrgFQlaSd3fZomawuA== X-CSE-MsgGUID: APBKRNmnS5KOzuWJvg3h1Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="43432531" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by fmviesa003.fm.intel.com with ESMTP; 10 Jun 2024 01:58:43 -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 , Jeff Johnson , ath10k@lists.infradead.org, ath11k@lists.infradead.org, iommu@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v3 06/21] drm/nouveau/tegra: Use iommu_paging_domain_alloc() Date: Mon, 10 Jun 2024 16:55:40 +0800 Message-Id: <20240610085555.88197-7-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240610085555.88197-1-baolu.lu@linux.intel.com> References: <20240610085555.88197-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