public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Hartmann <jhartmann@valinux.com>
To: Alex Deucher <adeucher@UU.NET>
Cc: vandrove@vc.cvut.cz, linux-kernel@vger.kernel.org
Subject: Re: 2.4.x, drm, g400 and pci_set_master
Date: Thu, 08 Feb 2001 10:08:01 -0700	[thread overview]
Message-ID: <3A82D271.6010000@valinux.com> (raw)
In-Reply-To: <3A82CBCE.6926AFAF@uu.net>

Alex Deucher wrote:

> 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/
> 

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

-
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/

  reply	other threads:[~2001-02-08 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-08 16:39 2.4.x, drm, g400 and pci_set_master Alex Deucher
2001-02-08 17:08 ` Jeff Hartmann [this message]
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

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=3A82D271.6010000@valinux.com \
    --to=jhartmann@valinux.com \
    --cc=adeucher@UU.NET \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vandrove@vc.cvut.cz \
    /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