@@ -177,35 +177,33 @@ static const struct intel_device_info intel_pineview_info = {
CURSOR_OFFSETS,
};
+#define GEN5_FEATURES \
+ .gen = 5, .num_pipes = 2, \
+ .need_gfx_hws = 1, .has_hotplug = 1, \
+ .ring_mask = RENDER_RING | BSD_RING, \
+ GEN_DEFAULT_PIPEOFFSETS, \
+ CURSOR_OFFSETS
+
static const struct intel_device_info intel_ironlake_d_info = {
- .gen = 5, .num_pipes = 2,
- .need_gfx_hws = 1, .has_hotplug = 1,
- .ring_mask = RENDER_RING | BSD_RING,
- GEN_DEFAULT_PIPEOFFSETS,
- CURSOR_OFFSETS,
+ GEN5_FEATURES
};
static const struct intel_device_info intel_ironlake_m_info = {
- .gen = 5, .is_mobile = 1, .num_pipes = 2,
- .need_gfx_hws = 1, .has_hotplug = 1,
+ GEN5_FEATURES,
+ .is_mobile = 1,
.has_fbc = 1,
- .ring_mask = RENDER_RING | BSD_RING,
- GEN_DEFAULT_PIPEOFFSETS,
- CURSOR_OFFSETS,
};
#define GEN6_FEATURES \
- .gen = 6, .num_pipes = 2, \
- .need_gfx_hws = 1, .has_hotplug = 1, \
+ GEN5_FEATURES, \
+ .gen = 6, \
.has_fbc = 1, \
.has_runtime_pm = 1, \
.has_core_ring_freq = 1, \
.has_rc6 = 1, \
.has_rc6p = 1, \
.ring_mask = RENDER_RING | BSD_RING | BLT_RING, \
- .has_llc = 1, \
- GEN_DEFAULT_PIPEOFFSETS, \
- CURSOR_OFFSETS
+ .has_llc = 1
static const struct intel_device_info intel_sandybridge_d_info = {
GEN6_FEATURES
Introduce GEN5_FEATURES and make GEN6 inherit from it so that we can reduce code duplication. Use GEN5_FEATURES for ilk. Signed-off-by: Carlos Santa <carlos.santa@intel.com> --- drivers/gpu/drm/i915/i915_pci.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-)