All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly
@ 2017-03-16  3:44 Junwei Zhang
       [not found] ` <1489635888-31293-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Junwei Zhang @ 2017-03-16  3:44 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Junwei Zhang

Currently it may miss one page before or after the target mapping

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 ++++++++------------------
 1 file changed, 8 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index f7c02a9..511c6c9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1767,7 +1767,11 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
 			before->it.last = saddr - 1;
 			before->offset = tmp->offset;
 			before->flags = tmp->flags;
+
 			list_add(&before->list, &tmp->list);
+			interval_tree_insert(&before->it, &vm->va);
+			if (before->flags & AMDGPU_PTE_PRT)
+				amdgpu_vm_prt_get(adev);
 		}
 
 		/* Remember mapping split at the end */
@@ -1777,7 +1781,11 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
 			after->offset = tmp->offset;
 			after->offset += after->it.start - tmp->it.start;
 			after->flags = tmp->flags;
+
 			list_add(&after->list, &tmp->list);
+			interval_tree_insert(&after->it, &vm->va);
+			if (after->flags & AMDGPU_PTE_PRT)
+				amdgpu_vm_prt_get(adev);
 		}
 
 		list_del(&tmp->list);
@@ -1799,24 +1807,6 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
 		trace_amdgpu_vm_bo_unmap(NULL, tmp);
 	}
 
-	/* Insert partial mapping before the range*/
-	if (before->it.start != before->it.last) {
-		interval_tree_insert(&before->it, &vm->va);
-		if (before->flags & AMDGPU_PTE_PRT)
-			amdgpu_vm_prt_get(adev);
-	} else {
-		kfree(before);
-	}
-
-	/* Insert partial mapping after the range */
-	if (after->it.start != after->it.last) {
-		interval_tree_insert(&after->it, &vm->va);
-		if (after->flags & AMDGPU_PTE_PRT)
-			amdgpu_vm_prt_get(adev);
-	} else {
-		kfree(after);
-	}
-
 	return 0;
 }
 
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] drm/amdgpu: fix bo_va tracing for bo unmap
       [not found] ` <1489635888-31293-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
@ 2017-03-16  3:44   ` Junwei Zhang
  2017-03-16  7:32   ` [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly Christian König
  1 sibling, 0 replies; 6+ messages in thread
From: Junwei Zhang @ 2017-03-16  3:44 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Junwei Zhang

Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
index d5a00f7..c3182e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h
@@ -245,7 +245,7 @@
 			     ),
 
 	    TP_fast_assign(
-			   __entry->bo = bo_va->bo;
+			   __entry->bo = bo_va ? bo_va->bo : NULL;
 			   __entry->start = mapping->it.start;
 			   __entry->last = mapping->it.last;
 			   __entry->offset = mapping->offset;
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly
       [not found] ` <1489635888-31293-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
  2017-03-16  3:44   ` [PATCH 2/2] drm/amdgpu: fix bo_va tracing for bo unmap Junwei Zhang
@ 2017-03-16  7:32   ` Christian König
       [not found]     ` <e1b3592f-839e-691d-bc59-af2fb2efe5a8-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Christian König @ 2017-03-16  7:32 UTC (permalink / raw)
  To: Junwei Zhang, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 16.03.2017 um 04:44 schrieb Junwei Zhang:
> Currently it may miss one page before or after the target mapping

I don't think that this will work correctly. The interval tree still 
contains the old mapping at this point and as far as I know inserting 
overlapping mappings is not allowed here.

But what do you mean with miss one page before or after the target mapping?

Christian.

>
> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 ++++++++------------------
>   1 file changed, 8 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index f7c02a9..511c6c9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1767,7 +1767,11 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
>   			before->it.last = saddr - 1;
>   			before->offset = tmp->offset;
>   			before->flags = tmp->flags;
> +
>   			list_add(&before->list, &tmp->list);
> +			interval_tree_insert(&before->it, &vm->va);
> +			if (before->flags & AMDGPU_PTE_PRT)
> +				amdgpu_vm_prt_get(adev);
>   		}
>   
>   		/* Remember mapping split at the end */
> @@ -1777,7 +1781,11 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
>   			after->offset = tmp->offset;
>   			after->offset += after->it.start - tmp->it.start;
>   			after->flags = tmp->flags;
> +
>   			list_add(&after->list, &tmp->list);
> +			interval_tree_insert(&after->it, &vm->va);
> +			if (after->flags & AMDGPU_PTE_PRT)
> +				amdgpu_vm_prt_get(adev);
>   		}
>   
>   		list_del(&tmp->list);
> @@ -1799,24 +1807,6 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
>   		trace_amdgpu_vm_bo_unmap(NULL, tmp);
>   	}
>   
> -	/* Insert partial mapping before the range*/
> -	if (before->it.start != before->it.last) {
> -		interval_tree_insert(&before->it, &vm->va);
> -		if (before->flags & AMDGPU_PTE_PRT)
> -			amdgpu_vm_prt_get(adev);
> -	} else {
> -		kfree(before);
> -	}
> -
> -	/* Insert partial mapping after the range */
> -	if (after->it.start != after->it.last) {
> -		interval_tree_insert(&after->it, &vm->va);
> -		if (after->flags & AMDGPU_PTE_PRT)
> -			amdgpu_vm_prt_get(adev);
> -	} else {
> -		kfree(after);
> -	}
> -
>   	return 0;
>   }
>   


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly
       [not found]     ` <e1b3592f-839e-691d-bc59-af2fb2efe5a8-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-03-16  7:46       ` Zhang, Jerry
       [not found]         ` <DM5PR12MB1818975FC463941DFBB30ACDFF260-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Jerry @ 2017-03-16  7:46 UTC (permalink / raw)
  To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: Christian König [mailto:deathsimple@vodafone.de]
> Sent: Thursday, March 16, 2017 15:33
> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after
> directly
> 
> Am 16.03.2017 um 04:44 schrieb Junwei Zhang:
> > Currently it may miss one page before or after the target mapping
> 
> I don't think that this will work correctly. The interval tree still contains the old
> mapping at this point and as far as I know inserting overlapping mappings is not
> allowed here.

Ah, I missed that, so this insert op should be after free up.
I will revise the patch

> 
> But what do you mean with miss one page before or after the target mapping?

I did a unit test to verify it and found that:

If the before mapping is 1 page size, so its start and last will be same.
Thus below condition will become false then to free the before mapping.
   > if (before->it.start != before->it.last)
But in this case, we need the before mapping of 1 page size.
So does after mapping.

e.g.
Initialize a mapping: [0, 8] pages size.
A replace mapping: [1, 2] page size.
Before mapping is [0, 1], before.it.start = 0, before.it = 1 - 1 = 0.

Additionally, if we create a bo as 1 page size, the corresponding mapping also has start==last, I think.

Jerry.

> 
> Christian.
> 
> >
> > Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 ++++++++------------------
> >   1 file changed, 8 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > index f7c02a9..511c6c9 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> > @@ -1767,7 +1767,11 @@ int amdgpu_vm_bo_clear_mappings(struct
> amdgpu_device *adev,
> >   			before->it.last = saddr - 1;
> >   			before->offset = tmp->offset;
> >   			before->flags = tmp->flags;
> > +
> >   			list_add(&before->list, &tmp->list);
> > +			interval_tree_insert(&before->it, &vm->va);
> > +			if (before->flags & AMDGPU_PTE_PRT)
> > +				amdgpu_vm_prt_get(adev);
> >   		}
> >
> >   		/* Remember mapping split at the end */ @@ -1777,7 +1781,11
> @@ int
> > amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
> >   			after->offset = tmp->offset;
> >   			after->offset += after->it.start - tmp->it.start;
> >   			after->flags = tmp->flags;
> > +
> >   			list_add(&after->list, &tmp->list);
> > +			interval_tree_insert(&after->it, &vm->va);
> > +			if (after->flags & AMDGPU_PTE_PRT)
> > +				amdgpu_vm_prt_get(adev);
> >   		}
> >
> >   		list_del(&tmp->list);
> > @@ -1799,24 +1807,6 @@ int amdgpu_vm_bo_clear_mappings(struct
> amdgpu_device *adev,
> >   		trace_amdgpu_vm_bo_unmap(NULL, tmp);
> >   	}
> >
> > -	/* Insert partial mapping before the range*/
> > -	if (before->it.start != before->it.last) {
> > -		interval_tree_insert(&before->it, &vm->va);
> > -		if (before->flags & AMDGPU_PTE_PRT)
> > -			amdgpu_vm_prt_get(adev);
> > -	} else {
> > -		kfree(before);
> > -	}
> > -
> > -	/* Insert partial mapping after the range */
> > -	if (after->it.start != after->it.last) {
> > -		interval_tree_insert(&after->it, &vm->va);
> > -		if (after->flags & AMDGPU_PTE_PRT)
> > -			amdgpu_vm_prt_get(adev);
> > -	} else {
> > -		kfree(after);
> > -	}
> > -
> >   	return 0;
> >   }
> >
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly
       [not found]         ` <DM5PR12MB1818975FC463941DFBB30ACDFF260-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2017-03-16  7:59           ` Christian König
       [not found]             ` <3846992f-589e-079c-c8e8-65bbd9a54805-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Christian König @ 2017-03-16  7:59 UTC (permalink / raw)
  To: Zhang, Jerry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 16.03.2017 um 08:46 schrieb Zhang, Jerry:
>> -----Original Message-----
>> From: Christian König [mailto:deathsimple@vodafone.de]
>> Sent: Thursday, March 16, 2017 15:33
>> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after
>> directly
>>
>> Am 16.03.2017 um 04:44 schrieb Junwei Zhang:
>>> Currently it may miss one page before or after the target mapping
>> I don't think that this will work correctly. The interval tree still contains the old
>> mapping at this point and as far as I know inserting overlapping mappings is not
>> allowed here.
> Ah, I missed that, so this insert op should be after free up.
> I will revise the patch
>
>> But what do you mean with miss one page before or after the target mapping?
> I did a unit test to verify it and found that:
>
> If the before mapping is 1 page size, so its start and last will be same.
> Thus below condition will become false then to free the before mapping.
>     > if (before->it.start != before->it.last)
> But in this case, we need the before mapping of 1 page size.
> So does after mapping.
>
> e.g.
> Initialize a mapping: [0, 8] pages size.
> A replace mapping: [1, 2] page size.
> Before mapping is [0, 1], before.it.start = 0, before.it = 1 - 1 = 0.
>
> Additionally, if we create a bo as 1 page size, the corresponding mapping also has start==last, I think.

Ups, that's indeed not correct.

Yeah we need a better criteria if we should insert the ranges or not.

Christian.

>
> Jerry.
>
>> Christian.
>>
>>> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 ++++++++------------------
>>>    1 file changed, 8 insertions(+), 18 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> index f7c02a9..511c6c9 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> @@ -1767,7 +1767,11 @@ int amdgpu_vm_bo_clear_mappings(struct
>> amdgpu_device *adev,
>>>    			before->it.last = saddr - 1;
>>>    			before->offset = tmp->offset;
>>>    			before->flags = tmp->flags;
>>> +
>>>    			list_add(&before->list, &tmp->list);
>>> +			interval_tree_insert(&before->it, &vm->va);
>>> +			if (before->flags & AMDGPU_PTE_PRT)
>>> +				amdgpu_vm_prt_get(adev);
>>>    		}
>>>
>>>    		/* Remember mapping split at the end */ @@ -1777,7 +1781,11
>> @@ int
>>> amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
>>>    			after->offset = tmp->offset;
>>>    			after->offset += after->it.start - tmp->it.start;
>>>    			after->flags = tmp->flags;
>>> +
>>>    			list_add(&after->list, &tmp->list);
>>> +			interval_tree_insert(&after->it, &vm->va);
>>> +			if (after->flags & AMDGPU_PTE_PRT)
>>> +				amdgpu_vm_prt_get(adev);
>>>    		}
>>>
>>>    		list_del(&tmp->list);
>>> @@ -1799,24 +1807,6 @@ int amdgpu_vm_bo_clear_mappings(struct
>> amdgpu_device *adev,
>>>    		trace_amdgpu_vm_bo_unmap(NULL, tmp);
>>>    	}
>>>
>>> -	/* Insert partial mapping before the range*/
>>> -	if (before->it.start != before->it.last) {
>>> -		interval_tree_insert(&before->it, &vm->va);
>>> -		if (before->flags & AMDGPU_PTE_PRT)
>>> -			amdgpu_vm_prt_get(adev);
>>> -	} else {
>>> -		kfree(before);
>>> -	}
>>> -
>>> -	/* Insert partial mapping after the range */
>>> -	if (after->it.start != after->it.last) {
>>> -		interval_tree_insert(&after->it, &vm->va);
>>> -		if (after->flags & AMDGPU_PTE_PRT)
>>> -			amdgpu_vm_prt_get(adev);
>>> -	} else {
>>> -		kfree(after);
>>> -	}
>>> -
>>>    	return 0;
>>>    }
>>>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly
       [not found]             ` <3846992f-589e-079c-c8e8-65bbd9a54805-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-03-16  8:20               ` Zhang, Jerry
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Jerry @ 2017-03-16  8:20 UTC (permalink / raw)
  To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

> -----Original Message-----
> From: Christian König [mailto:deathsimple@vodafone.de]
> Sent: Thursday, March 16, 2017 15:59
> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 1/2] drm/amdgpu: insert partial mappings before and after
> directly
> 
> Am 16.03.2017 um 08:46 schrieb Zhang, Jerry:
> >> -----Original Message-----
> >> From: Christian König [mailto:deathsimple@vodafone.de]
> >> Sent: Thursday, March 16, 2017 15:33
> >> To: Zhang, Jerry; amd-gfx@lists.freedesktop.org
> >> Subject: Re: [PATCH 1/2] drm/amdgpu: insert partial mappings before
> >> and after directly
> >>
> >> Am 16.03.2017 um 04:44 schrieb Junwei Zhang:
> >>> Currently it may miss one page before or after the target mapping
> >> I don't think that this will work correctly. The interval tree still
> >> contains the old mapping at this point and as far as I know inserting
> >> overlapping mappings is not allowed here.
> > Ah, I missed that, so this insert op should be after free up.
> > I will revise the patch
> >
> >> But what do you mean with miss one page before or after the target mapping?
> > I did a unit test to verify it and found that:
> >
> > If the before mapping is 1 page size, so its start and last will be same.
> > Thus below condition will become false then to free the before mapping.
> >     > if (before->it.start != before->it.last) But in this case, we
> > need the before mapping of 1 page size.
> > So does after mapping.
> >
> > e.g.
> > Initialize a mapping: [0, 8] pages size.
> > A replace mapping: [1, 2] page size.
> > Before mapping is [0, 1], before.it.start = 0, before.it = 1 - 1 = 0.
> >
> > Additionally, if we create a bo as 1 page size, the corresponding mapping also
> has start==last, I think.
> 
> Ups, that's indeed not correct.
> 
> Yeah we need a better criteria if we should insert the ranges or not.

How about check the init before->list and after->list, then check if the list is not empty?
Otherwise, it may add a bool flag for each of them, I don't like that.

I have sent the patch as v2.
Please check it.
Thanks.

Jerry

> 
> Christian.
> 
> >
> > Jerry.
> >
> >> Christian.
> >>
> >>> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
> >>> ---
> >>>    drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 26 ++++++++----------------
> --
> >>>    1 file changed, 8 insertions(+), 18 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> >>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> >>> index f7c02a9..511c6c9 100644
> >>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> >>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> >>> @@ -1767,7 +1767,11 @@ int amdgpu_vm_bo_clear_mappings(struct
> >> amdgpu_device *adev,
> >>>    			before->it.last = saddr - 1;
> >>>    			before->offset = tmp->offset;
> >>>    			before->flags = tmp->flags;
> >>> +
> >>>    			list_add(&before->list, &tmp->list);
> >>> +			interval_tree_insert(&before->it, &vm->va);
> >>> +			if (before->flags & AMDGPU_PTE_PRT)
> >>> +				amdgpu_vm_prt_get(adev);
> >>>    		}
> >>>
> >>>    		/* Remember mapping split at the end */ @@ -1777,7 +1781,11
> >> @@ int
> >>> amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
> >>>    			after->offset = tmp->offset;
> >>>    			after->offset += after->it.start - tmp->it.start;
> >>>    			after->flags = tmp->flags;
> >>> +
> >>>    			list_add(&after->list, &tmp->list);
> >>> +			interval_tree_insert(&after->it, &vm->va);
> >>> +			if (after->flags & AMDGPU_PTE_PRT)
> >>> +				amdgpu_vm_prt_get(adev);
> >>>    		}
> >>>
> >>>    		list_del(&tmp->list);
> >>> @@ -1799,24 +1807,6 @@ int amdgpu_vm_bo_clear_mappings(struct
> >> amdgpu_device *adev,
> >>>    		trace_amdgpu_vm_bo_unmap(NULL, tmp);
> >>>    	}
> >>>
> >>> -	/* Insert partial mapping before the range*/
> >>> -	if (before->it.start != before->it.last) {
> >>> -		interval_tree_insert(&before->it, &vm->va);
> >>> -		if (before->flags & AMDGPU_PTE_PRT)
> >>> -			amdgpu_vm_prt_get(adev);
> >>> -	} else {
> >>> -		kfree(before);
> >>> -	}
> >>> -
> >>> -	/* Insert partial mapping after the range */
> >>> -	if (after->it.start != after->it.last) {
> >>> -		interval_tree_insert(&after->it, &vm->va);
> >>> -		if (after->flags & AMDGPU_PTE_PRT)
> >>> -			amdgpu_vm_prt_get(adev);
> >>> -	} else {
> >>> -		kfree(after);
> >>> -	}
> >>> -
> >>>    	return 0;
> >>>    }
> >>>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-16  8:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-16  3:44 [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly Junwei Zhang
     [not found] ` <1489635888-31293-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-03-16  3:44   ` [PATCH 2/2] drm/amdgpu: fix bo_va tracing for bo unmap Junwei Zhang
2017-03-16  7:32   ` [PATCH 1/2] drm/amdgpu: insert partial mappings before and after directly Christian König
     [not found]     ` <e1b3592f-839e-691d-bc59-af2fb2efe5a8-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-16  7:46       ` Zhang, Jerry
     [not found]         ` <DM5PR12MB1818975FC463941DFBB30ACDFF260-2J9CzHegvk+QhrfEZJlvtAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-16  7:59           ` Christian König
     [not found]             ` <3846992f-589e-079c-c8e8-65bbd9a54805-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-03-16  8:20               ` Zhang, Jerry

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.