dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Sui Jingfeng <15330273260@189.cn>
Cc: linux-fbdev@vger.kernel.org,
	Sui Jingfeng <suijingfeng@loongson.cn>,
	kvm@vger.kernel.org, nouveau@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH v7 2/8] PCI/VGA: Deal only with VGA class devices
Date: Mon, 19 Jun 2023 04:02:48 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2306190339590.14084@angie.orcam.me.uk> (raw)
In-Reply-To: <20230613030151.216625-3-15330273260@189.cn>

On Tue, 13 Jun 2023, Sui Jingfeng wrote:

> Deal only with the VGA devcie(pdev->class == 0x0300), so replace the

 Typo here: s/devcie/device/.

> pci_get_subsys() function with pci_get_class(). Filter the non-PCI display
> device(pdev->class != 0x0300) out. There no need to process the non-display
> PCI device.

 I've only come across this patch series now.  Without diving into what 
this code actually does I have just one question as a matter of interest.

> diff --git a/drivers/pci/vgaarb.c b/drivers/pci/vgaarb.c
> index c1bc6c983932..22a505e877dc 100644
> --- a/drivers/pci/vgaarb.c
> +++ b/drivers/pci/vgaarb.c
> @@ -1500,7 +1496,9 @@ static int pci_notify(struct notifier_block *nb, unsigned long action,
>  	struct pci_dev *pdev = to_pci_dev(dev);
>  	bool notify = false;
>  
> -	vgaarb_dbg(dev, "%s\n", __func__);
> +	/* Only deal with VGA class devices */
> +	if (pdev->class != PCI_CLASS_DISPLAY_VGA << 8)
> +		return 0;

 Hmm, shouldn't this also handle PCI_CLASS_NOT_DEFINED_VGA?  As far as I 
know it is the equivalent of PCI_CLASS_DISPLAY_VGA for PCI <= 2.0 devices 
that were implemented before the idea of PCI device classes has developed 
into its current form.  I may have such a VGA device somewhere.

  Maciej

  parent reply	other threads:[~2023-06-19  3:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13  3:01 [PATCH v7 0/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 1/8] PCI/VGA: Use unsigned type for the io_state variable Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 2/8] PCI/VGA: Deal only with VGA class devices Sui Jingfeng
2023-06-14 10:50   ` Sui Jingfeng
2023-06-15 21:11     ` Alex Deucher
2023-06-16  7:11       ` Sui Jingfeng
2023-06-16 13:41         ` Alex Deucher
2023-06-16 14:22           ` Sui Jingfeng
2023-06-16 14:34             ` Alex Deucher
2023-06-16 15:44               ` Sui Jingfeng
2023-06-18 12:11               ` Sui Jingfeng
2023-06-19  2:17                 ` Sui Jingfeng
2023-06-19  2:23                 ` Sui Jingfeng
2023-06-21  7:33               ` Sui Jingfeng
2023-07-03 17:18               ` Sui Jingfeng
2023-06-19  3:02   ` Maciej W. Rozycki [this message]
2023-06-19  3:45     ` Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 3/8] PCI/VGA: Tidy up the code and comment format Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 4/8] PCI/VGA: Replace full MIT license text with SPDX identifier Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 5/8] video/aperture: Add a helper to detect if an aperture contains firmware FB Sui Jingfeng
2023-06-27 14:21   ` Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 6/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register Sui Jingfeng
2023-06-22  5:08   ` Sui Jingfeng
2023-06-29 15:54     ` Bjorn Helgaas
2023-06-29 17:00       ` Sui Jingfeng
2023-06-29 17:44         ` Limonciello, Mario
2023-06-30  2:14           ` suijingfeng
2023-06-30 17:41             ` Bjorn Helgaas
2023-06-30 18:32               ` Jani Nikula
2023-06-30  4:42           ` Sui Jingfeng
2023-06-27 14:35   ` Sui Jingfeng
2023-06-29 14:41   ` Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 7/8] drm/amdgpu: Implement the is_boot_device callback function Sui Jingfeng
2023-06-15  6:51   ` Sui Jingfeng
2023-06-13  3:01 ` [PATCH v7 8/8] drm/radeon: " Sui Jingfeng
2023-06-27 14:20   ` Sui Jingfeng
  -- strict thread matches above, loose matches on Subject: below --
2023-06-13  3:00 [PATCH v7 0/8] PCI/VGA: Introduce is_boot_device function callback to vga_client_register Sui Jingfeng
2023-06-13  3:00 ` [PATCH v7 2/8] PCI/VGA: Deal only with VGA class devices Sui Jingfeng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.2306190339590.14084@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=15330273260@189.cn \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bhelgaas@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=suijingfeng@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).