aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-09-11 08:01:43 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-21 06:35:31 -0400
commita6963596a13e62f8e65b1cf3403a330ff2db407c (patch)
treea384b7f3fa0e8c3b2fadc090e647a5509fa3f6d1 /drivers/char
parent351bb278d2fd2df93526c15f37500070347328b4 (diff)
intel-gtt: introduce pte write function for g33/i965/gm45
Like for the i830. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/agp/intel-gtt.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 4d768e085382..9d25ebd50d89 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1334,6 +1334,14 @@ static int intel_i915_remove_entries(struct agp_memory *mem, off_t pg_start,
1334 return 0; 1334 return 0;
1335} 1335}
1336 1336
1337static void i965_write_entry(dma_addr_t addr, unsigned int entry,
1338 unsigned int flags)
1339{
1340 /* Shift high bits down */
1341 addr |= (addr >> 28) & 0xf0;
1342 writel(addr | I810_PTE_VALID, intel_private.gtt + entry);
1343}
1344
1337static int i9xx_setup(void) 1345static int i9xx_setup(void)
1338{ 1346{
1339 u32 reg_addr; 1347 u32 reg_addr;
@@ -1497,7 +1505,7 @@ static const struct agp_bridge_driver intel_i965_driver = {
1497 .aperture_sizes = intel_fake_agp_sizes, 1505 .aperture_sizes = intel_fake_agp_sizes,
1498 .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes), 1506 .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes),
1499 .needs_scratch_page = true, 1507 .needs_scratch_page = true,
1500 .configure = intel_i9xx_configure, 1508 .configure = intel_fake_agp_configure,
1501 .fetch_size = intel_fake_agp_fetch_size, 1509 .fetch_size = intel_fake_agp_fetch_size,
1502 .cleanup = intel_gtt_cleanup, 1510 .cleanup = intel_gtt_cleanup,
1503 .mask_memory = intel_i965_mask_memory, 1511 .mask_memory = intel_i965_mask_memory,
@@ -1563,7 +1571,7 @@ static const struct agp_bridge_driver intel_g33_driver = {
1563 .aperture_sizes = intel_fake_agp_sizes, 1571 .aperture_sizes = intel_fake_agp_sizes,
1564 .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes), 1572 .num_aperture_sizes = ARRAY_SIZE(intel_fake_agp_sizes),
1565 .needs_scratch_page = true, 1573 .needs_scratch_page = true,
1566 .configure = intel_i9xx_configure, 1574 .configure = intel_fake_agp_configure,
1567 .fetch_size = intel_fake_agp_fetch_size, 1575 .fetch_size = intel_fake_agp_fetch_size,
1568 .cleanup = intel_gtt_cleanup, 1576 .cleanup = intel_gtt_cleanup,
1569 .mask_memory = intel_i965_mask_memory, 1577 .mask_memory = intel_i965_mask_memory,
@@ -1605,24 +1613,29 @@ static const struct intel_gtt_driver g33_gtt_driver = {
1605 .gen = 3, 1613 .gen = 3,
1606 .is_g33 = 1, 1614 .is_g33 = 1,
1607 .setup = i9xx_setup, 1615 .setup = i9xx_setup,
1616 .write_entry = i965_write_entry,
1608}; 1617};
1609static const struct intel_gtt_driver pineview_gtt_driver = { 1618static const struct intel_gtt_driver pineview_gtt_driver = {
1610 .gen = 3, 1619 .gen = 3,
1611 .is_pineview = 1, .is_g33 = 1, 1620 .is_pineview = 1, .is_g33 = 1,
1612 .setup = i9xx_setup, 1621 .setup = i9xx_setup,
1622 .write_entry = i965_write_entry,
1613}; 1623};
1614static const struct intel_gtt_driver i965_gtt_driver = { 1624static const struct intel_gtt_driver i965_gtt_driver = {
1615 .gen = 4, 1625 .gen = 4,
1616 .setup = i9xx_setup, 1626 .setup = i9xx_setup,
1627 .write_entry = i965_write_entry,
1617}; 1628};
1618static const struct intel_gtt_driver g4x_gtt_driver = { 1629static const struct intel_gtt_driver g4x_gtt_driver = {
1619 .gen = 5, 1630 .gen = 5,
1620 .setup = i9xx_setup, 1631 .setup = i9xx_setup,
1632 .write_entry = i965_write_entry,
1621}; 1633};
1622static const struct intel_gtt_driver ironlake_gtt_driver = { 1634static const struct intel_gtt_driver ironlake_gtt_driver = {
1623 .gen = 5, 1635 .gen = 5,
1624 .is_ironlake = 1, 1636 .is_ironlake = 1,
1625 .setup = i9xx_setup, 1637 .setup = i9xx_setup,
1638 .write_entry = i965_write_entry,
1626}; 1639};
1627static const struct intel_gtt_driver sandybridge_gtt_driver = { 1640static const struct intel_gtt_driver sandybridge_gtt_driver = {
1628 .gen = 6, 1641 .gen = 6,