All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function
@ 2022-03-17 11:21 Guchun Chen
  2022-03-17 12:14 ` Christian König
  0 siblings, 1 reply; 5+ messages in thread
From: Guchun Chen @ 2022-03-17 11:21 UTC (permalink / raw)
  To: amd-gfx, hawking.zhang, christian.koenig, xinhui.pan, alexander.deucher
  Cc: Guchun Chen

To pair with amdgpu_gmc_pdb0_alloc as a more generic handling
in amdgpu_gmc.c, no functional change.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 +
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
index 7021e8f390bd..36f6b321438f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
@@ -136,6 +136,12 @@ uint64_t amdgpu_gmc_pd_addr(struct amdgpu_bo *bo)
 	return pd_addr;
 }
 
+/* amdgpu_gmc_pdb0_free - free pdb0 vram */
+void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev)
+{
+	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
+}
+
 /**
  * amdgpu_gmc_set_pte_pde - update the page tables using CPU
  *
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
index 032b0313f277..6f425e3a9b6e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
@@ -299,6 +299,7 @@ static inline uint64_t amdgpu_gmc_sign_extend(uint64_t addr)
 }
 
 int amdgpu_gmc_pdb0_alloc(struct amdgpu_device *adev);
+void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev);
 void amdgpu_gmc_get_pde_for_bo(struct amdgpu_bo *bo, int level,
 			       uint64_t *addr, uint64_t *flags);
 int amdgpu_gmc_set_pte_pde(struct amdgpu_device *adev, void *cpu_pt_addr,
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 08ceabd6c853..ad600f72a51c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1721,7 +1721,7 @@ static int gmc_v9_0_sw_fini(void *handle)
 	amdgpu_gem_force_release(adev);
 	amdgpu_vm_manager_fini(adev);
 	amdgpu_gart_table_vram_free(adev);
-	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
+	amdgpu_gmc_pdb0_free(adev);
 	amdgpu_bo_fini(adev);
 
 	return 0;
-- 
2.17.1


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

* Re: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function
  2022-03-17 11:21 [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function Guchun Chen
@ 2022-03-17 12:14 ` Christian König
  2022-03-17 12:50   ` Chen, Guchun
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2022-03-17 12:14 UTC (permalink / raw)
  To: Guchun Chen, amd-gfx, hawking.zhang, christian.koenig,
	xinhui.pan, alexander.deucher

Am 17.03.22 um 12:21 schrieb Guchun Chen:
> To pair with amdgpu_gmc_pdb0_alloc as a more generic handling
> in amdgpu_gmc.c, no functional change.
>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 +
>   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 2 +-
>   3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 7021e8f390bd..36f6b321438f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -136,6 +136,12 @@ uint64_t amdgpu_gmc_pd_addr(struct amdgpu_bo *bo)
>   	return pd_addr;
>   }
>   
> +/* amdgpu_gmc_pdb0_free - free pdb0 vram */
> +void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev)
> +{
> +	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
> +}
> +

Single line function usually doesn't look that useful to me.

Why is that any improvement?

Regards,
Christian.

>   /**
>    * amdgpu_gmc_set_pte_pde - update the page tables using CPU
>    *
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
> index 032b0313f277..6f425e3a9b6e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
> @@ -299,6 +299,7 @@ static inline uint64_t amdgpu_gmc_sign_extend(uint64_t addr)
>   }
>   
>   int amdgpu_gmc_pdb0_alloc(struct amdgpu_device *adev);
> +void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev);
>   void amdgpu_gmc_get_pde_for_bo(struct amdgpu_bo *bo, int level,
>   			       uint64_t *addr, uint64_t *flags);
>   int amdgpu_gmc_set_pte_pde(struct amdgpu_device *adev, void *cpu_pt_addr,
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 08ceabd6c853..ad600f72a51c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -1721,7 +1721,7 @@ static int gmc_v9_0_sw_fini(void *handle)
>   	amdgpu_gem_force_release(adev);
>   	amdgpu_vm_manager_fini(adev);
>   	amdgpu_gart_table_vram_free(adev);
> -	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
> +	amdgpu_gmc_pdb0_free(adev);
>   	amdgpu_bo_fini(adev);
>   
>   	return 0;


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

* RE: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function
  2022-03-17 12:14 ` Christian König
@ 2022-03-17 12:50   ` Chen, Guchun
  2022-03-17 12:55     ` Christian König
  0 siblings, 1 reply; 5+ messages in thread
From: Chen, Guchun @ 2022-03-17 12:50 UTC (permalink / raw)
  To: Christian König, amd-gfx, Zhang, Hawking, Koenig, Christian,
	Pan, Xinhui, Deucher, Alexander

Hi Christian,

My intention is to use a paired generic gmc alloc/free function to proceed PDB bo. Current code is gmc v9 code calls amdgpu_gmc_pdb0_alloc to allocate PDB bo buffer, and release the bo directly in gmc_v9_0_sw_fini. I guess PDB bo is not a gmc v9 specific buffer, so it's better to use a release function from amdgpu_gem.c in fini. This may benefit the case that users do the same in GMC newer IP code.

Regards,
Guchun

-----Original Message-----
From: Christian König <ckoenig.leichtzumerken@gmail.com> 
Sent: Thursday, March 17, 2022 8:14 PM
To: Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function

Am 17.03.22 um 12:21 schrieb Guchun Chen:
> To pair with amdgpu_gmc_pdb0_alloc as a more generic handling in 
> amdgpu_gmc.c, no functional change.
>
> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++++++
>   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 +
>   drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 2 +-
>   3 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> index 7021e8f390bd..36f6b321438f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
> @@ -136,6 +136,12 @@ uint64_t amdgpu_gmc_pd_addr(struct amdgpu_bo *bo)
>   	return pd_addr;
>   }
>   
> +/* amdgpu_gmc_pdb0_free - free pdb0 vram */ void 
> +amdgpu_gmc_pdb0_free(struct amdgpu_device *adev) {
> +	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, 
> +&adev->gmc.ptr_pdb0); }
> +

Single line function usually doesn't look that useful to me.

Why is that any improvement?

Regards,
Christian.

>   /**
>    * amdgpu_gmc_set_pte_pde - update the page tables using CPU
>    *
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
> index 032b0313f277..6f425e3a9b6e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
> @@ -299,6 +299,7 @@ static inline uint64_t amdgpu_gmc_sign_extend(uint64_t addr)
>   }
>   
>   int amdgpu_gmc_pdb0_alloc(struct amdgpu_device *adev);
> +void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev);
>   void amdgpu_gmc_get_pde_for_bo(struct amdgpu_bo *bo, int level,
>   			       uint64_t *addr, uint64_t *flags);
>   int amdgpu_gmc_set_pte_pde(struct amdgpu_device *adev, void *cpu_pt_addr,
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 08ceabd6c853..ad600f72a51c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -1721,7 +1721,7 @@ static int gmc_v9_0_sw_fini(void *handle)
>   	amdgpu_gem_force_release(adev);
>   	amdgpu_vm_manager_fini(adev);
>   	amdgpu_gart_table_vram_free(adev);
> -	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
> +	amdgpu_gmc_pdb0_free(adev);
>   	amdgpu_bo_fini(adev);
>   
>   	return 0;


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

* Re: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function
  2022-03-17 12:50   ` Chen, Guchun
@ 2022-03-17 12:55     ` Christian König
  2022-03-17 13:22       ` Chen, Guchun
  0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2022-03-17 12:55 UTC (permalink / raw)
  To: Chen, Guchun, Christian König, amd-gfx, Zhang, Hawking, Pan,
	Xinhui, Deucher, Alexander

Mhm, actually that is indeed purely gmc 9 specific.

This is a workaround for a very specific hardware bug issue which will 
hopefully never happen again :)

We just implemented it in the common handler to be able to test it with 
gmc 8 before gmc 9 came out of production.

Do we have a generic amdgpu_gmc_sw_finit()? If yes I would put it there 
instead, if no we might want to create one.

Regards,
Christian.

Am 17.03.22 um 13:50 schrieb Chen, Guchun:
> Hi Christian,
>
> My intention is to use a paired generic gmc alloc/free function to proceed PDB bo. Current code is gmc v9 code calls amdgpu_gmc_pdb0_alloc to allocate PDB bo buffer, and release the bo directly in gmc_v9_0_sw_fini. I guess PDB bo is not a gmc v9 specific buffer, so it's better to use a release function from amdgpu_gem.c in fini. This may benefit the case that users do the same in GMC newer IP code.
>
> Regards,
> Guchun
>
> -----Original Message-----
> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> Sent: Thursday, March 17, 2022 8:14 PM
> To: Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function
>
> Am 17.03.22 um 12:21 schrieb Guchun Chen:
>> To pair with amdgpu_gmc_pdb0_alloc as a more generic handling in
>> amdgpu_gmc.c, no functional change.
>>
>> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++++++
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 +
>>    drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 2 +-
>>    3 files changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> index 7021e8f390bd..36f6b321438f 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> @@ -136,6 +136,12 @@ uint64_t amdgpu_gmc_pd_addr(struct amdgpu_bo *bo)
>>    	return pd_addr;
>>    }
>>    
>> +/* amdgpu_gmc_pdb0_free - free pdb0 vram */ void
>> +amdgpu_gmc_pdb0_free(struct amdgpu_device *adev) {
>> +	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL,
>> +&adev->gmc.ptr_pdb0); }
>> +
> Single line function usually doesn't look that useful to me.
>
> Why is that any improvement?
>
> Regards,
> Christian.
>
>>    /**
>>     * amdgpu_gmc_set_pte_pde - update the page tables using CPU
>>     *
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>> index 032b0313f277..6f425e3a9b6e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>> @@ -299,6 +299,7 @@ static inline uint64_t amdgpu_gmc_sign_extend(uint64_t addr)
>>    }
>>    
>>    int amdgpu_gmc_pdb0_alloc(struct amdgpu_device *adev);
>> +void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev);
>>    void amdgpu_gmc_get_pde_for_bo(struct amdgpu_bo *bo, int level,
>>    			       uint64_t *addr, uint64_t *flags);
>>    int amdgpu_gmc_set_pte_pde(struct amdgpu_device *adev, void *cpu_pt_addr,
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index 08ceabd6c853..ad600f72a51c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -1721,7 +1721,7 @@ static int gmc_v9_0_sw_fini(void *handle)
>>    	amdgpu_gem_force_release(adev);
>>    	amdgpu_vm_manager_fini(adev);
>>    	amdgpu_gart_table_vram_free(adev);
>> -	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
>> +	amdgpu_gmc_pdb0_free(adev);
>>    	amdgpu_bo_fini(adev);
>>    
>>    	return 0;


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

* RE: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function
  2022-03-17 12:55     ` Christian König
@ 2022-03-17 13:22       ` Chen, Guchun
  0 siblings, 0 replies; 5+ messages in thread
From: Chen, Guchun @ 2022-03-17 13:22 UTC (permalink / raw)
  To: Koenig, Christian, Christian König, amd-gfx, Zhang, Hawking,
	Pan, Xinhui, Deucher, Alexander

Thanks for the info, Christian, and I will abandon this patch. We don’t have a generic amdgpu_gmc_sw_fini.

Regards,
Guchun

-----Original Message-----
From: Koenig, Christian <Christian.Koenig@amd.com> 
Sent: Thursday, March 17, 2022 8:55 PM
To: Chen, Guchun <Guchun.Chen@amd.com>; Christian König <ckoenig.leichtzumerken@gmail.com>; amd-gfx@lists.freedesktop.org; Zhang, Hawking <Hawking.Zhang@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function

Mhm, actually that is indeed purely gmc 9 specific.

This is a workaround for a very specific hardware bug issue which will hopefully never happen again :)

We just implemented it in the common handler to be able to test it with gmc 8 before gmc 9 came out of production.

Do we have a generic amdgpu_gmc_sw_finit()? If yes I would put it there instead, if no we might want to create one.

Regards,
Christian.

Am 17.03.22 um 13:50 schrieb Chen, Guchun:
> Hi Christian,
>
> My intention is to use a paired generic gmc alloc/free function to proceed PDB bo. Current code is gmc v9 code calls amdgpu_gmc_pdb0_alloc to allocate PDB bo buffer, and release the bo directly in gmc_v9_0_sw_fini. I guess PDB bo is not a gmc v9 specific buffer, so it's better to use a release function from amdgpu_gem.c in fini. This may benefit the case that users do the same in GMC newer IP code.
>
> Regards,
> Guchun
>
> -----Original Message-----
> From: Christian König <ckoenig.leichtzumerken@gmail.com>
> Sent: Thursday, March 17, 2022 8:14 PM
> To: Chen, Guchun <Guchun.Chen@amd.com>; amd-gfx@lists.freedesktop.org; 
> Zhang, Hawking <Hawking.Zhang@amd.com>; Koenig, Christian 
> <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Deucher, 
> Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH] drm/amdgpu: move PDB bo release into a generic 
> gmc function
>
> Am 17.03.22 um 12:21 schrieb Guchun Chen:
>> To pair with amdgpu_gmc_pdb0_alloc as a more generic handling in 
>> amdgpu_gmc.c, no functional change.
>>
>> Signed-off-by: Guchun Chen <guchun.chen@amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 6 ++++++
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 1 +
>>    drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c   | 2 +-
>>    3 files changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> index 7021e8f390bd..36f6b321438f 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
>> @@ -136,6 +136,12 @@ uint64_t amdgpu_gmc_pd_addr(struct amdgpu_bo *bo)
>>    	return pd_addr;
>>    }
>>    
>> +/* amdgpu_gmc_pdb0_free - free pdb0 vram */ void 
>> +amdgpu_gmc_pdb0_free(struct amdgpu_device *adev) {
>> +	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, 
>> +&adev->gmc.ptr_pdb0); }
>> +
> Single line function usually doesn't look that useful to me.
>
> Why is that any improvement?
>
> Regards,
> Christian.
>
>>    /**
>>     * amdgpu_gmc_set_pte_pde - update the page tables using CPU
>>     *
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>> index 032b0313f277..6f425e3a9b6e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>> @@ -299,6 +299,7 @@ static inline uint64_t amdgpu_gmc_sign_extend(uint64_t addr)
>>    }
>>    
>>    int amdgpu_gmc_pdb0_alloc(struct amdgpu_device *adev);
>> +void amdgpu_gmc_pdb0_free(struct amdgpu_device *adev);
>>    void amdgpu_gmc_get_pde_for_bo(struct amdgpu_bo *bo, int level,
>>    			       uint64_t *addr, uint64_t *flags);
>>    int amdgpu_gmc_set_pte_pde(struct amdgpu_device *adev, void 
>> *cpu_pt_addr, diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c 
>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> index 08ceabd6c853..ad600f72a51c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
>> @@ -1721,7 +1721,7 @@ static int gmc_v9_0_sw_fini(void *handle)
>>    	amdgpu_gem_force_release(adev);
>>    	amdgpu_vm_manager_fini(adev);
>>    	amdgpu_gart_table_vram_free(adev);
>> -	amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
>> +	amdgpu_gmc_pdb0_free(adev);
>>    	amdgpu_bo_fini(adev);
>>    
>>    	return 0;


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

end of thread, other threads:[~2022-03-17 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 11:21 [PATCH] drm/amdgpu: move PDB bo release into a generic gmc function Guchun Chen
2022-03-17 12:14 ` Christian König
2022-03-17 12:50   ` Chen, Guchun
2022-03-17 12:55     ` Christian König
2022-03-17 13:22       ` Chen, Guchun

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.