[3/7] drm/amdgpu: remove VM shadow WARN_ONs

Submitted by Christian König on July 12, 2017, 8:31 a.m.

Details

Message ID 1499848308-1441-3-git-send-email-deathsimple@vodafone.de
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Christian König July 12, 2017, 8:31 a.m.
From: Christian König <christian.koenig@amd.com>

Printing a warning into the logs that we will certainly run into a BUG() is
completely nonsense, the BUG() is more than noisy enough.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 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 ba3bfc3..db2dede 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1043,8 +1043,7 @@  static int amdgpu_vm_update_level(struct amdgpu_device *adev,
 	params.adev = adev;
 	shadow = parent->bo->shadow;
 
-	WARN_ON(vm->use_cpu_for_update && shadow);
-	if (vm->use_cpu_for_update && !shadow) {
+	if (vm->use_cpu_for_update) {
 		r = amdgpu_bo_kmap(parent->bo, (void **)&pd_addr);
 		if (r)
 			return r;
@@ -1310,9 +1309,6 @@  static int amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params,
 			r = amdgpu_bo_kmap(pt, (void *)&pe_start);
 			if (r)
 				return r;
-
-			WARN_ONCE(pt->shadow,
-				  "CPU VM update doesn't suuport shadow pages");
 		} else {
 			if (pt->shadow) {
 				pe_start = amdgpu_bo_gpu_offset(pt->shadow);

Comments

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


On 17-07-12 04:31 AM, Christian König wrote:
> From: Christian König <christian.koenig@amd.com>
>
> Printing a warning into the logs that we will certainly run into a BUG() is
> completely nonsense, the BUG() is more than noisy enough.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index ba3bfc3..db2dede 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1043,8 +1043,7 @@ static int amdgpu_vm_update_level(struct amdgpu_device *adev,
>  	params.adev = adev;
>  	shadow = parent->bo->shadow;
>  
> -	WARN_ON(vm->use_cpu_for_update && shadow);
> -	if (vm->use_cpu_for_update && !shadow) {
> +	if (vm->use_cpu_for_update) {
>  		r = amdgpu_bo_kmap(parent->bo, (void **)&pd_addr);
>  		if (r)
>  			return r;
> @@ -1310,9 +1309,6 @@ static int amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params,
>  			r = amdgpu_bo_kmap(pt, (void *)&pe_start);
>  			if (r)
>  				return r;
> -
> -			WARN_ONCE(pt->shadow,
> -				  "CPU VM update doesn't suuport shadow pages");
>  		} else {
>  			if (pt->shadow) {
>  				pe_start = amdgpu_bo_gpu_offset(pt->shadow);