[Intel-gfx] [PATCH 1/2] drm/i915: Include a generation number in the device info

Adam Jackson ajax at redhat.com
Wed Aug 11 16:14:44 CEST 2010


On Wed, 2010-08-11 at 10:25 +0100, Chris Wilson wrote:
> To simplify the IS_GEN[234] macros and to enable switching.

I think your three cent titanium tax doesn't go too far enough.

830, 845g, 85x, and 865 all now have

    .gen = 2,
    .is_i8xx = 1,

and nothing later has .is_i8xx, so that field can just go.  Indeed you
do:

>  #define IS_I865G(dev)		((dev)->pci_device == 0x2572)
> -#define IS_GEN2(dev)		(INTEL_INFO(dev)->is_i8xx)
>  #define IS_I915G(dev)		(INTEL_INFO(dev)->is_i915g)

which appears to be the only reference.

Likewise, all the gen[3456] parts have .is_i9xx = 1, so you could do:

-#define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx)
+#define IS_I9XX(dev) (INTEL_INFO(dev)->gen > 2)

and drop .is_i9xx.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100811/ffe2c221/attachment.sig>


More information about the Intel-gfx mailing list