From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755446AbbCYOwv (ORCPT ); Wed, 25 Mar 2015 10:52:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44493 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752860AbbCYOwo (ORCPT ); Wed, 25 Mar 2015 10:52:44 -0400 Message-ID: <1427295121.23304.5.camel@nilsson.home.kraxel.org> Subject: Re: [PATCH] Add virtio gpu driver. From: Gerd Hoffmann To: "Michael S. Tsirkin" Cc: virtio-dev@lists.oasis-open.org, Dave Airlie , Dave Airlie , David Airlie , Rusty Russell , open list , "open list:DRM DRIVERS" , "open list:VIRTIO CORE, NET..." , "open list:ABI/API" Date: Wed, 25 Mar 2015 15:52:01 +0100 In-Reply-To: <20150324171255-mutt-send-email-mst@redhat.com> References: <1427213239-8775-1-git-send-email-kraxel@redhat.com> <20150324171255-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c > > index e894eb2..a3167fa 100644 > > --- a/drivers/virtio/virtio_pci_common.c > > +++ b/drivers/virtio/virtio_pci_common.c > > @@ -510,7 +510,7 @@ static int virtio_pci_probe(struct pci_dev *pci_dev, > > goto err_enable_device; > > > > rc = pci_request_regions(pci_dev, "virtio-pci"); > > - if (rc) > > + if (rc && ((pci_dev->class >> 8) != PCI_CLASS_DISPLAY_VGA)) > > goto err_request_regions; > > > > if (force_legacy) { > > This is probably what you described as "the only concern? Ahem, no, forgot that one, but it is related. With vesafb using and registering the vga compat framebuffer bar pci_request_regions will not succeed. vesafb will be unregistered later on (this is what I was refering to) by the virtio-gpu driver. > If we only need to request specific > regions, I think we should do exactly that, requesting only parts of > regions that are covered by the virtio capabilities. That should work too. cheers, Gerd