[Intel-gfx] [PATCH 3/6] drm/i915: Add IS_POULSBO and IS_MRST helper macros
Richard Purdie
rpurdie at linux.intel.com
Thu May 14 23:16:35 CEST 2009
On Thu, 2009-05-14 at 13:37 -0700, Jesse Barnes wrote:
> On Wed, 13 May 2009 15:02:59 +0100
> Richard Purdie <rpurdie at linux.intel.com> wrote:
>
> > Add IS_POULSBO and IS_MRST helper macros to i915_drv.h, then use
> > these to enable the correct code paths for these pieces of hardware
> > in the common VDC code.
> >
> > Signed-off-by: Richard Purdie <rpurdie at linux.intel.com>
> >
> > Index: git/drivers/gpu/drm/i915/i915_drv.h
> > ===================================================================
> > --- git.orig/drivers/gpu/drm/i915/i915_drv.h 2009-05-13
> > 13:13:00.000000000 +0100 +++
> > git/drivers/gpu/drm/i915/i915_drv.h 2009-05-13
> > 13:22:13.000000000 +0100 @@ -691,17 +691,23 @@ #define IS_IGDGM(dev)
> > ((dev)->pci_device == 0xa011) #define IS_IGD(dev) (IS_IGDG(dev) ||
> > IS_IGDGM(dev))
> > +#define IS_POULSBO(dev) (((dev)->pci_device == 0x8108) || \
> > + ((dev)->pci_device == 0x8109))
> > +
> > +#define IS_MRST(dev) (((dev)->pci_device & 0xfffc) == 0x4100)
> > +
> > #define IS_G33(dev) ((dev)->pci_device == 0x29C2 || \
> > (dev)->pci_device == 0x29B2 || \
> > (dev)->pci_device == 0x29D2 || \
> > (IS_IGD(dev)))
> >
> > #define IS_I9XX(dev) (IS_I915G(dev) || IS_I915GM(dev) ||
> > IS_I945G(dev) || \
> > - IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev))
> > + IS_I945GM(dev) || IS_I965G(dev) || IS_G33(dev)
> > || \
> > + IS_POULSBO(dev))
> >
> > #define IS_MOBILE(dev) (IS_I830(dev) || IS_I85X(dev) ||
> > IS_I915GM(dev) || \ IS_I945GM(dev) || IS_I965GM(dev) || IS_GM45(dev)
> > || \
> > - IS_IGD(dev))
> > + IS_IGD(dev) || IS_POULSBO(dev))
> >
> > #define I915_NEED_GFX_HWS(dev) (IS_G33(dev) || IS_GM45(dev) ||
>
> I guess you've tested these so we know they work. I just wonder if it
> would be better to have IS_9XX_VDC and IS_965_VDC macros instead (not
> that I can think of any cases where that would be necessary vs. what's
> here).
Yes, this is known to work. Its really just a question of whether we
need two sets of similar macros. I can't see a case for it at present
and I didn't want to add complexity we don't need...
--
Richard Purdie
Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list