]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Implement IS_* macros using static tables
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 16 Dec 2009 20:16:16 +0000 (15:16 -0500)
committerEric Anholt <eric@anholt.net>
Wed, 16 Dec 2009 21:52:53 +0000 (13:52 -0800)
commit582ccb83528b1edc637b6791360ac1261ec6db27
tree447930bfa2f30e0e77e6ec24ed748f927e96f455
parent637dff5c54b43dfac55116d5476c47a10d1a2690
drm/i915: Implement IS_* macros using static tables

Instead of using the IS_I9XX etc macros that expand to a ton of
comparisons, use new struct intel_device_info to capture the
capabilities of the different chipsets.  The drm_i915_private struct
will be initialized to point to the device info that correspond to
the actual device and this way, testing for a specific capability is
just a matter of checking a bit field.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h