From: Bjorn Helgaas <helgaas@kernel.org>
To: Sui Jingfeng <sui.jingfeng@linux.dev>
Cc: Sui Jingfeng <suijingfeng@loongson.cn>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
Gurchetan Singh <gurchetansingh@chromium.org>,
Gerd Hoffmann <kraxel@redhat.com>,
Bjorn Helgaas <bhelgaas@google.com>,
David Airlie <airlied@redhat.com>,
virtualization@lists.linux-foundation.org
Subject: Re: [-next 4/5] drm/virgpu: Switch to pci_is_vga()
Date: Thu, 5 Oct 2023 17:10:49 -0500 [thread overview]
Message-ID: <20231005221049.GA793091@bhelgaas> (raw)
In-Reply-To: <20231005215714.GA792609@bhelgaas>
On Thu, Oct 05, 2023 at 04:57:14PM -0500, Bjorn Helgaas wrote:
> In subject: "drm/virtio" to match previous history.
>
> On Wed, Aug 30, 2023 at 07:15:31PM +0800, Sui Jingfeng wrote:
> > From: Sui Jingfeng <suijingfeng@loongson.cn>
> >
> > Should be no functional change, just for cleanup purpose.
> >
> > Cc: David Airlie <airlied@redhat.com>
> > Cc: Gerd Hoffmann <kraxel@redhat.com>
> > Cc: Gurchetan Singh <gurchetansingh@chromium.org>
> > Cc: Chia-I Wu <olvaffe@gmail.com>
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
> > ---
> > drivers/gpu/drm/virtio/virtgpu_drv.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
> > index add075681e18..3a368304475a 100644
> > --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
> > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
> > @@ -51,7 +51,7 @@ static int virtio_gpu_pci_quirk(struct drm_device *dev)
> > {
> > struct pci_dev *pdev = to_pci_dev(dev->dev);
> > const char *pname = dev_name(&pdev->dev);
> > - bool vga = (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA;
> > + bool vga = pci_is_vga(pdev);
>
> This *is* a functional change: Previously "vga" was only true for
> PCI_CLASS_DISPLAY_VGA (0x0300). Now it will be true for both
> PCI_CLASS_DISPLAY_VGA (0x0300) and PCI_CLASS_DISPLAY_OTHER (0x0380).
Oops, sorry, my mistake here. I meant PCI_CLASS_NOT_DEFINED_VGA, not
PCI_CLASS_DISPLAY_OTHER. pci_is_vga() is true for either of:
PCI_CLASS_DISPLAY_VGA 0x0300
PCI_CLASS_NOT_DEFINED_VGA 0x0001
(PCI_CLASS_NOT_DEFINED_VGA is defined in the PCI Code and Assignment
spec r1.15, sec 1.1; PCI_CLASS_DISPLAY_VGA is sec 1.4.)
> Is that desirable? I can't tell. Maybe the GPU folks will chime in.
>
> > int ret;
> >
> > DRM_INFO("pci: %s detected at %s\n",
> > --
> > 2.34.1
> >
next prev parent reply other threads:[~2023-10-05 22:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 11:15 [-next 0/5] Add the pci_is_vga() helper and use it Sui Jingfeng
2023-08-30 11:15 ` [-next 1/5] PCI: Add the pci_is_vga() helper Sui Jingfeng
2023-10-05 22:51 ` Bjorn Helgaas
2023-10-06 11:40 ` Sui Jingfeng
2023-10-06 12:10 ` Maciej W. Rozycki
2023-08-30 11:15 ` [-next 2/5] PCI/VGA: Deal with VGA devices Sui Jingfeng
2023-08-30 11:15 ` [-next 3/5] PCI/sysfs: Use pci_is_vga() helper Sui Jingfeng
2023-08-30 11:15 ` [-next 4/5] drm/virgpu: Switch to pci_is_vga() Sui Jingfeng
2023-10-05 21:57 ` Bjorn Helgaas
2023-10-05 22:10 ` Bjorn Helgaas [this message]
2023-10-06 11:22 ` Sui Jingfeng
2023-08-30 11:15 ` [-next 5/5] drm/qxl: " Sui Jingfeng
2023-10-06 22:19 ` [-next 0/5] Add the pci_is_vga() helper and use it Bjorn Helgaas
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=20231005221049.GA793091@bhelgaas \
--to=helgaas@kernel.org \
--cc=airlied@redhat.com \
--cc=bhelgaas@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sui.jingfeng@linux.dev \
--cc=suijingfeng@loongson.cn \
--cc=virtualization@lists.linux-foundation.org \
/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).