aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2012-01-03 17:37:37 -0500
committerDave Airlie <airlied@redhat.com>2012-01-06 04:34:03 -0500
commitdea7e0ac45fd28f90bbc38ff226d36a9f788efbf (patch)
tree1130a3d51f0f8aa8ab462f1735423e3dc37835b6 /drivers/gpu/drm/radeon
parente11d0b87cde80745afe4712a19cd37bca9924a5b (diff)
ttm: fix agp since ttm tt rework
ttm tt rework modified the way we allocate and populate the ttm_tt structure, the AGP side was missing some bit to properly work. Fix those and fix radeon and nouveau AGP support. Tested on radeon only so far. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 1882025a9dc8..c421e77ace71 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -618,6 +618,11 @@ static int radeon_ttm_tt_populate(struct ttm_tt *ttm)
618 return 0; 618 return 0;
619 619
620 rdev = radeon_get_rdev(ttm->bdev); 620 rdev = radeon_get_rdev(ttm->bdev);
621#if __OS_HAS_AGP
622 if (rdev->flags & RADEON_IS_AGP) {
623 return ttm_agp_tt_populate(ttm);
624 }
625#endif
621 626
622#ifdef CONFIG_SWIOTLB 627#ifdef CONFIG_SWIOTLB
623 if (swiotlb_nr_tbl()) { 628 if (swiotlb_nr_tbl()) {
@@ -654,6 +659,12 @@ static void radeon_ttm_tt_unpopulate(struct ttm_tt *ttm)
654 unsigned i; 659 unsigned i;
655 660
656 rdev = radeon_get_rdev(ttm->bdev); 661 rdev = radeon_get_rdev(ttm->bdev);
662#if __OS_HAS_AGP
663 if (rdev->flags & RADEON_IS_AGP) {
664 ttm_agp_tt_unpopulate(ttm);
665 return;
666 }
667#endif
657 668
658#ifdef CONFIG_SWIOTLB 669#ifdef CONFIG_SWIOTLB
659 if (swiotlb_nr_tbl()) { 670 if (swiotlb_nr_tbl()) {