agp/intel: Use per device iommu check
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 12 Jul 2022 00:08:45 +0000 (08:08 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:21:29 +0000 (10:21 +0200)
commitf19e038c25079edcba4796328d99ff00f2b47b68
treecb57681be7be189b206ccc2b8490620c27eb1f92
parent933ab6d30153f937ffa9471ce64207e6d9acf56e
agp/intel: Use per device iommu check

The IOMMU subsystem has already provided an interface to query whether
the IOMMU hardware is enabled for a specific device. This changes the
check from Intel specific intel_iommu_gfx_mapped (globally exported by
the Intel IOMMU driver) to probing the presence of IOMMU on a specific
device using the generic device_iommu_mapped().

This follows commit cca084692394a ("drm/i915: Use per device iommu check")
which converted drm/i915 driver to use device_iommu_mapped().

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lore.kernel.org/r/20220514014322.2927339-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/char/agp/intel-gtt.c