diff options
author | Dave Airlie <airlied@redhat.com> | 2020-12-10 16:55:41 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-12-10 16:55:53 +1000 |
commit | b10733527bfd864605c33ab2e9a886eec317ec39 (patch) | |
tree | d7d671d2fa69e628e2ac898ba8e9ab10c6481c3c /drivers/gpu/drm/radeon/radeon_ttm.c | |
parent | 60f2f74978e69fdb63e7a26179cbd5c50d4845c2 (diff) | |
parent | f8aab60422c371425365d386dfd51e0c6c5b1041 (diff) |
Merge tag 'amd-drm-next-5.11-2020-12-09' of git://people.freedesktop.org/~agd5f/linux into drm-next
amd-drm-next-5.11-2020-12-09:
amdgpu:
- SR-IOV fixes
- Navy Flounder updates
- Sienna Cichlid updates
- Dimgrey Cavefish updates
- Vangogh updates
- Misc SMU fixes
- Misc display fixes
- Last big hunk of W=1 warning fixes
- Cursor validation fixes
- CI BACO updates
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201210045344.21566-1-alexander.deucher@amd.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ttm.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c index 0ca381b95d3d..28b300ed200e 100644 --- a/drivers/gpu/drm/radeon/radeon_ttm.c +++ b/drivers/gpu/drm/radeon/radeon_ttm.c @@ -51,6 +51,7 @@ #include "radeon_reg.h" #include "radeon.h" +#include "radeon_ttm.h" static int radeon_ttm_debugfs_init(struct radeon_device *rdev); static void radeon_ttm_debugfs_fini(struct radeon_device *rdev); @@ -515,20 +516,18 @@ static void radeon_ttm_backend_destroy(struct ttm_bo_device *bdev, struct ttm_tt static struct ttm_tt *radeon_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags) { - struct radeon_device *rdev; struct radeon_ttm_tt *gtt; enum ttm_caching caching; struct radeon_bo *rbo; - - rbo = container_of(bo, struct radeon_bo, tbo); - - rdev = radeon_get_rdev(bo->bdev); #if IS_ENABLED(CONFIG_AGP) + struct radeon_device *rdev = radeon_get_rdev(bo->bdev); + if (rdev->flags & RADEON_IS_AGP) { return ttm_agp_tt_create(bo, rdev->ddev->agp->bridge, page_flags); } #endif + rbo = container_of(bo, struct radeon_bo, tbo); gtt = kzalloc(sizeof(struct radeon_ttm_tt), GFP_KERNEL); if (gtt == NULL) { |