Skip to content

Commit

Permalink
drm/amdgpu: Set a suitable dev_info.gart_page_size
Browse files Browse the repository at this point in the history
In mesa/libdrm, dev_info.gart_page_size is used for alignment and it is
set to AMDGPU_GPU_PAGE_SIZE(4KB). So, for non-4KB page size system, we
should set gart_page_size to max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE).

Signed-off-by: Huacai Chen <chenhc@lemote.com>
  • Loading branch information
chenhuacai committed Jun 16, 2020
1 parent 298c7c7 commit caa9c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
Expand Up @@ -596,7 +596,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
}
dev_info.virtual_address_alignment = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
dev_info.pte_fragment_size = (1 << adev->vm_manager.fragment_size) * AMDGPU_GPU_PAGE_SIZE;
dev_info.gart_page_size = AMDGPU_GPU_PAGE_SIZE;
dev_info.gart_page_size = max((int)PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE);
dev_info.cu_active_number = adev->gfx.cu_info.number;
dev_info.cu_ao_mask = adev->gfx.cu_info.ao_cu_mask;
dev_info.ce_ram_size = adev->gfx.ce_ram_size;
Expand Down

0 comments on commit caa9c0a

Please sign in to comment.