[Intel-gfx] [PATCH 03/17] intel-gtt: introduce pte write function for g33/i965/gm45
Daniel Vetter
daniel.vetter at ffwll.ch
Tue Sep 14 00:35:00 CEST 2010
Like for the i830.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/char/agp/intel-gtt.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 59fad22..89dcc0b 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1335,6 +1335,14 @@ static int intel_i915_remove_entries(struct agp_memory *mem, off_t pg_start,
return 0;
}
+static void i965_write_entry(dma_addr_t addr, unsigned int entry,
+ unsigned int flags)
+{
+ /* Shift high bits down */
+ addr |= (addr >> 28) & 0xf0;
+ writel(addr | I810_PTE_VALID, intel_private.gtt + entry);
+}
+
static int i9xx_setup(void)
{
u32 reg_addr;
@@ -1494,7 +1502,7 @@ static const struct agp_bridge_driver intel_i965_driver = {
.size_type = FIXED_APER_SIZE,
.num_aperture_sizes = 4,
.needs_scratch_page = true,
- .configure = intel_i9xx_configure,
+ .configure = intel_fake_agp_configure,
.fetch_size = intel_fake_agp_fetch_size,
.cleanup = intel_gtt_cleanup,
.mask_memory = intel_i965_mask_memory,
@@ -1560,7 +1568,7 @@ static const struct agp_bridge_driver intel_g33_driver = {
.size_type = FIXED_APER_SIZE,
.num_aperture_sizes = 4,
.needs_scratch_page = true,
- .configure = intel_i9xx_configure,
+ .configure = intel_fake_agp_configure,
.fetch_size = intel_fake_agp_fetch_size,
.cleanup = intel_gtt_cleanup,
.mask_memory = intel_i965_mask_memory,
@@ -1602,24 +1610,29 @@ static const struct intel_gtt_driver g33_gtt_driver = {
.gen = 3,
.is_g33 = 1,
.setup = i9xx_setup,
+ .write_entry = i965_write_entry,
};
static const struct intel_gtt_driver pineview_gtt_driver = {
.gen = 3,
.is_pineview = 1, .is_g33 = 1,
.setup = i9xx_setup,
+ .write_entry = i965_write_entry,
};
static const struct intel_gtt_driver i965_gtt_driver = {
.gen = 4,
.setup = i9xx_setup,
+ .write_entry = i965_write_entry,
};
static const struct intel_gtt_driver g4x_gtt_driver = {
.gen = 5,
.setup = i9xx_setup,
+ .write_entry = i965_write_entry,
};
static const struct intel_gtt_driver ironlake_gtt_driver = {
.gen = 5,
.is_ironlake = 1,
.setup = i9xx_setup,
+ .write_entry = i965_write_entry,
};
static const struct intel_gtt_driver sandybridge_gtt_driver = {
.gen = 6,
--
1.7.1
More information about the Intel-gfx
mailing list