diff options
-rw-r--r-- | drivers/char/agp/intel-gtt.c | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index 04e052e3f3da..56bcf27bdb77 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -292,7 +292,7 @@ static void intel_i810_cleanup(void) | |||
292 | iounmap(intel_private.registers); | 292 | iounmap(intel_private.registers); |
293 | } | 293 | } |
294 | 294 | ||
295 | static void intel_i810_agp_enable(struct agp_bridge_data *bridge, u32 mode) | 295 | static void intel_fake_agp_enable(struct agp_bridge_data *bridge, u32 mode) |
296 | { | 296 | { |
297 | return; | 297 | return; |
298 | } | 298 | } |
@@ -522,7 +522,7 @@ static unsigned long intel_i810_mask_memory(struct agp_bridge_data *bridge, | |||
522 | return addr | bridge->driver->masks[type].mask; | 522 | return addr | bridge->driver->masks[type].mask; |
523 | } | 523 | } |
524 | 524 | ||
525 | static struct aper_size_info_fixed intel_i830_sizes[] = | 525 | static struct aper_size_info_fixed intel_fake_agp_sizes[] = |
526 | { | 526 | { |
527 | {128, 32768, 5}, | 527 | {128, 32768, 5}, |
528 | /* The 64M mode still requires a 128k gatt */ | 528 | /* The 64M mode still requires a 128k gatt */ |
@@ -812,14 +812,14 @@ static int intel_fake_agp_fetch_size(void) | |||
812 | { | 812 | { |
813 | unsigned int aper_size; | 813 | unsigned int aper_size; |
814 | int i; | 814 | int i; |
815 | int num_sizes = ARRAY_SIZE(intel_i830_sizes); | 815 | int num_sizes = ARRAY_SIZE(intel_fake_agp_sizes); |
816 | 816 | ||
817 | aper_size = (intel_private.base.gtt_mappable_entries << PAGE_SHIFT) | 817 | aper_size = (intel_private.base.gtt_mappable_entries << PAGE_SHIFT) |
818 | / MB(1); | 818 | / MB(1); |
819 | 819 | ||
820 | for (i = 0; i < num_sizes; i++) { | 820 | for (i = 0; i < num_sizes; i++) { |
821 | if (aper_size == intel_i830_sizes[i].size) { | 821 | if (aper_size == intel_fake_agp_sizes[i].size) { |
822 | agp_bridge->current_size = intel_i830_sizes + i; | 822 | agp_bridge->current_size = intel_fake_agp_sizes + i; |
823 | return aper_size; | 823 | return aper_size; |
824 | } | 824 | } |
825 | } | 825 | } |
@@ -913,7 +913,7 @@ static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge) | |||
913 | /* Return the gatt table to a sane state. Use the top of stolen | 913 | /* Return the gatt table to a sane state. Use the top of stolen |
914 | * memory for the GTT. | 914 | * memory for the GTT. |
915 | */ | 915 | */ |
916 | static int intel_i830_free_gatt_table(struct agp_bridge_data *bridge) | 916 | static int intel_fake_agp_free_gatt_table(struct agp_bridge_data *bridge) |
917 | { | 917 | { |
918 | return 0; | 918 | return 0; |
919 | } | 919 | } |
@@ -1034,7 +1034,8 @@ static int intel_i830_remove_entries(struct agp_memory *mem, off_t pg_start, | |||
1034 | return 0; | 1034 | return 0; |
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count, int type) | 1037 | static struct agp_memory *intel_fake_agp_alloc_by_type(size_t pg_count, |
1038 | int type) | ||
1038 | { | 1039 | { |
1039 | if (type == AGP_PHYS_MEMORY) | 1040 | if (type == AGP_PHYS_MEMORY) |
1040 | return alloc_agpphysmem_i8xx(pg_count, type); | 1041 | return alloc_agpphysmem_i8xx(pg_count, type); |
@@ -1484,7 +1485,7 @@ static const struct agp_bridge_driver intel_810_driver = { | |||
1484 | .cleanup = intel_i810_cleanup, | 1485 | .cleanup = intel_i810_cleanup, |
1485 | .mask_memory = intel_i810_mask_memory, | 1486 | .mask_memory = intel_i810_mask_memory, |
1486 | .masks = intel_i810_masks, | 1487 | .masks = intel_i810_masks, |
1487 | .agp_enable = intel_i810_agp_enable, | 1488 | .agp_enable = intel_fake_agp_enable, |
1488 | .cache_flush = global_cache_flush, | 1489 | .cache_flush = global_cache_flush, |
1489 | .create_gatt_table = agp_generic_create_gatt_table, | 1490 | .create_gatt_table = agp_generic_create_gatt_table, |
1490 | .free_gatt_table = agp_generic_free_gatt_table, | 1491 | .free_gatt_table = agp_generic_free_gatt_table, |
@@ -1501,7 +1502,7 @@ static const struct agp_bridge_driver intel_810_driver = { | |||
1501 | 1502 | ||
1502 | static const struct agp_bridge_driver intel_830_driver = { | 1503 | static const struct agp_bridge_driver intel_830_driver = { |
1503 | .owner = THIS_MODULE, | 1504 | .owner = THIS_MODULE, |
1504 | .aperture_sizes = intel_i830_sizes, | 1505 | .aperture_sizes = intel_fake_agp_sizes, |
1505 | .size_type = FIXED_APER_SIZE, | 1506 | .size_type = FIXED_APER_SIZE, |
1506 | .num_aperture_sizes = 4, | 1507 | .num_aperture_sizes = 4, |
1507 | .needs_scratch_page = true, | 1508 | .needs_scratch_page = true, |
@@ -1510,13 +1511,13 @@ static const struct agp_bridge_driver intel_830_driver = { | |||
1510 | .cleanup = intel_i830_cleanup, | 1511 | .cleanup = intel_i830_cleanup, |
1511 | .mask_memory = intel_i810_mask_memory, | 1512 | .mask_memory = intel_i810_mask_memory, |
1512 | .masks = intel_i810_masks, | 1513 | .masks = intel_i810_masks, |
1513 | .agp_enable = intel_i810_agp_enable, | 1514 | .agp_enable = intel_fake_agp_enable, |
1514 | .cache_flush = global_cache_flush, | 1515 | .cache_flush = global_cache_flush, |
1515 | .create_gatt_table = intel_i830_create_gatt_table, | 1516 | .create_gatt_table = intel_i830_create_gatt_table, |
1516 | .free_gatt_table = intel_i830_free_gatt_table, | 1517 | .free_gatt_table = intel_fake_agp_free_gatt_table, |
1517 | .insert_memory = intel_i830_insert_entries, | 1518 | .insert_memory = intel_i830_insert_entries, |
1518 | .remove_memory = intel_i830_remove_entries, | 1519 | .remove_memory = intel_i830_remove_entries, |
1519 | .alloc_by_type = intel_i830_alloc_by_type, | 1520 | .alloc_by_type = intel_fake_agp_alloc_by_type, |
1520 | .free_by_type = intel_i810_free_by_type, | 1521 | .free_by_type = intel_i810_free_by_type, |
1521 | .agp_alloc_page = agp_generic_alloc_page, | 1522 | .agp_alloc_page = agp_generic_alloc_page, |
1522 | .agp_alloc_pages = agp_generic_alloc_pages, | 1523 | .agp_alloc_pages = agp_generic_alloc_pages, |
@@ -1528,7 +1529,7 @@ static const struct agp_bridge_driver intel_830_driver = { | |||
1528 | 1529 | ||
1529 | static const struct agp_bridge_driver intel_915_driver = { | 1530 | static const struct agp_bridge_driver intel_915_driver = { |
1530 | .owner = THIS_MODULE, | 1531 | .owner = THIS_MODULE, |
1531 | .aperture_sizes = intel_i830_sizes, | 1532 | .aperture_sizes = intel_fake_agp_sizes, |
1532 | .size_type = FIXED_APER_SIZE, | 1533 | .size_type = FIXED_APER_SIZE, |
1533 | .num_aperture_sizes = 4, | 1534 | .num_aperture_sizes = 4, |
1534 | .needs_scratch_page = true, | 1535 | .needs_scratch_page = true, |
@@ -1537,13 +1538,13 @@ static const struct agp_bridge_driver intel_915_driver = { | |||
1537 | .cleanup = intel_i915_cleanup, | 1538 | .cleanup = intel_i915_cleanup, |
1538 | .mask_memory = intel_i810_mask_memory, | 1539 | .mask_memory = intel_i810_mask_memory, |
1539 | .masks = intel_i810_masks, | 1540 | .masks = intel_i810_masks, |
1540 | .agp_enable = intel_i810_agp_enable, | 1541 | .agp_enable = intel_fake_agp_enable, |
1541 | .cache_flush = global_cache_flush, | 1542 | .cache_flush = global_cache_flush, |
1542 | .create_gatt_table = intel_i915_create_gatt_table, | 1543 | .create_gatt_table = intel_i915_create_gatt_table, |
1543 | .free_gatt_table = intel_i830_free_gatt_table, | 1544 | .free_gatt_table = intel_fake_agp_free_gatt_table, |
1544 | .insert_memory = intel_i915_insert_entries, | 1545 | .insert_memory = intel_i915_insert_entries, |
1545 | .remove_memory = intel_i915_remove_entries, | 1546 | .remove_memory = intel_i915_remove_entries, |
1546 | .alloc_by_type = intel_i830_alloc_by_type, | 1547 | .alloc_by_type = intel_fake_agp_alloc_by_type, |
1547 | .free_by_type = intel_i810_free_by_type, | 1548 | .free_by_type = intel_i810_free_by_type, |
1548 | .agp_alloc_page = agp_generic_alloc_page, | 1549 | .agp_alloc_page = agp_generic_alloc_page, |
1549 | .agp_alloc_pages = agp_generic_alloc_pages, | 1550 | .agp_alloc_pages = agp_generic_alloc_pages, |
@@ -1561,7 +1562,7 @@ static const struct agp_bridge_driver intel_915_driver = { | |||
1561 | 1562 | ||
1562 | static const struct agp_bridge_driver intel_i965_driver = { | 1563 | static const struct agp_bridge_driver intel_i965_driver = { |
1563 | .owner = THIS_MODULE, | 1564 | .owner = THIS_MODULE, |
1564 | .aperture_sizes = intel_i830_sizes, | 1565 | .aperture_sizes = intel_fake_agp_sizes, |
1565 | .size_type = FIXED_APER_SIZE, | 1566 | .size_type = FIXED_APER_SIZE, |
1566 | .num_aperture_sizes = 4, | 1567 | .num_aperture_sizes = 4, |
1567 | .needs_scratch_page = true, | 1568 | .needs_scratch_page = true, |
@@ -1570,13 +1571,13 @@ static const struct agp_bridge_driver intel_i965_driver = { | |||
1570 | .cleanup = intel_i915_cleanup, | 1571 | .cleanup = intel_i915_cleanup, |
1571 | .mask_memory = intel_i965_mask_memory, | 1572 | .mask_memory = intel_i965_mask_memory, |
1572 | .masks = intel_i810_masks, | 1573 | .masks = intel_i810_masks, |
1573 | .agp_enable = intel_i810_agp_enable, | 1574 | .agp_enable = intel_fake_agp_enable, |
1574 | .cache_flush = global_cache_flush, | 1575 | .cache_flush = global_cache_flush, |
1575 | .create_gatt_table = intel_i965_create_gatt_table, | 1576 | .create_gatt_table = intel_i965_create_gatt_table, |
1576 | .free_gatt_table = intel_i830_free_gatt_table, | 1577 | .free_gatt_table = intel_fake_agp_free_gatt_table, |
1577 | .insert_memory = intel_i915_insert_entries, | 1578 | .insert_memory = intel_i915_insert_entries, |
1578 | .remove_memory = intel_i915_remove_entries, | 1579 | .remove_memory = intel_i915_remove_entries, |
1579 | .alloc_by_type = intel_i830_alloc_by_type, | 1580 | .alloc_by_type = intel_fake_agp_alloc_by_type, |
1580 | .free_by_type = intel_i810_free_by_type, | 1581 | .free_by_type = intel_i810_free_by_type, |
1581 | .agp_alloc_page = agp_generic_alloc_page, | 1582 | .agp_alloc_page = agp_generic_alloc_page, |
1582 | .agp_alloc_pages = agp_generic_alloc_pages, | 1583 | .agp_alloc_pages = agp_generic_alloc_pages, |
@@ -1594,7 +1595,7 @@ static const struct agp_bridge_driver intel_i965_driver = { | |||
1594 | 1595 | ||
1595 | static const struct agp_bridge_driver intel_gen6_driver = { | 1596 | static const struct agp_bridge_driver intel_gen6_driver = { |
1596 | .owner = THIS_MODULE, | 1597 | .owner = THIS_MODULE, |
1597 | .aperture_sizes = intel_i830_sizes, | 1598 | .aperture_sizes = intel_fake_agp_sizes, |
1598 | .size_type = FIXED_APER_SIZE, | 1599 | .size_type = FIXED_APER_SIZE, |
1599 | .num_aperture_sizes = 4, | 1600 | .num_aperture_sizes = 4, |
1600 | .needs_scratch_page = true, | 1601 | .needs_scratch_page = true, |
@@ -1603,13 +1604,13 @@ static const struct agp_bridge_driver intel_gen6_driver = { | |||
1603 | .cleanup = intel_i915_cleanup, | 1604 | .cleanup = intel_i915_cleanup, |
1604 | .mask_memory = intel_gen6_mask_memory, | 1605 | .mask_memory = intel_gen6_mask_memory, |
1605 | .masks = intel_gen6_masks, | 1606 | .masks = intel_gen6_masks, |
1606 | .agp_enable = intel_i810_agp_enable, | 1607 | .agp_enable = intel_fake_agp_enable, |
1607 | .cache_flush = global_cache_flush, | 1608 | .cache_flush = global_cache_flush, |
1608 | .create_gatt_table = intel_i965_create_gatt_table, | 1609 | .create_gatt_table = intel_i965_create_gatt_table, |
1609 | .free_gatt_table = intel_i830_free_gatt_table, | 1610 | .free_gatt_table = intel_fake_agp_free_gatt_table, |
1610 | .insert_memory = intel_i915_insert_entries, | 1611 | .insert_memory = intel_i915_insert_entries, |
1611 | .remove_memory = intel_i915_remove_entries, | 1612 | .remove_memory = intel_i915_remove_entries, |
1612 | .alloc_by_type = intel_i830_alloc_by_type, | 1613 | .alloc_by_type = intel_fake_agp_alloc_by_type, |
1613 | .free_by_type = intel_i810_free_by_type, | 1614 | .free_by_type = intel_i810_free_by_type, |
1614 | .agp_alloc_page = agp_generic_alloc_page, | 1615 | .agp_alloc_page = agp_generic_alloc_page, |
1615 | .agp_alloc_pages = agp_generic_alloc_pages, | 1616 | .agp_alloc_pages = agp_generic_alloc_pages, |
@@ -1627,7 +1628,7 @@ static const struct agp_bridge_driver intel_gen6_driver = { | |||
1627 | 1628 | ||
1628 | static const struct agp_bridge_driver intel_g33_driver = { | 1629 | static const struct agp_bridge_driver intel_g33_driver = { |
1629 | .owner = THIS_MODULE, | 1630 | .owner = THIS_MODULE, |
1630 | .aperture_sizes = intel_i830_sizes, | 1631 | .aperture_sizes = intel_fake_agp_sizes, |
1631 | .size_type = FIXED_APER_SIZE, | 1632 | .size_type = FIXED_APER_SIZE, |
1632 | .num_aperture_sizes = 4, | 1633 | .num_aperture_sizes = 4, |
1633 | .needs_scratch_page = true, | 1634 | .needs_scratch_page = true, |
@@ -1636,13 +1637,13 @@ static const struct agp_bridge_driver intel_g33_driver = { | |||
1636 | .cleanup = intel_i915_cleanup, | 1637 | .cleanup = intel_i915_cleanup, |
1637 | .mask_memory = intel_i965_mask_memory, | 1638 | .mask_memory = intel_i965_mask_memory, |
1638 | .masks = intel_i810_masks, | 1639 | .masks = intel_i810_masks, |
1639 | .agp_enable = intel_i810_agp_enable, | 1640 | .agp_enable = intel_fake_agp_enable, |
1640 | .cache_flush = global_cache_flush, | 1641 | .cache_flush = global_cache_flush, |
1641 | .create_gatt_table = intel_i915_create_gatt_table, | 1642 | .create_gatt_table = intel_i915_create_gatt_table, |
1642 | .free_gatt_table = intel_i830_free_gatt_table, | 1643 | .free_gatt_table = intel_fake_agp_free_gatt_table, |
1643 | .insert_memory = intel_i915_insert_entries, | 1644 | .insert_memory = intel_i915_insert_entries, |
1644 | .remove_memory = intel_i915_remove_entries, | 1645 | .remove_memory = intel_i915_remove_entries, |
1645 | .alloc_by_type = intel_i830_alloc_by_type, | 1646 | .alloc_by_type = intel_fake_agp_alloc_by_type, |
1646 | .free_by_type = intel_i810_free_by_type, | 1647 | .free_by_type = intel_i810_free_by_type, |
1647 | .agp_alloc_page = agp_generic_alloc_page, | 1648 | .agp_alloc_page = agp_generic_alloc_page, |
1648 | .agp_alloc_pages = agp_generic_alloc_pages, | 1649 | .agp_alloc_pages = agp_generic_alloc_pages, |