Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a124d068 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/radeon: properly set vm fragment size for TN/RL



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

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 544143f9
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -743,9 +743,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);