mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 08:43:31 +00:00
drm/amdgpu: explicitly sync VM update to PDs/PTs
Explicitly sync VM updates to the moving fence in PDs and PTs. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
58fe03d6de
commit
81417bea87
2 changed files with 12 additions and 0 deletions
|
@ -86,6 +86,13 @@ static int amdgpu_vm_cpu_update(struct amdgpu_vm_update_params *p,
|
|||
{
|
||||
unsigned int i;
|
||||
uint64_t value;
|
||||
int r;
|
||||
|
||||
if (bo->tbo.moving) {
|
||||
r = dma_fence_wait(bo->tbo.moving, true);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
pe += (unsigned long)amdgpu_bo_kptr(bo);
|
||||
|
||||
|
|
|
@ -208,6 +208,11 @@ static int amdgpu_vm_sdma_update(struct amdgpu_vm_update_params *p,
|
|||
uint64_t *pte;
|
||||
int r;
|
||||
|
||||
/* Wait for PD/PT moves to be completed */
|
||||
r = amdgpu_sync_fence(&p->job->sync, bo->tbo.moving, false);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
do {
|
||||
ndw = p->num_dw_left;
|
||||
ndw -= p->job->ibs->length_dw;
|
||||
|
|
Loading…
Add table
Reference in a new issue