[PATCH v4 4/8] iommu/vt-d: Use pci_is_display()

Mario Limonciello posted 8 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH v4 4/8] iommu/vt-d: Use pci_is_display()
Posted by Mario Limonciello 3 months, 2 weeks ago
From: Mario Limonciello <mario.limonciello@amd.com>

The inline pci_is_display() helper does the same thing.  Use it.

Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/iommu/intel/iommu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 7aa3932251b2f..17267cd476ce7 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -34,7 +34,7 @@
 #define ROOT_SIZE		VTD_PAGE_SIZE
 #define CONTEXT_SIZE		VTD_PAGE_SIZE
 
-#define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
+#define IS_GFX_DEVICE(pdev) pci_is_display(pdev)
 #define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
 #define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
 #define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
-- 
2.43.0
Re: [PATCH v4 4/8] iommu/vt-d: Use pci_is_display()
Posted by Baolu Lu 3 months, 2 weeks ago
On 6/24/25 02:47, Mario Limonciello wrote:
> From: Mario Limonciello<mario.limonciello@amd.com>
> 
> The inline pci_is_display() helper does the same thing.  Use it.
> 
> Reviewed-by: Daniel Dadap<ddadap@nvidia.com>
> Reviewed-by: Simona Vetter<simona.vetter@ffwll.ch>
> Suggested-by: Bjorn Helgaas<helgaas@kernel.org>
> Signed-off-by: Mario Limonciello<mario.limonciello@amd.com>

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>