Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp425567lqb; Tue, 28 May 2024 22:38:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/877Wjv/x8WoE+YPjo2x7DuqI4249tXC0xEUEZcFkR2DlR5yK6bS9ItEVLPdr16v1t9iXzrhnAmJ6eCmpsJOAH7N1eSoazmWsedEV7A== X-Google-Smtp-Source: AGHT+IGQf0F7kK6jDlbQu1Sl3bZO/wO9N2ZFtsNEmbIw/NxS3ai2hsFBGHxefUa8Q4TWs2VZ3DTi X-Received: by 2002:a05:6214:5c08:b0:6a3:2ab4:ff27 with SMTP id 6a1803df08f44-6abbbc9576amr132805296d6.2.1716961118225; Tue, 28 May 2024 22:38:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716961118; cv=pass; d=google.com; s=arc-20160816; b=Xbtrxm0VPe2JrQeDEit7INUS7mrTNgLC7Zn/LiwoowWnpTYDjkvauPi4LjEd1h4lCN NQtneVheCCsjSWtlOsTOy4mJHu+78qVk395qKC8GIhaq3VzWn6bv+nS3scN7Wdf7f5aV XMizNTxzxF2FeuzbYtOYHTzNU22cZK2UuqvOW/sbF1g+5rsph0xt5dKcPlidoHLSkfLf BWu0UCjQBoZu1u4LE22e8TDwKry2SBEEcOucc/B+tzJVliIHscavgbq209LX3mvhUqNh 06qJrfQq978oCNFKpTWQ25xHJfuvms38nL8kr0FdYLqayLjR+XALI1tpVVz5PWE+ihMk EdjQ== 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=JT2BidKYh7XIG/AiBzwcsW6pkEsdyfCx3G7HnwbLnGg=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=NknKgUOedsCKlTRf0lsrdR1u6V6XdOp2BQ6+4jDvNFEBySHqomXVf1Wbg/Zv2aqlcD RkGQVO1xc5TJbETjWcSX5zT0n+pOpJsVTYcS/wKVkcpbhCmxk9cn4OuIeSBF6wrj8f2w HTim3wfbR2D7NkqnRbfre7YVjNtlgoYuwcAE2V3LkYv+43TrnpXiMEJg144dgl2/gFsD ZVo5FBsx6962aNaY5IHLcuODv1uep8Aj4SG2EGueZkBZFstPma1pfs4s/3xYF/xvSmXn /Y2y690Z50mBoT5dHxVKnFci64SB18V/Kn0xGBVnkwySYX3p7LfxPcsvUMuauRNb6/R4 HXYA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XHQA2cWS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193457-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac06f4fe17si123513746d6.101.2024.05.28.22.38.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 22:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XHQA2cWS; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193457-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193457-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 F3DC81C23A9F for ; Wed, 29 May 2024 05:38:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 89D8115CD68; Wed, 29 May 2024 05:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XHQA2cWS" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 325BD1667E9 for ; Wed, 29 May 2024 05:36:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960978; cv=none; b=KMfseZ1vX6HdfkgDcIRwdrbFU/gNyc6H6rwEI365AwmkNIxMO+ypiYVAwjfwaB8D5/A8rwl1F2T6KOtKY7sh5pziDSWo8h+KG9t71spDXxwfT4qQUqrNK3Hpdu+7xO0jLLN7DqxZv0PxMizJ92SQlvwDzhonWi4IEFF1sQsFzQY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960978; c=relaxed/simple; bh=QPVW+nVXZ/Qv6phdysqv5NqIfLXG+N6nb5d8ku5/Eew=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AvUM9yaded+hll6guNmqsiP0Qq5uji/Dc6/78GxTftskzFdJzpsbkJ4wUrBwP2C6Iyk8Dl6lB/BZQKpH4dCCeuTvIW9dEpixeMXxUqPy6dn0QthvykuV9Et/pEMInCXDdG7HfL5Qz+w7Deh963LdfOgBYQdtP5tSutUE8VD+4hs= 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=XHQA2cWS; arc=none smtp.client-ip=192.198.163.14 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=1716960977; x=1748496977; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QPVW+nVXZ/Qv6phdysqv5NqIfLXG+N6nb5d8ku5/Eew=; b=XHQA2cWSSiifFWvxB9OB7xViBo4cg6hDxe6cZz0Y7OpR0G9Oi23ewhRB D+MAKKNXPoUldErORXJ9UQx2mUgI+8B5qfNPjnpfiraavPFTG3h0iXhJr TF9oTXDPFh24WFsKb6mL3RK8sCdZXuSCrLrbfV7wPKFnnYSAsAp2IOkGW j/M4T6M5/3uPXU9bEmEE6wxq2LwEmwxe1+zkY+MxxKXOQObSyPH75dlc7 VG94eZfr9nclPHVaEdTV4vNnmJrAuUNeeP9SHRxFZdSBIZk7A1GlVqlOd zVIo5PM6SkadqXFEA+7h4kyx9prIKBNPsKtWmlAPwSwjVTc+Kxun/60HL A==; X-CSE-ConnectionGUID: GgZT/OgEQmSBMl59BbPehw== X-CSE-MsgGUID: HrJxW03GT3yvOfoSTofVSQ== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13568911" X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="13568911" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2024 22:35:39 -0700 X-CSE-ConnectionGUID: H0Tfydb8Sd2Y4vK78rZTQg== X-CSE-MsgGUID: ejihKNhgR8KfyMoR83nR7Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="35257652" Received: from unknown (HELO allen-box.sh.intel.com) ([10.239.159.127]) by fmviesa007.fm.intel.com with ESMTP; 28 May 2024 22:35:34 -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 08/20] gpu: host1x: Use iommu_paging_domain_alloc() Date: Wed, 29 May 2024 13:32:38 +0800 Message-Id: <20240529053250.91284-9-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240529053250.91284-1-baolu.lu@linux.intel.com> References: <20240529053250.91284-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 host1x_iommu_attach() and is attached to host->dev. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu --- drivers/gpu/host1x/dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index 3a0aaa68ac8d..46a2447c1124 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -404,9 +404,9 @@ static struct iommu_domain *host1x_iommu_attach(struct host1x *host) if (err < 0) goto put_group; - host->domain = iommu_domain_alloc(&platform_bus_type); - if (!host->domain) { - err = -ENOMEM; + host->domain = iommu_paging_domain_alloc(host->dev); + if (IS_ERR(host->domain)) { + err = PTR_ERR(host->domain); goto put_cache; } -- 2.34.1