public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: 2.4.x, drm, g400 and pci_set_master
@ 2001-02-08 16:39 Alex Deucher
  2001-02-08 17:08 ` Jeff Hartmann
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Deucher @ 2001-02-08 16:39 UTC (permalink / raw)
  To: vandrove, linux-kernel

I'm not sure about the mga source, but you can enable busmaster manually
as root.  See the dri-devel list for more.  I can't remember the exact
message off hand.  THere was also some discussion of this last week I
think.

Alex


----------------------------

Hi, 
  friend of mine bought g400 on my recommendation, and unfortunately, 
mga drm driver did not worked for me. I tracked it down to missing 
pci_enable_device and pci_set_master in mga* driver. But even after 
looking more than hour into that code I have no idea where I should 
place this call, as it looks like that mga driver is completely 
shielded from seeing pcidev structure :-( 
  Does anybody know where I should place pci_enable_device and 
pci_set_master into mga code? I worked around pci_enable_device by 
using matroxfb, but pci_set_master is not invoked by matroxfb, and 
adding this call into matroxfb just to get mga drm driver to work does 
not look correctly to me - although it is what I had done just now. 
                                    Thanks, 
                                            Petr Vandrovec 
                                            vandrove@vc.cvut.cz
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: 2.4.x, drm, g400 and pci_set_master
@ 2001-02-08 18:36 Petr Vandrovec
  2001-02-08 17:47 ` Jeff Hartmann
  0 siblings, 1 reply; 7+ messages in thread
From: Petr Vandrovec @ 2001-02-08 18:36 UTC (permalink / raw)
  To: Alex Deucher; +Cc: linux-kernel, jhartmann

On  8 Feb 01 at 12:15, Alex Deucher wrote:

> I wasn't talking about the drm driver I was talking about programming
> the PCI controller directly using setpci 1.0.0 .... or some such
> command, I can't remember off hand.  Which turns on busmastering if it
> is off for a particular device.

OK. 

> Jeff Hartmann wrote:
> > 
> > The DRM drivers don't know about the pcidev structure at all.  All this
> > is done in the XFree86 ddx driver.  You can probably add something like
> > this to MGAPreInit (after pMga->PciTag is set, in my copy its
> > mga_driver.c:1232 yours might be at a slightly different line number
> > depending on the version your using):
> > 
> > {
> >    CARD32 temp;
> >    temp = pciReadLong(pMga->PciTag, PCI_CMD_STAT_REG);
> >    pciWriteLong(pMga->PciTag, PCI_CMD_STAT_REG, temp |
> > PCI_CMD_MASTER_ENABLE);
> > }

Jeff, do you say that drm code does not use dynamic DMA mapping, which is
specified as only busmastering interface for kernels 2.4.x, at all? Now 
I understand what had one friend in the mind when he laughed when I said 
that it must be easy to get it to work on Alpha...
                            Thanks anyway for all suggestions,
                                        Petr Vandrovec
                                        vandrove@vc.cvut.cz
                                        
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread
* 2.4.x, drm, g400 and pci_set_master
@ 2001-02-08 16:32 Petr Vandrovec
  0 siblings, 0 replies; 7+ messages in thread
From: Petr Vandrovec @ 2001-02-08 16:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: faith, hulinsky

Hi,
  friend of mine bought g400 on my recommendation, and unfortunately,
mga drm driver did not worked for me. I tracked it down to missing
pci_enable_device and pci_set_master in mga* driver. But even after
looking more than hour into that code I have no idea where I should
place this call, as it looks like that mga driver is completely
shielded from seeing pcidev structure :-(
  Does anybody know where I should place pci_enable_device and 
pci_set_master into mga code? I worked around pci_enable_device by 
using matroxfb, but pci_set_master is not invoked by matroxfb, and 
adding this call into matroxfb just to get mga drm driver to work does 
not look correctly to me - although it is what I had done just now.
                                    Thanks,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            

01:00.0 VGA compatible controller: Matrox Graphics, Inc. MGA G400 AGP (rev 04) (prog-if 00 [VGA])
    Subsystem: Matrox Graphics, Inc. Millennium G400 Dual Head Max
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
    Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
    Latency: 64 (4000ns min, 8000ns max), cache line size 08
    Interrupt: pin A routed to IRQ 5
    Region 0: Memory at f4000000 (32-bit, prefetchable) [size=32M]
    Region 1: Memory at fcffc000 (32-bit, non-prefetchable) [size=16K]
    Region 2: Memory at fc000000 (32-bit, non-prefetchable) [size=8M]
    Expansion ROM at 80000000 [disabled] [size=64K]
    Capabilities: [dc] Power Management version 2
        Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
        Status: D0 PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [f0] AGP version 2.0
        Status: RQ=31 SBA+ 64bit- FW- Rate=x1,x2
        Command: RQ=31 SBA+ AGP+ 64bit- FW- Rate=x1


Linux version 2.4.1 (root@jenik) (gcc version 2.95.2 20000220 (Debian GNU/Linux)) #1 +t ˙no 6 18:14:01 CET 2001
BIOS-provided physical RAM map:
 BIOS-e820: 00000000000a0000 @ 0000000000000000 (usable)
 BIOS-e820: 0000000000010000 @ 00000000000f0000 (reserved)
 BIOS-e820: 000000000fe9e000 @ 0000000000100000 (usable)
 BIOS-e820: 0000000000062000 @ 000000000ff9e000 (reserved)
 BIOS-e820: 0000000000500000 @ 00000000ffb00000 (reserved)
 BIOS-e820: 0000000000010000 @ 00000000fec00000 (reserved)
 BIOS-e820: 0000000000010000 @ 00000000fee00000 (reserved)
...
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 203M
agpgart: Trying generic Intel routines for device id: 2500
agpgart: AGP aperture is 64M @ 0xf0000000
[drm] AGP 0.99 on Intel @ 0xf0000000 64MB
[drm] Initialized mga 2.0.1 20000928 on minor 63
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-02-08 18:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-08 16:39 2.4.x, drm, g400 and pci_set_master Alex Deucher
2001-02-08 17:08 ` Jeff Hartmann
2001-02-08 17:15   ` Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2001-02-08 18:36 Petr Vandrovec
2001-02-08 17:47 ` Jeff Hartmann
2001-02-08 18:14   ` Alex Deucher
2001-02-08 16:32 Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox