diff options
author | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2007-04-11 12:52:57 -0700 |
---|---|---|
committer | Jesse Barnes <jbarnes@hobbes.virtuousgeek.org> | 2007-04-11 12:52:57 -0700 |
commit | 9d7160c43a7475b9d2ab06c5c353acb9456efa12 (patch) | |
tree | 25b6b37f39aaae453ddaeb117d2957340e6735fc | |
parent | 2e21779992bd5026d8ec4dea52466377dbe5a0ed (diff) |
Use new kernel buffer object type and cleanup agp probing.
-rw-r--r-- | shared-core/i915_init.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index fba633fd..b942b70f 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -44,24 +44,19 @@ int i915_probe_agp(struct pci_dev *pdev, unsigned long *aperture_size, *preallocated_size = 1024 * 1024; switch (pdev->device) { - case PCI_DEVICE_ID_INTEL_82915G_IG: - case PCI_DEVICE_ID_INTEL_82915GM_IG: - case PCI_DEVICE_ID_INTEL_82945G_IG: - case PCI_DEVICE_ID_INTEL_82945GM_IG: - /* 915 and 945 chipsets support a 256MB aperture. - Aperture size is determined by inspected the - base address of the aperture. */ - if (pci_resource_start(pdev, 2) & 0x08000000) - *aperture_size *= 128; - else - *aperture_size *= 256; - break; - default: + case PCI_DEVICE_ID_INTEL_82830_CGC: + case PCI_DEVICE_ID_INTEL_82845G_HB: + case PCI_DEVICE_ID_INTEL_82855GM_IG: + case PCI_DEVICE_ID_INTEL_82865_IG: if ((tmp & INTEL_GMCH_MEM_MASK) == INTEL_GMCH_MEM_64M) *aperture_size *= 64; else *aperture_size *= 128; break; + default: + /* 9xx supports large sizes, just look at the length */ + *aperture_size = pci_resource_len(pdev, 2); + break; } /* @@ -192,7 +187,7 @@ int i915_driver_load(drm_device_t *dev, unsigned long flags) vsize = 800; bytes_per_pixel = 4; size = hsize * vsize * bytes_per_pixel; - drm_buffer_object_create(dev, size, drm_bo_type_dc, + drm_buffer_object_create(dev, size, drm_bo_type_kernel, DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_MEM_PRIV0 | DRM_BO_FLAG_NO_MOVE, 0, PAGE_SIZE, 0, |