]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/radeon: properly set vm fragment size for TN/RL
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Jan 2015 14:52:24 +0000 (09:52 -0500)
committerLuis Henriques <luis.henriques@canonical.com>
Tue, 10 Feb 2015 13:38:46 +0000 (13:38 +0000)
commit a124d068bf5be6be2ff4b9fab77b1b7509107e68 upstream.

Should be the same as cayman.  We don't use VM by default
on NI parts so this isn't critical.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/gpu/drm/radeon/radeon_vm.c

index abf8e2c876ac0518491ae113e45325cd8fcf710a..0f6f966a8e50850e4d8b45cd7a579f7a724213f5 100644 (file)
@@ -711,9 +711,11 @@ static void radeon_vm_frag_ptes(struct radeon_device *rdev,
         */
 
        /* NI is optimized for 256KB fragments, SI and newer for 64KB */
-       uint64_t frag_flags = rdev->family == CHIP_CAYMAN ?
+       uint64_t frag_flags = ((rdev->family == CHIP_CAYMAN) ||
+                              (rdev->family == CHIP_ARUBA)) ?
                        R600_PTE_FRAG_256KB : R600_PTE_FRAG_64KB;
-       uint64_t frag_align = rdev->family == CHIP_CAYMAN ? 0x200 : 0x80;
+       uint64_t frag_align = ((rdev->family == CHIP_CAYMAN) ||
+                              (rdev->family == CHIP_ARUBA)) ? 0x200 : 0x80;
 
        uint64_t frag_start = ALIGN(pe_start, frag_align);
        uint64_t frag_end = pe_end & ~(frag_align - 1);