diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2009-12-14 19:38:32 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2009-12-14 19:57:36 -0500 |
commit | b694dfb25a8de4ffbc14c9092ab8f88344ca86b1 (patch) | |
tree | cacdbf3d432384c55cff245452191fa67034178a /drivers/gpu/drm/nouveau/nouveau_mem.c | |
parent | 61c2bb45697a56e96313a5f85f609b0c12ae26ff (diff) |
drm/nouveau: fix build with CONFIG_AGP=n
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_mem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_mem.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c index 02755712ed3d..5158a12f7844 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c | |||
@@ -407,6 +407,7 @@ uint64_t nouveau_mem_fb_amount(struct drm_device *dev) | |||
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | 409 | ||
410 | #if __OS_HAS_AGP | ||
410 | static void nouveau_mem_reset_agp(struct drm_device *dev) | 411 | static void nouveau_mem_reset_agp(struct drm_device *dev) |
411 | { | 412 | { |
412 | uint32_t saved_pci_nv_1, saved_pci_nv_19, pmc_enable; | 413 | 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) | |||
432 | nv_wr32(dev, NV04_PBUS_PCI_NV_19, saved_pci_nv_19); | 433 | nv_wr32(dev, NV04_PBUS_PCI_NV_19, saved_pci_nv_19); |
433 | nv_wr32(dev, NV04_PBUS_PCI_NV_1, saved_pci_nv_1); | 434 | nv_wr32(dev, NV04_PBUS_PCI_NV_1, saved_pci_nv_1); |
434 | } | 435 | } |
436 | #endif | ||
435 | 437 | ||
436 | int | 438 | int |
437 | nouveau_mem_init_agp(struct drm_device *dev) | 439 | nouveau_mem_init_agp(struct drm_device *dev) |
438 | { | 440 | { |
441 | #if __OS_HAS_AGP | ||
439 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 442 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
440 | struct drm_agp_info info; | 443 | struct drm_agp_info info; |
441 | struct drm_agp_mode mode; | 444 | struct drm_agp_mode mode; |
@@ -471,6 +474,7 @@ nouveau_mem_init_agp(struct drm_device *dev) | |||
471 | dev_priv->gart_info.type = NOUVEAU_GART_AGP; | 474 | dev_priv->gart_info.type = NOUVEAU_GART_AGP; |
472 | dev_priv->gart_info.aper_base = info.aperture_base; | 475 | dev_priv->gart_info.aper_base = info.aperture_base; |
473 | dev_priv->gart_info.aper_size = info.aperture_size; | 476 | dev_priv->gart_info.aper_size = info.aperture_size; |
477 | #endif | ||
474 | return 0; | 478 | return 0; |
475 | } | 479 | } |
476 | 480 | ||