Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM

2018-06-04 Thread Michel Dänzer
On 2018-06-04 12:59 PM, Christian König wrote:
> We need to put the lose ends on the invalid list because it is possible
> that we need to split up huge pages for them.
> 
> Signed-off-by: Christian König 

Does this need to go to stable?


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM

2018-06-05 Thread Christian König

Am 04.06.2018 um 13:02 schrieb Michel Dänzer:

On 2018-06-04 12:59 PM, Christian König wrote:

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: Christian König 

Does this need to go to stable?


Yes, good point. Jerry if you haven't already committed your follow up 
patch then please add a "CC: sta...@vger.kernel.org" tag to it.


Thanks,
Christian.
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM

2018-06-05 Thread Zhang, Jerry (Junwei)

On 06/05/2018 04:45 PM, Christian König wrote:

Am 04.06.2018 um 13:02 schrieb Michel Dänzer:

On 2018-06-04 12:59 PM, Christian König wrote:

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: Christian König 

Does this need to go to stable?


Yes, good point. Jerry if you haven't already committed your follow up patch
then please add a "CC: sta...@vger.kernel.org" tag to it.


Sorry, it was landed in drm-next.
How can I save that?

Jerry



Thanks,
Christian.

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


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM

2018-06-05 Thread Christian König

Am 05.06.2018 um 10:47 schrieb Zhang, Jerry (Junwei):

On 06/05/2018 04:45 PM, Christian König wrote:

Am 04.06.2018 um 13:02 schrieb Michel Dänzer:

On 2018-06-04 12:59 PM, Christian König wrote:
We need to put the lose ends on the invalid list because it is 
possible

that we need to split up huge pages for them.

Signed-off-by: Christian König 

Does this need to go to stable?


Yes, good point. Jerry if you haven't already committed your follow 
up patch

then please add a "CC: sta...@vger.kernel.org" tag to it.


Sorry, it was landed in drm-next.
How can I save that?


In this case Alex needs to add it when he prepares the patch for pushing 
it out as fix.


Only alternative is that you revert an repush the patch.

Christian.



Jerry



Thanks,
Christian.


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


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM

2018-06-05 Thread Zhang, Jerry (Junwei)

On 06/05/2018 04:54 PM, Christian König wrote:

Am 05.06.2018 um 10:47 schrieb Zhang, Jerry (Junwei):

On 06/05/2018 04:45 PM, Christian König wrote:

Am 04.06.2018 um 13:02 schrieb Michel Dänzer:

On 2018-06-04 12:59 PM, Christian König wrote:

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: Christian König 

Does this need to go to stable?


Yes, good point. Jerry if you haven't already committed your follow up patch
then please add a "CC: sta...@vger.kernel.org" tag to it.


Sorry, it was landed in drm-next.
How can I save that?


In this case Alex needs to add it when he prepares the patch for pushing it out
as fix.

Only alternative is that you revert an repush the patch.


OK, I prefer to revert and repush, avoiding to increase more todo items for Alex 
going upstream.


Jerry



Christian.



Jerry



Thanks,
Christian.



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


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM (v2)

2018-06-05 Thread Christian König

Am 05.06.2018 um 10:09 schrieb Junwei Zhang:

From: Christian König 

(comments: I cannot receive amdgfx mail recently and reply the mail directly,
so send it out with my update v2, tested with Unigine Heaven, glmark2, gputest,
some cases from vulkan PRT test)

v2: store bo_va as well

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: Christian König 
Signed-off-by: Junwei Zhang 


Good catch that assigning the bo_va is also missing. David can you take 
a look and give a review?


Since I'm a co-author I can't do it myself.

Thanks,
Christian.


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 850cd66..cc9d486 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2172,7 +2172,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device 
*adev,
before->last = saddr - 1;
before->offset = tmp->offset;
before->flags = tmp->flags;
-   list_add(&before->list, &tmp->list);
+   before->bo_va = tmp->bo_va;
+   list_add(&before->list, &tmp->bo_va->invalids);
}
  
  		/* Remember mapping split at the end */

@@ -2182,7 +2183,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device 
*adev,
after->offset = tmp->offset;
after->offset += after->start - tmp->start;
after->flags = tmp->flags;
-   list_add(&after->list, &tmp->list);
+   after->bo_va = tmp->bo_va;
+   list_add(&after->list, &tmp->bo_va->invalids);
}
  
  		list_del(&tmp->list);


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


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM (v2)

2018-06-05 Thread zhoucm1



On 2018年06月05日 16:14, Christian König wrote:

Am 05.06.2018 um 10:09 schrieb Junwei Zhang:

From: Christian König 

(comments: I cannot receive amdgfx mail recently and reply the mail 
directly,
so send it out with my update v2, tested with Unigine Heaven, 
glmark2, gputest,

some cases from vulkan PRT test)

v2: store bo_va as well

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: Christian König 
Signed-off-by: Junwei Zhang 


Good catch that assigning the bo_va is also missing. David can you 
take a look and give a review?

Feel free add my RB on it, it looks very good.

Regards,
David Zhou


Since I'm a co-author I can't do it myself.

Thanks,
Christian.


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)

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

index 850cd66..cc9d486 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2172,7 +2172,8 @@ int amdgpu_vm_bo_clear_mappings(struct 
amdgpu_device *adev,

  before->last = saddr - 1;
  before->offset = tmp->offset;
  before->flags = tmp->flags;
-    list_add(&before->list, &tmp->list);
+    before->bo_va = tmp->bo_va;
+    list_add(&before->list, &tmp->bo_va->invalids);
  }
    /* Remember mapping split at the end */
@@ -2182,7 +2183,8 @@ int amdgpu_vm_bo_clear_mappings(struct 
amdgpu_device *adev,

  after->offset = tmp->offset;
  after->offset += after->start - tmp->start;
  after->flags = tmp->flags;
-    list_add(&after->list, &tmp->list);
+    after->bo_va = tmp->bo_va;
+    list_add(&after->list, &tmp->bo_va->invalids);
  }
    list_del(&tmp->list);




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


Re: [PATCH] drm/amdgpu: fix clear_all and replace handling in the VM (v2)

2018-06-05 Thread Zhang, Jerry (Junwei)

On 06/05/2018 04:20 PM, zhoucm1 wrote:



On 2018年06月05日 16:14, Christian König wrote:

Am 05.06.2018 um 10:09 schrieb Junwei Zhang:

From: Christian König 

(comments: I cannot receive amdgfx mail recently and reply the mail directly,
so send it out with my update v2, tested with Unigine Heaven, glmark2, gputest,
some cases from vulkan PRT test)

v2: store bo_va as well

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: Christian König 
Signed-off-by: Junwei Zhang 


Good catch that assigning the bo_va is also missing. David can you take a look
and give a review?

Feel free add my RB on it, it looks very good.


Thanks you all.
I will apply the patch.

Jerry



Regards,
David Zhou


Since I'm a co-author I can't do it myself.

Thanks,
Christian.


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 --
  1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 850cd66..cc9d486 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2172,7 +2172,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device
*adev,
  before->last = saddr - 1;
  before->offset = tmp->offset;
  before->flags = tmp->flags;
-list_add(&before->list, &tmp->list);
+before->bo_va = tmp->bo_va;
+list_add(&before->list, &tmp->bo_va->invalids);
  }
/* Remember mapping split at the end */
@@ -2182,7 +2183,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device
*adev,
  after->offset = tmp->offset;
  after->offset += after->start - tmp->start;
  after->flags = tmp->flags;
-list_add(&after->list, &tmp->list);
+after->bo_va = tmp->bo_va;
+list_add(&after->list, &tmp->bo_va->invalids);
  }
list_del(&tmp->list);





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