summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_pci.c
diff options
context:
space:
mode:
authorCarlos Santa2016-08-17 21:30:38 +0200
committerRodrigo Vivi2016-09-08 01:07:07 +0200
commit07db6be72e2c4e54aca12f3f09b4dc7d33f023f0 (patch)
treecd57136d06176f49ad5ac9f73ed3eac8c4930a6a /drivers/gpu/drm/i915/i915_pci.c
parentdrm/i915: Remove .is_mobile field from platform struct (diff)
downloadkernel-qcow2-linux-07db6be72e2c4e54aca12f3f09b4dc7d33f023f0.tar.gz
kernel-qcow2-linux-07db6be72e2c4e54aca12f3f09b4dc7d33f023f0.tar.xz
kernel-qcow2-linux-07db6be72e2c4e54aca12f3f09b4dc7d33f023f0.zip
drm/i915: Introduce GEN6_FEATURES for device info
Introducing a GEN6_FEAUTRES macro to simplify the struct definitions by platforms given that most of the features are common. Inspired by the GEN7_FEATURES macro done by Ben W. and others. Use it for snb. CC: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Carlos Santa <carlos.santa@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_pci.c')
-rw-r--r--drivers/gpu/drm/i915/i915_pci.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index b5ec8a761b8b..bdc207131ab7 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -195,24 +195,22 @@ static const struct intel_device_info intel_ironlake_m_info = {
CURSOR_OFFSETS,
};
+#define GEN6_FEATURES \
+ .gen = 6, .num_pipes = 2, \
+ .need_gfx_hws = 1, .has_hotplug = 1, \
+ .has_fbc = 1, \
+ .ring_mask = RENDER_RING | BSD_RING | BLT_RING, \
+ .has_llc = 1, \
+ GEN_DEFAULT_PIPEOFFSETS, \
+ CURSOR_OFFSETS
+
static const struct intel_device_info intel_sandybridge_d_info = {
- .gen = 6, .num_pipes = 2,
- .need_gfx_hws = 1, .has_hotplug = 1,
- .has_fbc = 1,
- .ring_mask = RENDER_RING | BSD_RING | BLT_RING,
- .has_llc = 1,
- GEN_DEFAULT_PIPEOFFSETS,
- CURSOR_OFFSETS,
+ GEN6_FEATURES,
};
static const struct intel_device_info intel_sandybridge_m_info = {
- .gen = 6, .is_mobile = 1, .num_pipes = 2,
- .need_gfx_hws = 1, .has_hotplug = 1,
- .has_fbc = 1,
- .ring_mask = RENDER_RING | BSD_RING | BLT_RING,
- .has_llc = 1,
- GEN_DEFAULT_PIPEOFFSETS,
- CURSOR_OFFSETS,
+ GEN6_FEATURES,
+ .is_mobile = 1,
};
#define GEN7_FEATURES \