[Intel-gfx] [PATCH 1/2] drm/i915: Include a generation number in the device info
ajax at redhat.com
Wed Aug 11 07:14:44 PDT 2010
On Wed, 2010-08-11 at 10:25 +0100, Chris Wilson wrote:
> To simplify the IS_GEN 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
> #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 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the Intel-gfx