Subject: Re: enabling bus mastering for PCI vga device
To: None <tech-kern@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-kern
Date: 12/18/2006 03:23:34
In article <6e9741c60612171503r25ccaa4cx195bad9fa205fb34@mail.gmail.com>,
Blair Sadewitz <blair.sadewitz@gmail.com> wrote:
>This is from OpenBSD, and it seems to be a good idea. Could there be
>ill consequences of this, or should/could this be committed?
>
>Regards,
>
>--Blair
>
>
>Index: sys/dev/pci/vga_pci.c
>===================================================================
>RCS file: /cvsroot/src/sys/dev/pci/vga_pci.c,v
>retrieving revision 1.30
>diff -u -r1.30 vga_pci.c
>--- sys/dev/pci/vga_pci.c       16 Nov 2006 01:33:10 -0000      1.30
>+++ sys/dev/pci/vga_pci.c       17 Dec 2006 23:01:37 -0000
>@@ -170,6 +170,13 @@
>        char devinfo[256];
>        int bar, reg;
>
>+       /*
>+        * Enable bus master; X might need this for accelerated graphics.
>+        */
>+       reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
>+       reg |= PCI_COMMAND_MASTER_ENABLE;
>+       pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
>+
>        psc->sc_pc = pa->pa_pc;
>        psc->sc_pcitag = pa->pa_tag;
>

I think that is fine...

christos