SWDEV-196010 Calltrace caught in amdgpu_vm_sdma.c file

Submitted by Liu, Monk on July 16, 2019, 3:08 a.m.

Details

Message ID 1563246526-22988-1-git-send-email-Monk.Liu@amd.com
State New
Headers show
Series "SWDEV-196010 Calltrace caught in amdgpu_vm_sdma.c file" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Liu, Monk July 16, 2019, 3:08 a.m.
don't commit sdma vm job if no updates needed and free
the ib

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

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 aeba9e6..ff6d37e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1304,9 +1304,15 @@  int amdgpu_vm_update_directories(struct amdgpu_device *adev,
 			goto error;
 	}
 
-	r = vm->update_funcs->commit(&params, &vm->last_update);
-	if (r)
-		goto error;
+
+	if (params.ib->length_dw > 0) {
+		r = vm->update_funcs->commit(&params, &vm->last_update);
+		if (r)
+			goto error;
+	} else {
+		amdgpu_sa_bo_free(adev, &params.ib->sa_bo, NULL);
+	}
+
 	return 0;
 
 error:

Comments

Am 16.07.19 um 05:08 schrieb Monk Liu:
> don't commit sdma vm job if no updates needed and free
> the ib

NAK, when the IB is empty then that is a severe bug and we need to find 
the root cause.

How did you trigger this?

Christian.

>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 +++++++++---
>   1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index aeba9e6..ff6d37e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1304,9 +1304,15 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
>   			goto error;
>   	}
>   
> -	r = vm->update_funcs->commit(&params, &vm->last_update);
> -	if (r)
> -		goto error;
> +
> +	if (params.ib->length_dw > 0) {
> +		r = vm->update_funcs->commit(&params, &vm->last_update);
> +		if (r)
> +			goto error;
> +	} else {
> +		amdgpu_sa_bo_free(adev, &params.ib->sa_bo, NULL);
> +	}
> +
>   	return 0;
>   
>   error: