[PATCH] libpciaccess/vgaarb: add function to get default vga device and it's decodes.
Stefan Dirsch
sndirsch at suse.de
Mon Apr 25 10:26:54 UTC 2016
On Sun, Apr 24, 2016 at 05:17:48PM +0200, Julien Cristau wrote:
> On Thu, Apr 21, 2016 at 15:22:36 +0200, Stefan Dirsch wrote:
>
> > From: Egbert Eich <eich at freedesktop.org>
> >
> > Reenable default device when shutting down VGA arbitration.
> > https://bugzilla.opensuse.org/show_bug.cgi?id=714677
> > ---
> > src/common_vgaarb.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> I don't understand how the patch description relates to the patch. This
> doesn't seem to add a function...
Indeed. I believe this patch description was inspired by the changes, which
were needed for xorg-server 1.6.5, which we needed in addition. These are in
meanwhile.
Egbert will respond or resend the patch to the ML once time permits. Sorry for
the noise!
Thanks,
Stefan
> > diff --git a/src/common_vgaarb.c b/src/common_vgaarb.c
> > index 7a7d204..2c0686e 100644
> > --- a/src/common_vgaarb.c
> > +++ b/src/common_vgaarb.c
> > @@ -156,6 +156,11 @@ pci_device_vgaarb_fini(void)
> > {
> > if (!pci_sys)
> > return;
> > + if (pci_device_vgaarb_set_target(NULL) < 0 ||
> > + pci_device_vgaarb_lock() < 0 ||
> > + pci_device_vgaarb_unlock() < 0) {
> > + fprintf(stderr, "VGA Arbitration: Cannot restore default device.\n");
> > + }
> >
> > close(pci_sys->vgaarb_fd);
> > }
> > @@ -334,6 +339,10 @@ pci_device_vgaarb_unlock(void)
> > int pci_device_vgaarb_get_info(struct pci_device *dev, int *vga_count, int *rsrc_decodes)
> > {
> > *vga_count = pci_sys->vga_count;
> > + if (!rsrc_decodes)
> > + return 0;
> > + if (!dev)
> > + dev = pci_sys->vga_default_dev;
> > if (!dev)
> > return 0;
> >
> > --
> > 2.6.2
> >
> > _______________________________________________
> > xorg-devel at lists.x.org: X.Org development
> > Archives: http://lists.x.org/archives/xorg-devel
> > Info: https://lists.x.org/mailman/listinfo/xorg-devel
Public Key available
------------------------------------------------------
Stefan Dirsch (Res. & Dev.) SUSE LINUX GmbH
Tel: 0911-740 53 0 Maxfeldstraße 5
FAX: 0911-740 53 479 D-90409 Nürnberg
http://www.suse.de Germany
---------------------------------------------------------------
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham
Norton, HRB 21284 (AG Nürnberg)
---------------------------------------------------------------
More information about the xorg-devel
mailing list