• Y
    drm/amdgpu: Fix a bug in amdgpu_fill_buffer() · 7bdc53f9
    Yong Zhao 提交于
    When max_bytes is not 8 bytes aligned and bo size is larger than
    max_bytes, the last 8 bytes in a ttm node may be left unchanged.
    For example, on pre SDMA 4.0, max_bytes = 0x1fffff, and the bo size
    is 0x200000, the problem will happen.
    
    In order to fix the problem, we separately store the max nums of
    PTEs/PDEs a single operation can set in amdgpu_vm_pte_funcs
    structure, rather than inferring it from bytes limit of SDMA
    constant fill, i.e. fill_max_bytes.
    
    Together with the fix, we replace the hard code value "10" in
    amdgpu_vm_bo_update_mapping() with the corresponding values from
    structure amdgpu_vm_pte_funcs.
    Signed-off-by: NYong Zhao <yong.zhao@amd.com>
    Reviewed-by: NChristian König <christian.koenig@amd.com>
    Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
    7bdc53f9
amdgpu_vm.c 74.2 KB