diff options
author | Carlos Santa <carlos.santa@intel.com> | 2016-08-17 15:30:51 -0400 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2016-09-07 19:07:09 -0400 |
commit | 0eec8dc7f628a8d871de3a6d7e2f467bafcb69c7 (patch) | |
tree | 1b6e9b4cd469f3360ff829dca639fff43e3cdfff /drivers/gpu/drm | |
parent | 54d2a6a13ed031db5111bb591252dc48ed1985e1 (diff) |
drm/i915: Introduce GEN2_FEATURES for device info
Introducing a GEN2_FEATURES 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 830, 845g, i85x, i865g.
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')
-rw-r--r-- | drivers/gpu/drm/i915/i915_pci.c | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index ca776f5d0034..ca83e6790877 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c | |||
@@ -54,38 +54,33 @@ | |||
54 | #define CHV_COLORS \ | 54 | #define CHV_COLORS \ |
55 | .color = { .degamma_lut_size = 65, .gamma_lut_size = 257 } | 55 | .color = { .degamma_lut_size = 65, .gamma_lut_size = 257 } |
56 | 56 | ||
57 | #define GEN2_FEATURES \ | ||
58 | .gen = 2, .num_pipes = 1, \ | ||
59 | .has_overlay = 1, .overlay_needs_physical = 1, \ | ||
60 | .ring_mask = RENDER_RING, \ | ||
61 | GEN_DEFAULT_PIPEOFFSETS, \ | ||
62 | CURSOR_OFFSETS | ||
63 | |||
57 | static const struct intel_device_info intel_i830_info = { | 64 | static const struct intel_device_info intel_i830_info = { |
58 | .gen = 2, .is_mobile = 1, .cursor_needs_physical = 1, .num_pipes = 2, | 65 | GEN2_FEATURES, |
59 | .has_overlay = 1, .overlay_needs_physical = 1, | 66 | .is_mobile = 1, .cursor_needs_physical = 1, |
60 | .ring_mask = RENDER_RING, | 67 | .num_pipes = 2, /* legal, last one wins */ |
61 | GEN_DEFAULT_PIPEOFFSETS, | ||
62 | CURSOR_OFFSETS, | ||
63 | }; | 68 | }; |
64 | 69 | ||
65 | static const struct intel_device_info intel_845g_info = { | 70 | static const struct intel_device_info intel_845g_info = { |
66 | .gen = 2, .num_pipes = 1, | 71 | GEN2_FEATURES, |
67 | .has_overlay = 1, .overlay_needs_physical = 1, | ||
68 | .ring_mask = RENDER_RING, | ||
69 | GEN_DEFAULT_PIPEOFFSETS, | ||
70 | CURSOR_OFFSETS, | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | static const struct intel_device_info intel_i85x_info = { | 74 | static const struct intel_device_info intel_i85x_info = { |
74 | .gen = 2, .is_i85x = 1, .is_mobile = 1, .num_pipes = 2, | 75 | GEN2_FEATURES, |
76 | .is_i85x = 1, .is_mobile = 1, | ||
77 | .num_pipes = 2, /* legal, last one wins */ | ||
75 | .cursor_needs_physical = 1, | 78 | .cursor_needs_physical = 1, |
76 | .has_overlay = 1, .overlay_needs_physical = 1, | ||
77 | .has_fbc = 1, | 79 | .has_fbc = 1, |
78 | .ring_mask = RENDER_RING, | ||
79 | GEN_DEFAULT_PIPEOFFSETS, | ||
80 | CURSOR_OFFSETS, | ||
81 | }; | 80 | }; |
82 | 81 | ||
83 | static const struct intel_device_info intel_i865g_info = { | 82 | static const struct intel_device_info intel_i865g_info = { |
84 | .gen = 2, .num_pipes = 1, | 83 | GEN2_FEATURES, |
85 | .has_overlay = 1, .overlay_needs_physical = 1, | ||
86 | .ring_mask = RENDER_RING, | ||
87 | GEN_DEFAULT_PIPEOFFSETS, | ||
88 | CURSOR_OFFSETS, | ||
89 | }; | 84 | }; |
90 | 85 | ||
91 | #define GEN3_FEATURES \ | 86 | #define GEN3_FEATURES \ |