Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp491634lqb; Wed, 29 May 2024 01:36:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUb9FIv5NBaZS6knvVhsti9mo4UZrSsnywKl06KM1RAkGVmWZRw2nO/3kzEIYwpWYgYQhcbgSrdnR3aV9GgCorQn+uEHBl2pu2SEQ6/Lw== X-Google-Smtp-Source: AGHT+IG2cqvlhZsn+uWioDdg5BrQwdYLEVHFOfwBf49V0fCJ2akAW9lijUu5SJ7JdsbQ+8eXu+iY X-Received: by 2002:a05:6a20:969b:b0:1af:df89:4e6a with SMTP id adf61e73a8af0-1b212e5127emr12558854637.51.1716971809791; Wed, 29 May 2024 01:36:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716971809; cv=pass; d=google.com; s=arc-20160816; b=uRo9dKsUsgF64ZN82O+UukFCFLAQoyVhcjGT7r5Uzplwx473Gy1Nqpq7hSZ325FHLx gd01wSg0tV5d1ie53gLZrWQ7fB1/eIQtLTVbow7j2H7AGD7WcxZivkaZgz+AoiVZ4VZS 9CJDGICZdcpxThlvE7mZROT7xBmayBVtZNWVhjKffEMeRomxIdKZJGgO6RdUEA1auFcT sVSKANOX+7GYC8gXudrMLtsRnyXHaKlqNZ5fTQBgjCio1gqj7FXMAuHi/z9a4GPrvXPB 5wmRcO3VXdkaFFFDSQYEIdoD0Y8ySLgvIHWYmD/CGY+gZMQK8GBsZstYH+k/qZlvX+Yx N2Gw== 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=OAyPXNbgI40wIyBc2zAKk8zeTjP5wVulSNaRiFwVRqc=; fh=u7VIfotmvhCnFPKh0R845OAh004BwcT1TGiZ1dQEGzo=; b=F491IBjG+iMv8VHLbkf+OFexWZArOrVanp49V4DHoJI9tCfS+mhKXP14+c1WAL1MkI 7PgApShiwqCkmjXUcJU8IqnCpa0++TNGFxvTtNZtWsLJFsSmLbXPt+57myaTQgy0UslI 9x2peUPDdbt9ALuw2l21ndrHa6xQhs8d50dqsOULriRgnF3kgw2gf/TtHZ/iFmctY/c/ ngtNg+MGDx5dziClOmHfuN3ck3vEFIMuEG5Rmzl12toCGUL2YG9CU4iCc6y51cem4yXb a2egrvGesykEswCikblOTbDJuW4DYxbB7+jUUKKapCRScKiffUePwwA+vxeISPATanf/ NyWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KiL+s0AP; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193460-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 d9443c01a7336-1f493215c7bsi55514345ad.43.2024.05.29.01.36.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 01:36:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193460-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=KiL+s0AP; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-193460-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193460-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 9DFDEB25C24 for ; Wed, 29 May 2024 05:39:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8410116937B; Wed, 29 May 2024 05:36:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KiL+s0AP" 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 462E9168C05 for ; Wed, 29 May 2024 05:36:20 +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=1716960981; cv=none; b=TMwnMKAhlxfWkQ3QAm3DznrbNsJpUOHbKPgvIiHLCH6qPrZiynzvhoR2J1E7zU6Vb72pp8iCXYsuKs9T/j/O86QYFSXTjzPRbDgABqN74Gj1Qs/JWulvhaNvVzRuZoC4+NgkyaxP/8eYSZNXyrq7X+T2j5k/WvSmkPOhyXE+vMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716960981; c=relaxed/simple; bh=sQhpQrDpkr5d6QzI9UDmfi+nhpzVyW1CcaBVDpyFpuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OUEeOcttJtF93Se1g8xN08/D61h0h6Teep8v+qkaQ7O0jsKZe924ykH80hx6wypz6WB9uUDof5YB2VxAKw/PuBSZOpx4EB2S1ZopJQwlodEsEUsuCsEy/t568nLcezAZAvLfxxwAinDph/2TGNUoGzaRpkD5cQGAbRk8z72pO4s= 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=KiL+s0AP; 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=1716960980; x=1748496980; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sQhpQrDpkr5d6QzI9UDmfi+nhpzVyW1CcaBVDpyFpuE=; b=KiL+s0APhHa4cQk7rUlYR/EqLgvuj1hDt3yVBexi1tmL78/kydZGGxyt Zpj+5ARBuGzNCKyx3dtTf2FzVrZhY2TvhZmjdVObrROJcKEfH9pn4L80U 8piDyhcwC+wDwWcBcgUmbGsxopq9irKlaWOTmT0D6+hbkD7qkGiJHPIPs q8mEpIBAL+7CH18DzcKYvpvYM5pWjPXeWhFFyKqANFCtLoSM7GqETZ3FA soefGYOe8XG65N992RdniAVp7iz2fE+DmUV/R53C2hIY07ZCBmRSEA1qH IA/nmXj2ENO42w6Lhg13g6PaJZ/0G4nctUGlwNP0HirGRuQpSzmFIe+Wl Q==; X-CSE-ConnectionGUID: nCBk/QS5QaG01QvWO/acEQ== X-CSE-MsgGUID: /YWiTWzRQv25UL2O+0j5bA== X-IronPort-AV: E=McAfee;i="6600,9927,11085"; a="13568966" X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="13568966" 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:49 -0700 X-CSE-ConnectionGUID: ibSOuVsuTWmBLKtjWng6DA== X-CSE-MsgGUID: w/ltsPfbRAaZqzlQJES1fQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,197,1712646000"; d="scan'208";a="35257682" 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:44 -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 10/20] media: venus: firmware: Use iommu_paging_domain_alloc() Date: Wed, 29 May 2024 13:32:40 +0800 Message-Id: <20240529053250.91284-11-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 venus_firmware_init() and is attached to core->fw.dev in the same function. Use iommu_paging_domain_alloc() to make it explicit. Signed-off-by: Lu Baolu --- drivers/media/platform/qcom/venus/firmware.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c index fe7da2b30482..66a18830e66d 100644 --- a/drivers/media/platform/qcom/venus/firmware.c +++ b/drivers/media/platform/qcom/venus/firmware.c @@ -316,10 +316,10 @@ int venus_firmware_init(struct venus_core *core) core->fw.dev = &pdev->dev; - iommu_dom = iommu_domain_alloc(&platform_bus_type); - if (!iommu_dom) { + iommu_dom = iommu_paging_domain_alloc(core->fw.dev); + if (IS_ERR(iommu_dom)) { dev_err(core->fw.dev, "Failed to allocate iommu domain\n"); - ret = -ENOMEM; + ret = PTR_ERR(iommu_dom); goto err_unregister; } -- 2.34.1