diff options
| author | Nirmoy Das <nirmoy.das@amd.com> | 2021-06-15 11:05:08 +0200 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2021-06-15 17:25:42 -0400 | 
| commit | e18aaea733da9c8cb43b21336610ec9796036d3e (patch) | |
| tree | ef8051385599150541a96e1dd64b3064bf456164 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
| parent | 23e24fbb7695d42fa90afefe08c06f29b47548ee (diff) | |
drm/amdgpu: move shadow_list to amdgpu_bo_vm
Move shadow_list to struct amdgpu_bo_vm as shadow BOs
are part of PT/PD BOs.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 6a242ec3f7ef..130a9adf09ef 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4124,6 +4124,7 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)  {  	struct dma_fence *fence = NULL, *next = NULL;  	struct amdgpu_bo *shadow; +	struct amdgpu_bo_vm *vmbo;  	long r = 1, tmo;  	if (amdgpu_sriov_runtime(adev)) @@ -4133,8 +4134,8 @@ static int amdgpu_device_recover_vram(struct amdgpu_device *adev)  	dev_info(adev->dev, "recover vram bo from shadow start\n");  	mutex_lock(&adev->shadow_list_lock); -	list_for_each_entry(shadow, &adev->shadow_list, shadow_list) { - +	list_for_each_entry(vmbo, &adev->shadow_list, shadow_list) { +		shadow = &vmbo->bo;  		/* No need to recover an evicted BO */  		if (shadow->tbo.resource->mem_type != TTM_PL_TT ||  		    shadow->tbo.resource->start == AMDGPU_BO_INVALID_OFFSET || | 
