Commit 4740622c authored by Zhenyu Wang's avatar Zhenyu Wang Committed by Linus Torvalds

intel_agp: fix GTT map size on G33

G33 has 1MB GTT table range.  Fix GTT mapping in case like 512MB aperture
size.
Signed-off-by: default avatarZhenyu Wang <zhenyu.z.wang@intel.com>
Acked-by: default avatarDave Airlie <airlied@linux.ie>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f443675a
...@@ -919,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge) ...@@ -919,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
struct aper_size_info_fixed *size; struct aper_size_info_fixed *size;
int num_entries; int num_entries;
u32 temp, temp2; u32 temp, temp2;
int gtt_map_size = 256 * 1024;
size = agp_bridge->current_size; size = agp_bridge->current_size;
page_order = size->page_order; page_order = size->page_order;
...@@ -928,7 +929,9 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge) ...@@ -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_MMADDR, &temp);
pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2); 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) if (!intel_private.gtt)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment