Skip to contentSkip to conversation

intel_agp: fix GTT map size on G33

PATCH In review Zhenyu Wang 3 participants 3 messages Sep 5, 2007 – Sep 11, 2007 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_agp: fix GTT map size on G33

Subject: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33

G33 has 1MB GTT table range. Fix GTT mapping
in case like 512MB aperture size.

---
 drivers/char/agp/intel-agp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/char/agp/intel-agp.c +4 -1
index 20d50d0..6a5c555 100644
@@ -919,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
 	struct aper_size_info_fixed *size;
 	int num_entries;
 	u32 temp, temp2;
+	int gtt_map_size = 256 * 1024;
 
 	size = agp_bridge->current_size;
 	page_order = size->page_order;
@@ -928,7 +929,9 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
 	pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
 	pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2);
 
-	intel_private.gtt = ioremap(temp2, 256 * 1024);
+	if (IS_G33)
+	    gtt_map_size = 1024 * 1024; /* 1M on G33 */
+	intel_private.gtt = ioremap(temp2, gtt_map_size);
 	if (!intel_private.gtt)
 		return -ENOMEM;
 
Signature · 1 line
1.5.2.3
#1 lore raw
Quoted 24 lines · On Wed, 5 Sep 2007 15:13:07 +0800 Zhenyu Wang <[email protected]> wrote:

Subject: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33

G33 has 1MB GTT table range. Fix GTT mapping
in case like 512MB aperture size.

---
 drivers/char/agp/intel-agp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/char/agp/intel-agp.c +1 -0
index 20d50d0..6a5c555 100644
@@ -919,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
 	struct aper_size_info_fixed *size;
 	int num_entries;
 	u32 temp, temp2;
+	int gtt_map_size = 256 * 1024;
 
 	size = agp_bridge->current_size;
 	page_order = size->page_order;

drivers/char/agp/intel-agp.c static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge) · line 937

Quoted 10 lines
drivers/char/agp/intel-agp.c +3 -1
@@ -928,7 +929,9 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
 	pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
 	pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2);
 
-	intel_private.gtt = ioremap(temp2, 256 * 1024);
+	if (IS_G33)
+	    gtt_map_size = 1024 * 1024; /* 1M on G33 */
+	intel_private.gtt = ioremap(temp2, gtt_map_size);
 	if (!intel_private.gtt)
 		return -ENOMEM;
 

Ditto. What happens if this patch isn't in 2.6.23? And is it applicable to and needed in 2.6.22?

Acked-by
#2 lore raw
Quoted 6 lines
Quoted 6 lines

Subject: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33

G33 has 1MB GTT table range. Fix GTT mapping
in case like 512MB aperture size.

Quoted 2 lines

Ditto. What happens if this patch isn't in 2.6.23? And is it applicable to and needed in 2.6.22?

It's support for new hardware enablement, so maybe stable requires it, but I'm not sure how widespread this hw is yet..

Dave.