Skip to content

Commit

Permalink
drm/nouveau: only call ttm_agp_tt_create when __OS_HAS_AGP
Browse files Browse the repository at this point in the history
ttm_agp_tt_create is itself defined under CONFIG_AGP, so there's no
point calling it otherwise.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Max Filippov authored and Ben Skeggs committed Oct 16, 2012
1 parent 5db4c6c commit df1b4b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/nouveau/nouveau_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,15 @@ static struct ttm_tt *
nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size,
uint32_t page_flags, struct page *dummy_read)
{
#if __OS_HAS_AGP
struct nouveau_drm *drm = nouveau_bdev(bdev);
struct drm_device *dev = drm->dev;

if (drm->agp.stat == ENABLED) {
return ttm_agp_tt_create(bdev, dev->agp->bridge, size,
page_flags, dummy_read);
}
#endif

return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read);
}
Expand Down

0 comments on commit df1b4b9

Please sign in to comment.