Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-23 Thread Zhu, Rex
; amd-gfx@lists.freedesktop.org; Deucher, Alexander; Koenig, Christian Subject: Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed Hi guys, yeah the root PD doesn't necessarily have a power of two entries. But what exactly was the problem with the original code? Why does 0x do

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-23 Thread Christian König
em. Best Regards Rex *From:* amd-gfx on behalf of Zhang, Jerry(Junwei) *Sent:* Tuesday, October 23, 2018 1:12 PM *To:* Zhu, Rex; amd-gfx@lists.freedesktop.org; Deucher, Alexander; Koenig, Christian *Subject:* Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed On 10/23/2018 11:29 AM, Re

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Zhu, Rex
Zhu, Rex; amd-gfx@lists.freedesktop.org; Deucher, Alexander; Koenig, Christian Subject: Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed On 10/23/2018 11:29 AM, Rex Zhu wrote: > when the VA address located in the last PD entries, > the alloc_pts will faile. > > Use the right PD

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Zhang, Jerry(Junwei)
On 10/23/2018 01:12 PM, Zhang, Jerry(Junwei) wrote: On 10/23/2018 11:29 AM, Rex Zhu wrote: when the VA address located in the last PD entries, the alloc_pts will faile. Use the right PD mask instand of hardcode, suggested by jerry.zhang. Signed-off-by: Rex Zhu Thanks to verify that. Feel fr

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Zhang, Jerry(Junwei)
On 10/23/2018 11:29 AM, Rex Zhu wrote: when the VA address located in the last PD entries, the alloc_pts will faile. Use the right PD mask instand of hardcode, suggested by jerry.zhang. Signed-off-by: Rex Zhu Thanks to verify that. Feel free to add Reviewed-by: Junwei Zhang Also like to ge

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Zhu, Rex
oenig, Christian Subject: Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed On 10/23/2018 12:09 AM, Rex Zhu wrote: > When the va address located in the last pd entry, Do you mean the root PD? maybe we need roundup root PD in amdgpu_vm_entries_mask() like amdgpu_vm_num_entries(). BT

[PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Rex Zhu
when the VA address located in the last PD entries, the alloc_pts will faile. Use the right PD mask instand of hardcode, suggested by jerry.zhang. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gp

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Zhang, Jerry(Junwei)
On 10/23/2018 12:09 AM, Rex Zhu wrote: When the va address located in the last pd entry, Do you mean the root PD? maybe we need roundup root PD in amdgpu_vm_entries_mask() like amdgpu_vm_num_entries(). BTW, looks amdgpu_vm_entries_mask() is going to replace the amdgpu_vm_num_entries() Jer

Re: [PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Deucher, Alexander
/amdgpu: Fix amdgpu_vm_alloc_pts failed When the va address located in the last pd entry, the alloc_pts will failed. caused by "drm/amdgpu: add amdgpu_vm_entries_mask v2" commit 72af632549b97ead9251bb155f08fefd1fb6f5c3. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH] drm/amdgpu: Fix amdgpu_vm_alloc_pts failed

2018-10-22 Thread Rex Zhu
When the va address located in the last pd entry, the alloc_pts will failed. caused by "drm/amdgpu: add amdgpu_vm_entries_mask v2" commit 72af632549b97ead9251bb155f08fefd1fb6f5c3. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 34 +++--- 1 file ch