aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-01-18 15:30:34 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-20 07:11:12 -0500
commite5c653777986b40e2986d2c918847fddbcba3a34 (patch)
tree3d1ec01de02c7770bbee08e2daf0b0edf67f35e6
parent8d2e630899165d413ae8a2adc36846ac0b71bada (diff)
agp/intel: Add gma_bus_addr
It is no longer used in the i915 code, so isolate it from the shared struct. This was originally part of: commit 0e275518f325418d559c05327775bff894b237f7 Author: Ben Widawsky <ben@bwidawsk.net> Date: Mon Jan 14 13:35:33 2013 -0800 agp/intel: decouple more of the agp-i915 sharing Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net> That commit had some other hunks which can't be used due to issues Daniel found in previous commits. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> [danvet: drop squash notice from the commit since it's imo ok to keep this one separate.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/char/agp/intel-gtt.c5
-rw-r--r--include/drm/intel-gtt.h2
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index b45241479a56..ff5f3483e8ea 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -79,6 +79,7 @@ static struct _intel_private {
79 int refcount; 79 int refcount;
80 /* Whether i915 needs to use the dmar apis or not. */ 80 /* Whether i915 needs to use the dmar apis or not. */
81 unsigned int needs_dmar : 1; 81 unsigned int needs_dmar : 1;
82 phys_addr_t gma_bus_addr;
82} intel_private; 83} intel_private;
83 84
84#define INTEL_GTT_GEN intel_private.driver->gen 85#define INTEL_GTT_GEN intel_private.driver->gen
@@ -625,7 +626,7 @@ static int intel_gtt_init(void)
625 pci_read_config_dword(intel_private.pcidev, I915_GMADDR, 626 pci_read_config_dword(intel_private.pcidev, I915_GMADDR,
626 &gma_addr); 627 &gma_addr);
627 628
628 intel_private.base.gma_bus_addr = (gma_addr & PCI_BASE_ADDRESS_MEM_MASK); 629 intel_private.gma_bus_addr = (gma_addr & PCI_BASE_ADDRESS_MEM_MASK);
629 630
630 return 0; 631 return 0;
631} 632}
@@ -781,7 +782,7 @@ static int intel_fake_agp_configure(void)
781 return -EIO; 782 return -EIO;
782 783
783 intel_private.clear_fake_agp = true; 784 intel_private.clear_fake_agp = true;
784 agp_bridge->gart_bus_addr = intel_private.base.gma_bus_addr; 785 agp_bridge->gart_bus_addr = intel_private.gma_bus_addr;
785 786
786 return 0; 787 return 0;
787} 788}
diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h
index 984105cddc57..769b6c79097e 100644
--- a/include/drm/intel-gtt.h
+++ b/include/drm/intel-gtt.h
@@ -11,8 +11,6 @@ struct intel_gtt {
11 /* Part of the gtt that is mappable by the cpu, for those chips where 11 /* Part of the gtt that is mappable by the cpu, for those chips where
12 * this is not the full gtt. */ 12 * this is not the full gtt. */
13 unsigned int gtt_mappable_entries; 13 unsigned int gtt_mappable_entries;
14 /* needed for ioremap in drm/i915 */
15 phys_addr_t gma_bus_addr;
16} *intel_gtt_get(void); 14} *intel_gtt_get(void);
17 15
18int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev, 16int intel_gmch_probe(struct pci_dev *bridge_pdev, struct pci_dev *gpu_pdev,