All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/display: clean up dcn2*_pp_smu functions
@ 2019-10-10 15:10 Alex Deucher
       [not found] ` <20191010151041.32711-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Deucher @ 2019-10-10 15:10 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher, bhawanpreet.lakha-5C7GfCeVMHo

Use the dcn21 functions in dcn21_resource.c and make the
dcn20 functions static since they are only used in
dcn20_resource now.

Cc: bhawanpreet.lakha@amd.com
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 6 ++++--
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 3 ---
 drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 4 +++-
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
index 7ace3b261d87..914e378bcda4 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
@@ -1156,6 +1156,8 @@ static const struct resource_create_funcs res_create_maximus_funcs = {
 	.create_hwseq = dcn20_hwseq_create,
 };
 
+static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
+
 void dcn20_clock_source_destroy(struct clock_source **clk_src)
 {
 	kfree(TO_DCE110_CLK_SRC(*clk_src));
@@ -2928,7 +2930,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
 	return true;
 }
 
-struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
+static struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
 {
 	struct pp_smu_funcs *pp_smu = kzalloc(sizeof(*pp_smu), GFP_KERNEL);
 
@@ -2943,7 +2945,7 @@ struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
 	return pp_smu;
 }
 
-void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu)
+static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu)
 {
 	if (pp_smu && *pp_smu) {
 		kfree(*pp_smu);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
index 44f95aa0d61e..55006462f481 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
@@ -95,9 +95,6 @@ struct display_stream_compressor *dcn20_dsc_create(
 	struct dc_context *ctx, uint32_t inst);
 void dcn20_dsc_destroy(struct display_stream_compressor **dsc);
 
-struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx);
-void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
-
 struct hubp *dcn20_hubp_create(
 	struct dc_context *ctx,
 	uint32_t inst);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
index d2fc61490052..f0c95d82feb2 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
@@ -636,6 +636,8 @@ static const struct dcn10_stream_encoder_mask se_mask = {
 		SE_COMMON_MASK_SH_LIST_DCN20(_MASK)
 };
 
+static void dcn21_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
+
 static struct input_pixel_processor *dcn21_ipp_create(
 	struct dc_context *ctx, uint32_t inst)
 {
@@ -939,7 +941,7 @@ static void destruct(struct dcn21_resource_pool *pool)
 		dcn_dccg_destroy(&pool->base.dccg);
 
 	if (pool->base.pp_smu != NULL)
-		dcn20_pp_smu_destroy(&pool->base.pp_smu);
+		dcn21_pp_smu_destroy(&pool->base.pp_smu);
 }
 
 
-- 
2.20.1

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

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

* Re: [PATCH] drm/amdgpu/display: clean up dcn2*_pp_smu functions
       [not found] ` <20191010151041.32711-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2019-10-11 14:33   ` Harry Wentland
  0 siblings, 0 replies; 2+ messages in thread
From: Harry Wentland @ 2019-10-11 14:33 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Deucher, Alexander, Lakha, Bhawanpreet

On 2019-10-10 11:10 a.m., Alex Deucher wrote:
> Use the dcn21 functions in dcn21_resource.c and make the
> dcn20 functions static since they are only used in
> dcn20_resource now.
> 
> Cc: bhawanpreet.lakha@amd.com
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

Harry

> ---
>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 6 ++++--
>  drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h | 3 ---
>  drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 4 +++-
>  3 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index 7ace3b261d87..914e378bcda4 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -1156,6 +1156,8 @@ static const struct resource_create_funcs res_create_maximus_funcs = {
>  	.create_hwseq = dcn20_hwseq_create,
>  };
>  
> +static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
> +
>  void dcn20_clock_source_destroy(struct clock_source **clk_src)
>  {
>  	kfree(TO_DCE110_CLK_SRC(*clk_src));
> @@ -2928,7 +2930,7 @@ bool dcn20_mmhubbub_create(struct dc_context *ctx, struct resource_pool *pool)
>  	return true;
>  }
>  
> -struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
> +static struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
>  {
>  	struct pp_smu_funcs *pp_smu = kzalloc(sizeof(*pp_smu), GFP_KERNEL);
>  
> @@ -2943,7 +2945,7 @@ struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx)
>  	return pp_smu;
>  }
>  
> -void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu)
> +static void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu)
>  {
>  	if (pp_smu && *pp_smu) {
>  		kfree(*pp_smu);
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> index 44f95aa0d61e..55006462f481 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.h
> @@ -95,9 +95,6 @@ struct display_stream_compressor *dcn20_dsc_create(
>  	struct dc_context *ctx, uint32_t inst);
>  void dcn20_dsc_destroy(struct display_stream_compressor **dsc);
>  
> -struct pp_smu_funcs *dcn20_pp_smu_create(struct dc_context *ctx);
> -void dcn20_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
> -
>  struct hubp *dcn20_hubp_create(
>  	struct dc_context *ctx,
>  	uint32_t inst);
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> index d2fc61490052..f0c95d82feb2 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
> @@ -636,6 +636,8 @@ static const struct dcn10_stream_encoder_mask se_mask = {
>  		SE_COMMON_MASK_SH_LIST_DCN20(_MASK)
>  };
>  
> +static void dcn21_pp_smu_destroy(struct pp_smu_funcs **pp_smu);
> +
>  static struct input_pixel_processor *dcn21_ipp_create(
>  	struct dc_context *ctx, uint32_t inst)
>  {
> @@ -939,7 +941,7 @@ static void destruct(struct dcn21_resource_pool *pool)
>  		dcn_dccg_destroy(&pool->base.dccg);
>  
>  	if (pool->base.pp_smu != NULL)
> -		dcn20_pp_smu_destroy(&pool->base.pp_smu);
> +		dcn21_pp_smu_destroy(&pool->base.pp_smu);
>  }
>  
>  
> 
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2019-10-11 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-10 15:10 [PATCH] drm/amdgpu/display: clean up dcn2*_pp_smu functions Alex Deucher
     [not found] ` <20191010151041.32711-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-10-11 14:33   ` Harry Wentland

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.