summaryrefslogtreecommitdiff
path: root/lib/intel_reg_map.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2012-02-08 12:05:05 -0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-02-08 21:35:56 +0100
commit90a6f75dd284e4527e6583a519da5b634f8b469d (patch)
treef9c4c054f36295d34c0817b21f89803295b1d237 /lib/intel_reg_map.c
parent6fe3884bc97b7c9ad5cdcbc9144cb7319341eb75 (diff)
Update generation checks to provide basic support for Ivybridge.
There may be some updates required, but assuming Ivybridge is similar to Sandybridge is a decent start; previously it fell through to the Gen2/3 case and nothing worked. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/intel_reg_map.c')
-rw-r--r--lib/intel_reg_map.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/intel_reg_map.c b/lib/intel_reg_map.c
index 86cf9a61..0c8d49c9 100644
--- a/lib/intel_reg_map.c
+++ b/lib/intel_reg_map.c
@@ -128,14 +128,15 @@ struct intel_register_map
intel_get_register_map(uint32_t devid)
{
struct intel_register_map map;
+ const int gen = intel_gen(devid);
- if (IS_GEN6(devid)) {
+ if (gen >= 6) {
map.map = gen6_gt_register_map;
map.top = 0x180000;
} else if (IS_BROADWATER(devid) || IS_CRESTLINE(devid)) {
map.map = gen_bwcl_register_map;
map.top = 0x80000;
- } else if (IS_GEN4(devid) || IS_GEN5(devid)) {
+ } else if (gen >= 4) {
map.map = gen4_register_map;
map.top = 0x80000;
} else {