[PATCH] drm/amdgpu: remove redundant argument for psp_funcs::cmd_submit callback

Quan, Evan Evan.Quan at amd.com
Mon Aug 19 02:31:15 UTC 2019


Reviewed-by: Evan Quan <evan.quan at amd.com>

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Yuan, Xiaojie
> Sent: Friday, August 16, 2019 6:04 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Yuan, Xiaojie <Xiaojie.Yuan at amd.com>
> Subject: [PATCH] drm/amdgpu: remove redundant argument for
> psp_funcs::cmd_submit callback
> 
> Signed-off-by: Xiaojie Yuan <xiaojie.yuan at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +--
> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 5 ++---
> drivers/gpu/drm/amd/amdgpu/psp_v10_0.c  | 1 -
> drivers/gpu/drm/amd/amdgpu/psp_v11_0.c  | 1 -
> drivers/gpu/drm/amd/amdgpu/psp_v12_0.c  | 1 -
>  drivers/gpu/drm/amd/amdgpu/psp_v3_1.c   | 1 -
>  6 files changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> index 7715c0da5229..52dbdb4ebe0c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
> @@ -144,8 +144,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
>  	memcpy(psp->cmd_buf_mem, cmd, sizeof(struct
> psp_gfx_cmd_resp));
> 
>  	index = atomic_inc_return(&psp->fence_value);
> -	ret = psp_cmd_submit(psp, ucode, psp->cmd_buf_mc_addr,
> -			     fence_mc_addr, index);
> +	ret = psp_cmd_submit(psp, psp->cmd_buf_mc_addr,
> fence_mc_addr, index);
>  	if (ret) {
>  		atomic_dec(&psp->fence_value);
>  		mutex_unlock(&psp->mutex);
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> index 0029fa2b2ff9..b73d4aa28fba 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
> @@ -90,7 +90,6 @@ struct psp_funcs
>  	int (*ring_destroy)(struct psp_context *psp,
>  			    enum psp_ring_type ring_type);
>  	int (*cmd_submit)(struct psp_context *psp,
> -			  struct amdgpu_firmware_info *ucode,
>  			  uint64_t cmd_buf_mc_addr, uint64_t
> fence_mc_addr,
>  			  int index);
>  	bool (*compare_sram_data)(struct psp_context *psp, @@ -223,8
> +222,8 @@ struct amdgpu_psp_funcs {  #define psp_ring_create(psp, type)
> (psp)->funcs->ring_create((psp), (type))  #define psp_ring_stop(psp, type)
> (psp)->funcs->ring_stop((psp), (type))  #define psp_ring_destroy(psp, type)
> ((psp)->funcs->ring_destroy((psp), (type))) -#define psp_cmd_submit(psp,
> ucode, cmd_mc, fence_mc, index) \
> -		(psp)->funcs->cmd_submit((psp), (ucode), (cmd_mc),
> (fence_mc), (index))
> +#define psp_cmd_submit(psp, cmd_mc, fence_mc, index) \
> +		(psp)->funcs->cmd_submit((psp), (cmd_mc), (fence_mc),
> (index))
>  #define psp_compare_sram_data(psp, ucode, type) \
>  		(psp)->funcs->compare_sram_data((psp), (ucode), (type))
> #define psp_init_microcode(psp) \ diff --git
> a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
> b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
> index 77c2bc344dfc..e5fff6b30137 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v10_0.c
> @@ -187,7 +187,6 @@ static int psp_v10_0_ring_destroy(struct psp_context
> *psp,  }
> 
>  static int psp_v10_0_cmd_submit(struct psp_context *psp,
> -				struct amdgpu_firmware_info *ucode,
>  				uint64_t cmd_buf_mc_addr, uint64_t
> fence_mc_addr,
>  				int index)
>  {
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> index e3fd91e6a314..7277890838cc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
> @@ -496,7 +496,6 @@ static int psp_v11_0_ring_destroy(struct psp_context
> *psp,  }
> 
>  static int psp_v11_0_cmd_submit(struct psp_context *psp,
> -			       struct amdgpu_firmware_info *ucode,
>  			       uint64_t cmd_buf_mc_addr, uint64_t
> fence_mc_addr,
>  			       int index)
>  {
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> index f37b8af4b986..fd55baa6ea31 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v12_0.c
> @@ -334,7 +334,6 @@ static int psp_v12_0_ring_destroy(struct psp_context
> *psp,  }
> 
>  static int psp_v12_0_cmd_submit(struct psp_context *psp,
> -			       struct amdgpu_firmware_info *ucode,
>  			       uint64_t cmd_buf_mc_addr, uint64_t
> fence_mc_addr,
>  			       int index)
>  {
> diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
> b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
> index ba327581f301..4a02058682f5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
> +++ b/drivers/gpu/drm/amd/amdgpu/psp_v3_1.c
> @@ -409,7 +409,6 @@ static int psp_v3_1_ring_destroy(struct psp_context
> *psp,  }
> 
>  static int psp_v3_1_cmd_submit(struct psp_context *psp,
> -			       struct amdgpu_firmware_info *ucode,
>  			       uint64_t cmd_buf_mc_addr, uint64_t
> fence_mc_addr,
>  			       int index)
>  {
> --
> 2.20.1
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list