[1/3] drm/amdgpu: use moving fence instead of exclusive for VM updates

Submitted by Christian König on Sept. 2, 2019, 10:52 a.m.

Details

Message ID 20190902105219.2813-1-christian.koenig@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 2 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Christian König Sept. 2, 2019, 10:52 a.m.
Make VM updates depend on the moving fence instead of the exclusive one.

Makes it less likely to actually have a dependency.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 189ad5699946..501e13420786 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1706,7 +1706,7 @@  int amdgpu_vm_bo_update(struct amdgpu_device *adev,
 			ttm = container_of(bo->tbo.ttm, struct ttm_dma_tt, ttm);
 			pages_addr = ttm->dma_address;
 		}
-		exclusive = reservation_object_get_excl(bo->tbo.resv);
+		exclusive = bo->tbo.moving;
 	}
 
 	if (bo) {

Comments

On 2019-09-02 6:52 a.m., Christian König wrote:
> Make VM updates depend on the moving fence instead of the exclusive one.


In effect, this makes the page table update depend on the last move of 
the BO, rather than the last change of the buffer contents. Makes sense.

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>



>

> Makes it less likely to actually have a dependency.

>

> Signed-off-by: Christian König <christian.koenig@amd.com>

> ---

>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-

>   1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

> index 189ad5699946..501e13420786 100644

> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

> @@ -1706,7 +1706,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,

>   			ttm = container_of(bo->tbo.ttm, struct ttm_dma_tt, ttm);

>   			pages_addr = ttm->dma_address;

>   		}

> -		exclusive = reservation_object_get_excl(bo->tbo.resv);

> +		exclusive = bo->tbo.moving;

>   	}

>   

>   	if (bo) {