提交 08eda32b 编写于 作者: C Christian König 提交者: Alex Deucher

drm/radeon: fix header size estimation in VM code

Only NI uses 3dw headers, SI uses 4dw headers.
Signed-off-by: NChristian König <deathsimple@vodafone.de>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 204a393c
...@@ -1147,17 +1147,17 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, ...@@ -1147,17 +1147,17 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev,
if (RADEON_VM_BLOCK_SIZE > 11) if (RADEON_VM_BLOCK_SIZE > 11)
/* reserve space for one header for every 2k dwords */ /* reserve space for one header for every 2k dwords */
ndw += (nptes >> 11) * 3; ndw += (nptes >> 11) * 4;
else else
/* reserve space for one header for /* reserve space for one header for
every (1 << BLOCK_SIZE) entries */ every (1 << BLOCK_SIZE) entries */
ndw += (nptes >> RADEON_VM_BLOCK_SIZE) * 3; ndw += (nptes >> RADEON_VM_BLOCK_SIZE) * 4;
/* reserve space for pte addresses */ /* reserve space for pte addresses */
ndw += nptes * 2; ndw += nptes * 2;
/* reserve space for one header for every 2k dwords */ /* reserve space for one header for every 2k dwords */
ndw += (npdes >> 11) * 3; ndw += (npdes >> 11) * 4;
/* reserve space for pde addresses */ /* reserve space for pde addresses */
ndw += npdes * 2; ndw += npdes * 2;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册