aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index dbfe07c90cbc..7bfded5e90bb 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1094,15 +1094,21 @@ static int i915_probe_agp(struct drm_device *dev, uint32_t *aperture_size,
1094 * Some of the preallocated space is taken by the GTT 1094 * Some of the preallocated space is taken by the GTT
1095 * and popup. GTT is 1K per MB of aperture size, and popup is 4K. 1095 * and popup. GTT is 1K per MB of aperture size, and popup is 4K.
1096 */ 1096 */
1097 if (IS_G4X(dev) || IS_PINEVIEW(dev) || IS_IRONLAKE(dev)) 1097 if (IS_G4X(dev) || IS_PINEVIEW(dev) || IS_IRONLAKE(dev) || IS_GEN6(dev))
1098 overhead = 4096; 1098 overhead = 4096;
1099 else 1099 else
1100 overhead = (*aperture_size / 1024) + 4096; 1100 overhead = (*aperture_size / 1024) + 4096;
1101 1101
1102 switch (tmp & INTEL_GMCH_GMS_MASK) { 1102 switch (tmp & INTEL_GMCH_GMS_MASK) {
1103 case INTEL_855_GMCH_GMS_DISABLED: 1103 case INTEL_855_GMCH_GMS_DISABLED:
1104 DRM_ERROR("video memory is disabled\n"); 1104 /* XXX: This is what my A1 silicon has. */
1105 return -1; 1105 if (IS_GEN6(dev)) {
1106 stolen = 64 * 1024 * 1024;
1107 } else {
1108 DRM_ERROR("video memory is disabled\n");
1109 return -1;
1110 }
1111 break;
1106 case INTEL_855_GMCH_GMS_STOLEN_1M: 1112 case INTEL_855_GMCH_GMS_STOLEN_1M:
1107 stolen = 1 * 1024 * 1024; 1113 stolen = 1 * 1024 * 1024;
1108 break; 1114 break;
@@ -1180,7 +1186,7 @@ static unsigned long i915_gtt_to_phys(struct drm_device *dev,
1180 int gtt_offset, gtt_size; 1186 int gtt_offset, gtt_size;
1181 1187
1182 if (IS_I965G(dev)) { 1188 if (IS_I965G(dev)) {
1183 if (IS_G4X(dev) || IS_IRONLAKE(dev)) { 1189 if (IS_G4X(dev) || IS_IRONLAKE(dev) || IS_GEN6(dev)) {
1184 gtt_offset = 2*1024*1024; 1190 gtt_offset = 2*1024*1024;
1185 gtt_size = 2*1024*1024; 1191 gtt_size = 2*1024*1024;
1186 } else { 1192 } else {
@@ -1563,7 +1569,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1563 1569
1564 dev->driver->get_vblank_counter = i915_get_vblank_counter; 1570 dev->driver->get_vblank_counter = i915_get_vblank_counter;
1565 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ 1571 dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */
1566 if (IS_G4X(dev) || IS_IRONLAKE(dev)) { 1572 if (IS_G4X(dev) || IS_IRONLAKE(dev) || IS_GEN6(dev)) {
1567 dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */ 1573 dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
1568 dev->driver->get_vblank_counter = gm45_get_vblank_counter; 1574 dev->driver->get_vblank_counter = gm45_get_vblank_counter;
1569 } 1575 }