diff options
author | Zhenyu Wang <zhenyuw@linux.intel.com> | 2010-07-09 13:40:58 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-01 22:03:48 -0400 |
commit | 3869d4a8afd3ce97770e66d6a96672af93984cc2 (patch) | |
tree | 4b30002a2a55f2a74fcaf809ff58a0d8a37b286b /drivers/char/agp | |
parent | 6103da0d03d5f185070be50a0cb8813f6bf30dc1 (diff) |
agp/intel: Support the extended physical addressing bits on Sandybridge.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
[anholt: Split this patch out of a larger patch for Sandybridge fixes]
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/char/agp')
-rw-r--r-- | drivers/char/agp/intel-agp.c | 4 | ||||
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 43 |
2 files changed, 45 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index d836a71bf06d..5bbc7be203a6 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -816,9 +816,9 @@ static const struct intel_driver_description { | |||
816 | { PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB, PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG, | 816 | { PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB, PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG, |
817 | "HD Graphics", NULL, &intel_i965_driver }, | 817 | "HD Graphics", NULL, &intel_i965_driver }, |
818 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB, PCI_DEVICE_ID_INTEL_SANDYBRIDGE_IG, | 818 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB, PCI_DEVICE_ID_INTEL_SANDYBRIDGE_IG, |
819 | "Sandybridge", NULL, &intel_i965_driver }, | 819 | "Sandybridge", NULL, &intel_gen6_driver }, |
820 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB, PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_IG, | 820 | { PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB, PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_IG, |
821 | "Sandybridge", NULL, &intel_i965_driver }, | 821 | "Sandybridge", NULL, &intel_gen6_driver }, |
822 | { 0, 0, NULL, NULL, NULL } | 822 | { 0, 0, NULL, NULL, NULL } |
823 | }; | 823 | }; |
824 | 824 | ||
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index f97122a53ca3..2b1a0e96c71f 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -1315,6 +1315,16 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, | |||
1315 | return addr | bridge->driver->masks[type].mask; | 1315 | return addr | bridge->driver->masks[type].mask; |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | static unsigned long intel_gen6_mask_memory(struct agp_bridge_data *bridge, | ||
1319 | dma_addr_t addr, int type) | ||
1320 | { | ||
1321 | /* Shift high bits down */ | ||
1322 | addr |= (addr >> 28) & 0xff; | ||
1323 | |||
1324 | /* Type checking must be done elsewhere */ | ||
1325 | return addr | bridge->driver->masks[type].mask; | ||
1326 | } | ||
1327 | |||
1318 | static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) | 1328 | static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) |
1319 | { | 1329 | { |
1320 | u16 snb_gmch_ctl; | 1330 | u16 snb_gmch_ctl; |
@@ -1528,6 +1538,39 @@ static const struct agp_bridge_driver intel_i965_driver = { | |||
1528 | #endif | 1538 | #endif |
1529 | }; | 1539 | }; |
1530 | 1540 | ||
1541 | static const struct agp_bridge_driver intel_gen6_driver = { | ||
1542 | .owner = THIS_MODULE, | ||
1543 | .aperture_sizes = intel_i830_sizes, | ||
1544 | .size_type = FIXED_APER_SIZE, | ||
1545 | .num_aperture_sizes = 4, | ||
1546 | .needs_scratch_page = true, | ||
1547 | .configure = intel_i9xx_configure, | ||
1548 | .fetch_size = intel_i9xx_fetch_size, | ||
1549 | .cleanup = intel_i915_cleanup, | ||
1550 | .mask_memory = intel_gen6_mask_memory, | ||
1551 | .masks = intel_i810_masks, | ||
1552 | .agp_enable = intel_i810_agp_enable, | ||
1553 | .cache_flush = global_cache_flush, | ||
1554 | .create_gatt_table = intel_i965_create_gatt_table, | ||
1555 | .free_gatt_table = intel_i830_free_gatt_table, | ||
1556 | .insert_memory = intel_i915_insert_entries, | ||
1557 | .remove_memory = intel_i915_remove_entries, | ||
1558 | .alloc_by_type = intel_i830_alloc_by_type, | ||
1559 | .free_by_type = intel_i810_free_by_type, | ||
1560 | .agp_alloc_page = agp_generic_alloc_page, | ||
1561 | .agp_alloc_pages = agp_generic_alloc_pages, | ||
1562 | .agp_destroy_page = agp_generic_destroy_page, | ||
1563 | .agp_destroy_pages = agp_generic_destroy_pages, | ||
1564 | .agp_type_to_mask_type = intel_i830_type_to_mask_type, | ||
1565 | .chipset_flush = intel_i915_chipset_flush, | ||
1566 | #ifdef USE_PCI_DMA_API | ||
1567 | .agp_map_page = intel_agp_map_page, | ||
1568 | .agp_unmap_page = intel_agp_unmap_page, | ||
1569 | .agp_map_memory = intel_agp_map_memory, | ||
1570 | .agp_unmap_memory = intel_agp_unmap_memory, | ||
1571 | #endif | ||
1572 | }; | ||
1573 | |||
1531 | static const struct agp_bridge_driver intel_g33_driver = { | 1574 | static const struct agp_bridge_driver intel_g33_driver = { |
1532 | .owner = THIS_MODULE, | 1575 | .owner = THIS_MODULE, |
1533 | .aperture_sizes = intel_i830_sizes, | 1576 | .aperture_sizes = intel_i830_sizes, |