Re: [PATCH v2 2/6] vfio/pci: Use pci_is_display()
From: Alex Williamson
Date: Tue Jun 17 2025 - 14:52:59 EST
On Tue, 17 Jun 2025 12:59:06 -0500
Mario Limonciello <superm1@xxxxxxxxxx> wrote:
> From: Mario Limonciello <mario.limonciello@xxxxxxx>
>
> The inline pci_is_display() helper does the same thing. Use it.
>
> Suggested-by: Bjorn Helgaas <helgaas@xxxxxxxxxx>
> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> ---
> drivers/vfio/pci/vfio_pci_igd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/vfio/pci/vfio_pci_igd.c b/drivers/vfio/pci/vfio_pci_igd.c
> index ef490a4545f48..988b6919c2c31 100644
> --- a/drivers/vfio/pci/vfio_pci_igd.c
> +++ b/drivers/vfio/pci/vfio_pci_igd.c
> @@ -437,8 +437,7 @@ static int vfio_pci_igd_cfg_init(struct vfio_pci_core_device *vdev)
>
> bool vfio_pci_is_intel_display(struct pci_dev *pdev)
> {
> - return (pdev->vendor == PCI_VENDOR_ID_INTEL) &&
> - ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY);
> + return (pdev->vendor == PCI_VENDOR_ID_INTEL) && pci_is_display(pdev);
> }
>
> int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)
Acked-by: Alex Williamson <alex.williamson@xxxxxxxxxx>