Re: [PATCH] drm/amdgpu: fix VM clearing for the root PD

2018-08-20 Thread Zhang, Jerry (Junwei)

On 08/17/2018 08:24 PM, Christian König wrote:

We need to figure out the address after validating the BO, not before.

Signed-off-by: Christian König 

Reviewed-by: Junwei Zhang 


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 662e8a34d52c..662aec5c81d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
uint64_t addr;
int r;

-   addr = amdgpu_bo_gpu_offset(bo);
entries = amdgpu_bo_size(bo) / 8;

if (pte_support_ats) {
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
if (r)
goto error;

+   addr = amdgpu_bo_gpu_offset(bo);
if (ats_entries) {
uint64_t ats_value;



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


Re: [PATCH] drm/amdgpu: fix VM clearing for the root PD

2018-08-20 Thread Zhang, Jerry (Junwei)

On 08/17/2018 08:24 PM, Christian König wrote:

We need to figure out the address after validating the BO, not before.

Signed-off-by: Christian König 

Reviewed-by: Junwei Zhang 


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 662e8a34d52c..662aec5c81d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
uint64_t addr;
int r;

-   addr = amdgpu_bo_gpu_offset(bo);
entries = amdgpu_bo_size(bo) / 8;

if (pte_support_ats) {
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
if (r)
goto error;

+   addr = amdgpu_bo_gpu_offset(bo);
if (ats_entries) {
uint64_t ats_value;



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


Re: [PATCH] drm/amdgpu: fix VM clearing for the root PD

2018-08-20 Thread Huang Rui
On Fri, Aug 17, 2018 at 02:24:22PM +0200, Christian König wrote:
> We need to figure out the address after validating the BO, not before.
> 
> Signed-off-by: Christian König 

Reviewed-by: Huang Rui 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 662e8a34d52c..662aec5c81d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
>   uint64_t addr;
>   int r;
>  
> - addr = amdgpu_bo_gpu_offset(bo);
>   entries = amdgpu_bo_size(bo) / 8;
>  
>   if (pte_support_ats) {
> @@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
>   if (r)
>   goto error;
>  
> + addr = amdgpu_bo_gpu_offset(bo);
>   if (ats_entries) {
>   uint64_t ats_value;
>  
> -- 
> 2.17.1
> 
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH] drm/amdgpu: fix VM clearing for the root PD

2018-08-20 Thread Zhang, Jerry
> From: amd-gfx  On Behalf Of Christian
> K?nig
> Sent: Friday, August 17, 2018 20:24
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu: fix VM clearing for the root PD
> 
> We need to figure out the address after validating the BO, not before.
> 
> Signed-off-by: Christian König 
Reviewed-by: Junwei Zhang 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 662e8a34d52c..662aec5c81d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device
> *adev,
>   uint64_t addr;
>   int r;
> 
> - addr = amdgpu_bo_gpu_offset(bo);
>   entries = amdgpu_bo_size(bo) / 8;
> 
>   if (pte_support_ats) {
> @@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device
> *adev,
>   if (r)
>   goto error;
> 
> + addr = amdgpu_bo_gpu_offset(bo);
>   if (ats_entries) {
>   uint64_t ats_value;
> 
> --
> 2.17.1
> 
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH] drm/amdgpu: fix VM clearing for the root PD

2018-08-20 Thread Zhang, Jerry (Junwei)

On 08/17/2018 08:24 PM, Christian König wrote:

We need to figure out the address after validating the BO, not before.

Signed-off-by: Christian König 

Reviewed-by: Junwei Zhang 


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 662e8a34d52c..662aec5c81d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
uint64_t addr;
int r;

-   addr = amdgpu_bo_gpu_offset(bo);
entries = amdgpu_bo_size(bo) / 8;

if (pte_support_ats) {
@@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
if (r)
goto error;

+   addr = amdgpu_bo_gpu_offset(bo);
if (ats_entries) {
uint64_t ats_value;



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


Re: [PATCH] drm/amdgpu: fix VM clearing for the root PD

2018-08-17 Thread Felix Kuehling
On 2018-08-17 08:24 AM, Christian König wrote:
> We need to figure out the address after validating the BO, not before.
>
> Signed-off-by: Christian König 
Reviewed-by: Felix Kuehling 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 662e8a34d52c..662aec5c81d4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -369,7 +369,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
>   uint64_t addr;
>   int r;
>  
> - addr = amdgpu_bo_gpu_offset(bo);
>   entries = amdgpu_bo_size(bo) / 8;
>  
>   if (pte_support_ats) {
> @@ -401,6 +400,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
>   if (r)
>   goto error;
>  
> + addr = amdgpu_bo_gpu_offset(bo);
>   if (ats_entries) {
>   uint64_t ats_value;
>  

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