Commit 76d2e56
drm/amdgpu: fix max_entries calculation v4
[ Upstream commit ee354ff ]
Calculate the correct value for max_entries or we might run after the
page_address array.
v2: Xinhui pointed out we don't need the shift
v3: use local copy of start and simplify some calculation
v4: fix the case that we map less VA range than BO size
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 1e691e2 drm/amdgpu: stop allocating dummy GTT nodes
Reviewed-by: xinhui pan <xinhui.pan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent e18e036 commit 76d2e56
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1691 | 1691 | | |
1692 | 1692 | | |
1693 | 1693 | | |
| 1694 | + | |
1694 | 1695 | | |
1695 | 1696 | | |
1696 | | - | |
1697 | | - | |
| 1697 | + | |
| 1698 | + | |
1698 | 1699 | | |
1699 | 1700 | | |
1700 | | - | |
1701 | 1701 | | |
1702 | 1702 | | |
1703 | 1703 | | |
| |||
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
1730 | | - | |
| 1730 | + | |
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
| |||
0 commit comments