Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp351956lqp; Mon, 10 Jun 2024 06:17:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXekj2whrToUz4+TzIbKE8RDKlKwiwWDNGk6pwOimsrA5BPVDROhvhR1KPJcP3spGAA0mi5FyghUCiuqFf1/lK6nZz6eVN708HZAq2FGg== X-Google-Smtp-Source: AGHT+IHW+vRZbHxNJK9cR5Z7+mW7K6nfVSscr4CshzJo/Gk0jIJqQzPVZSv2/svoWUBREvSDhsfk X-Received: by 2002:a17:90a:d397:b0:2bd:ef6b:c33b with SMTP id 98e67ed59e1d1-2c2bc7b4c69mr10065395a91.0.1718025452491; Mon, 10 Jun 2024 06:17:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718025452; cv=pass; d=google.com; s=arc-20160816; b=vlcXHYN1ArrEJWJzvlfSIUXLFUdKS5LdhjcsEC34Z7H3HCr9xjL0k6hYpvuSXZ68Of t5tWDYbbJlbo3+xYfrV7wRPQqdF8REn5gzJR5jYhieVkM5MpWlXCkImTU69l/auyLFHY GGejl5Xmi0WXC+Zeb5J7erSDMcXW3IoC3eQ5shBudldGR52I2Erqljm7BHsDGu4P5RDz 7g7k7CXl8ENSuiybq42veAeWPEXI25bJn7eczCsgToMC6RdNT8u2lf6ZyyOveNvvnwC2 u/95FGHOApPKVL81XNIU2Xv+X6dKSx2TJxlhJ5o7cNYkXh1A0w9fKgYrY13xkMKm/3ud Lrig== 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=oMfgzkEw/ooUXqvARCgNaSZrpwGw5y27+DEhhPidNdU=; b=FNk+3I1+A7AnpdvZnbSLO7mNtvYGnJkS08P3HY8VqkIzy39UsuLm0m2Sf3FKg7cH6S hXagKvjJuzMKwhpbwoLZMyUC/CLfI8xRiLLJG/Ip2diqYPnDaUETEkoPSWMnb6+7lZSL J7dI+qo/bA8ktgJ55zeuSbjTh/v1lr+G9n8OLElZ1qoIp4oKlXeg3Virn0i2OO9mdcEt QcvgJ2qcHbcCTdTfFBumgxXcHODk8kzBMiChbVLmsdNQ4AqX4kSAjx2zLpWoNdZZadhn 7zhRhuss3ykzFQYRqQRtbFOVS+P5Yn5Q98qWa/ASLMw+fnH0W+3Qs0yuZN/GyPlDzj87 zzAg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oEbkpjF7; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207898-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. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2806f165bsi4503666a91.187.2024.06.10.06.17.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 06:17:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=oEbkpjF7; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-207898-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207898-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 E3529284DA6 for ; Mon, 10 Jun 2024 09:02:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 304CE80BF8; Mon, 10 Jun 2024 08:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oEbkpjF7" 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 232FC77119 for ; Mon, 10 Jun 2024 08:59:03 +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=1718009944; cv=none; b=ZMhX9JSzl4aaPHSLKjkrvkj9Jxco9DXvgFRySrqaELIC6XRs4jMg0dX4QEzzq1UzlihXs9yULNme5TFXs8vP4QcWmQhcb9TZbdUQIhsbaktsiAwb2WOlykU3vofK6U3AetYkc/s0bRZz3RdjUNO7u5ryzvHWYA6nyeaxgswCqHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718009944; c=relaxed/simple; bh=sQhpQrDpkr5d6QzI9UDmfi+nhpzVyW1CcaBVDpyFpuE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KxTf0ZuyPjPKEJ6jwUEb6cqpn0wwjuLz833KqstmTKfLnJxxpCB6x6xrt3JPf24l6DSvOmUM8Tz2SXBNIsR71vQglQGXxfNNRkQh+t0UkHsw32EOKrw+4UUSDMwxU0SZ6H+29RvRGZRgPqk1+LPg6kEZqYREqoz0GYza40NMcWA= 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=oEbkpjF7; 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=1718009943; x=1749545943; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=sQhpQrDpkr5d6QzI9UDmfi+nhpzVyW1CcaBVDpyFpuE=; b=oEbkpjF7y5wyGx60rwbyHf0xXmlwMVxozn0wErErzLKXgvZF8iAwF/go 13lkGOyO/WbglrrGSpW8A4KA9/0QFzVIy9QkDuCpS3vQ0ywo5SSVNXMo3 cl/52Ow/t+qmWlp8llH0KhIztmqBeexEZPdvIOPRl3HEsMfjEN2kVPhPO 5kSoCyYM43CgYd7vq9+yaHWGev+wUODlBVWIRj3472WmnQtDdDDiXDVQC uAzFo62Zvmoxkt/LbcqDxpMx2ishvEt5kDahnNrE52jj4yygf6lZJt6xj 1qae5UwPJDkqEnDI4jjmM0uNtNilY1IDiwT/GfcsV09WgRqGVMm21emDU Q==; X-CSE-ConnectionGUID: wwii1SufRe+lHBUUl6EuLA== X-CSE-MsgGUID: 3hv/p4DKSvWKA3GxzyaN9g== X-IronPort-AV: E=McAfee;i="6600,9927,11098"; a="17581672" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="17581672" 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:59:02 -0700 X-CSE-ConnectionGUID: GoqNbYNkRoi9JfD2FIY96Q== X-CSE-MsgGUID: wwmA5EWAQ/CYSTTnenxwlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="43432593" 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:58 -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 09/21] media: venus: firmware: Use iommu_paging_domain_alloc() Date: Mon, 10 Jun 2024 16:55:43 +0800 Message-Id: <20240610085555.88197-10-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 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