Commit 55c93278 authored by Michel Dänzer's avatar Michel Dänzer Committed by Dave Airlie

drm/radeon: Respect AGP cant_use_aperture flag.

Some AGP devices can't map the aperture, radeon needs to tell TTM this.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 0454beab
...@@ -133,6 +133,7 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, ...@@ -133,6 +133,7 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->gpu_offset = 0; man->gpu_offset = 0;
man->available_caching = TTM_PL_MASK_CACHING; man->available_caching = TTM_PL_MASK_CACHING;
man->default_caching = TTM_PL_FLAG_CACHED; man->default_caching = TTM_PL_FLAG_CACHED;
man->flags = TTM_MEMTYPE_FLAG_MAPPABLE | TTM_MEMTYPE_FLAG_CMA;
#if __OS_HAS_AGP #if __OS_HAS_AGP
if (rdev->flags & RADEON_IS_AGP) { if (rdev->flags & RADEON_IS_AGP) {
if (!(drm_core_has_AGP(rdev->ddev) && rdev->ddev->agp)) { if (!(drm_core_has_AGP(rdev->ddev) && rdev->ddev->agp)) {
...@@ -143,6 +144,7 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, ...@@ -143,6 +144,7 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->io_offset = rdev->mc.agp_base; man->io_offset = rdev->mc.agp_base;
man->io_size = rdev->mc.gtt_size; man->io_size = rdev->mc.gtt_size;
man->io_addr = NULL; man->io_addr = NULL;
if (!rdev->ddev->agp->cant_use_aperture)
man->flags = TTM_MEMTYPE_FLAG_NEEDS_IOREMAP | man->flags = TTM_MEMTYPE_FLAG_NEEDS_IOREMAP |
TTM_MEMTYPE_FLAG_MAPPABLE; TTM_MEMTYPE_FLAG_MAPPABLE;
man->available_caching = TTM_PL_FLAG_UNCACHED | man->available_caching = TTM_PL_FLAG_UNCACHED |
...@@ -154,8 +156,6 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, ...@@ -154,8 +156,6 @@ static int radeon_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->io_offset = 0; man->io_offset = 0;
man->io_size = 0; man->io_size = 0;
man->io_addr = NULL; man->io_addr = NULL;
man->flags = TTM_MEMTYPE_FLAG_MAPPABLE |
TTM_MEMTYPE_FLAG_CMA;
} }
break; break;
case TTM_PL_VRAM: case TTM_PL_VRAM:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment