[Intel-gfx] [PATCH 2/7] Remove fixed MMIO size

Zhenyu Wang zhen78 at gmail.com
Sat Jun 6 17:19:34 CEST 2009


On 2009.06.05 11:06:27 +0000, Eric Anholt wrote:
> On Fri, 2009-06-05 at 15:47 +0800, Zhenyu Wang wrote:
> > Use pci resource size instead, which will get the correct MMIO range.
> > New chipset uses obviously larger MMIO range.
> > 
> > Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
> > ---
> >  src/common.h      |    1 +
> >  src/i830.h        |    1 +
> >  src/i830_driver.c |   10 ++++++----
> >  3 files changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/src/common.h b/src/common.h
> > index 69f5604..83ee633 100644
> > --- a/src/common.h
> > +++ b/src/common.h
> > @@ -321,6 +321,7 @@ extern int I810_DEBUG;
> >  #endif
> >  
> >  #define I810_MEMBASE(p,n) (p)->regions[(n)].base_addr
> > +#define I810_MEMSIZE(p,n) (p)->regions[(n)].size
> 
> This abstraction existed for libpciaccess vs xf86 pci access, which we
> don't need any more.  Let's not extend that any more, and just use
> pci_dev->regions[].size directly.
> 

I don't want to abstract for different pci access function really, but
just a wrapper for pci_device->regions[].size. If we prefer not using a
wrapper, I can remove it later.



More information about the Intel-gfx mailing list