Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1322575lqj; Mon, 3 Jun 2024 18:56:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXsP8+i3kmswqtWVhR9Q0bbQWr1GG90CWWYBYFVr4nLs4dBYWyvnKpHH6qNlkmjbrmFcSbQHblgeBGdWHVqJkryFSVmR6Q+cZZ9c/4ReQ== X-Google-Smtp-Source: AGHT+IGsNtIH3vBDh+c8X1izxGQUa6Ad+19yGnVZt93CgKHqI35Kmgu593j7eCHGL/6KQAf6pfOW X-Received: by 2002:a05:622a:1aa0:b0:43f:f238:f7c7 with SMTP id d75a77b69052e-43ff5238cb7mr119335941cf.12.1717466196344; Mon, 03 Jun 2024 18:56:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717466196; cv=pass; d=google.com; s=arc-20160816; b=qJJ1zc+GNUI93vmyJ4X1PAlwZGZoxxaN2o2MUwNFvi7PyMiGiI3K3UtX5GTSv7w8wZ 25DAW9XWU/9gV8C0qQ3SHi5E+BspDsk4XmFTIx3SR2SW2uS+Hb8O9f+SM2CD19kCTEil U8DUbwO5+xI/wuJJjBsfiNjkKx1ynroyFN0FsK60Zcgmiuk6DADsICM8L9OXO55J5vcb pcFmpU+D//OnBeEiUyOcIFNOP4eXy+jZ9kdlu9zJ4pTV2PJK3Vvbwp9Pos8S104FrFz3 xwWGRcffa0rrHP3vWOhrdKtgPRwPzvVDP5SEV0UzadpY9mmaKztjEpyXyga5voyWjTPy 7gQQ== 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=qGMy0iOa7wMPS15MBJLapqL7j6ie5pxA+erFbNo8Ahzu3GXZPVpTjWiEUpn/iJfous 318GW9jzNsiHtk8FvIr1bFS4XbbSFefm5RmylBkapTgEA4/LLuRqeZyIFS2ek3Y82MQj WfO+4VgElcN+hrQ8Wkrg+jZaOw6FYW5+4hNHIUyAnJp3iYJzZ4rZBOSvg90R4aYo1ZJO 6+u7tYVGwpA8P/Fn0q5ZH5uxfW1b1a5l2ult3IVuJoxA2VkrZzkGf3CW2tOnLkQ9jHLc s8j4ikedvzCSCZEQF0ZyVleyOi+sSAL4snRTxlzmraE9XMJPZs1yWx46elWzEPhYIiWH x8uA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jGIF17uH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199927-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 d75a77b69052e-43ff23abdbasi102249931cf.65.2024.06.03.18.56.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 18:56:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199927-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=jGIF17uH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-199927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199927-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 150DB1C24283 for ; Tue, 4 Jun 2024 01:56:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BAC9C13DBAD; Tue, 4 Jun 2024 01:54:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jGIF17uH" 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 B83D513D2BA for ; Tue, 4 Jun 2024 01:54:44 +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=1717466087; cv=none; b=k9qTmd1zOZ6XZf/GT6cImMe4l+s1tG6cK0kWsXvLX6hFbzpqirFji9saxEmEdeSzGBhKKkfN+gt71WdnzIpVSw3x4H+SOOGo6fzeHjTM83tpMJ36uUCFRpm/600sUZe3cdniDGAJkoAO6wryf9d5W47td8csWRQ9nLaTGolaL4s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717466087; c=relaxed/simple; bh=sQhpQrDpkr5d6QzI9UDmfi+nhpzVyW1CcaBVDpyFpuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZG937Y5Nfl4rOB39XnGcdboSQC3NB0hZ1Zt0smooYZmqs/e5lEwJY/DEBGoDJ1ud2EZ+kohQepUztqjzcE+ZgkLiq3gLDWVXVrAkFJ9WPcB9SNKO/yR5H7YUh7sSkRWnmHjFs2ALRjMXOIGqJa2P2bizF8zI1/DHRq8w84MH7mE= 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=jGIF17uH; 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=1717466084; x=1749002084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sQhpQrDpkr5d6QzI9UDmfi+nhpzVyW1CcaBVDpyFpuE=; b=jGIF17uHdgSogYLbHJLHkYM6fkeJ0WWQThrap59PHoPAO0b8yEfqkbib KCNGMElT4YQrgjSk95cqzgUaaGFmJ4SW+AZpz2ZIlwPY+VMb2rAfYhbez MVm9FiLRScsny/uAc4Fc7A5enM5+XQNQluQZZWKCYIhJaaEznXQXkniXg b6n6+Z07LDBkHDJdAPBHCpCemtLrsPiUZ/NYjYFoGQBraU+B3lYstu2A9 zEDKqkiYfvuGkKVItA3OvNWGkUjrVAVLjX83SK7eKh1CAqh8mM9wLDfK9 Ca21/kAz29HuMFb6rnzOBsQ7rzEViP+qnUVD9SHdf5VLFZmDjQCkEbBhQ w==; X-CSE-ConnectionGUID: JykVb8pKT9eLdAhgs1Jzfg== X-CSE-MsgGUID: /DJejG5GTziaTjpFNgh2tw== X-IronPort-AV: E=McAfee;i="6600,9927,11092"; a="25385020" X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="25385020" 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:44 -0700 X-CSE-ConnectionGUID: I4TaijsOST+d8oeWfx06Pg== X-CSE-MsgGUID: U/IxZ0NeQJKr3g9XM7QcXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,212,1712646000"; d="scan'208";a="37661891" 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:40 -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 10/22] media: venus: firmware: Use iommu_paging_domain_alloc() Date: Tue, 4 Jun 2024 09:51:22 +0800 Message-Id: <20240604015134.164206-11-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 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