drm/nouveau: fix build with CONFIG_AGP=n
authorBen Skeggs <bskeggs@redhat.com>
Tue, 15 Dec 2009 00:38:32 +0000 (10:38 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 15 Dec 2009 00:57:36 +0000 (10:57 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_mem.c

index 320a14bceb99e70735ebfe8cc4ea33c16689e7c8..aa2dfbc3e35188f612ee6fc086e628312a852b34 100644 (file)
@@ -311,8 +311,10 @@ nouveau_bo_create_ttm_backend_entry(struct ttm_bo_device *bdev)
        struct drm_device *dev = dev_priv->dev;
 
        switch (dev_priv->gart_info.type) {
+#if __OS_HAS_AGP
        case NOUVEAU_GART_AGP:
                return ttm_agp_backend_init(bdev, dev->agp->bridge);
+#endif
        case NOUVEAU_GART_SGDMA:
                return nouveau_sgdma_init_ttm(dev);
        default:
index 02755712ed3d3aa03641478f52c0ef65ab7b9a29..5158a12f7844782acd164797be5f170d45072c2d 100644 (file)
@@ -407,6 +407,7 @@ uint64_t nouveau_mem_fb_amount(struct drm_device *dev)
        return 0;
 }
 
+#if __OS_HAS_AGP
 static void nouveau_mem_reset_agp(struct drm_device *dev)
 {
        uint32_t saved_pci_nv_1, saved_pci_nv_19, pmc_enable;
@@ -432,10 +433,12 @@ static void nouveau_mem_reset_agp(struct drm_device *dev)
        nv_wr32(dev, NV04_PBUS_PCI_NV_19, saved_pci_nv_19);
        nv_wr32(dev, NV04_PBUS_PCI_NV_1, saved_pci_nv_1);
 }
+#endif
 
 int
 nouveau_mem_init_agp(struct drm_device *dev)
 {
+#if __OS_HAS_AGP
        struct drm_nouveau_private *dev_priv = dev->dev_private;
        struct drm_agp_info info;
        struct drm_agp_mode mode;
@@ -471,6 +474,7 @@ nouveau_mem_init_agp(struct drm_device *dev)
        dev_priv->gart_info.type        = NOUVEAU_GART_AGP;
        dev_priv->gart_info.aper_base   = info.aperture_base;
        dev_priv->gart_info.aper_size   = info.aperture_size;
+#endif
        return 0;
 }