Skip to contentSkip to conversation

drm/amd/display: make enc32_stream_encoder_dvi_set_stream_attribute static

PATCH Applied Jiapeng Chong 2 participants 6 messages Sep 13, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 drm/amd/display: make enc32_stream_encoder_dvi_set_stream_attribute static

This symbol is not used outside of dcn32_dio_stream_encoder.c, so marks it static.

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_dio_stream_encoder.c:63:6: warning: no previous prototype for ‘enc32_stream_encoder_dvi_set_stream_attribute’.

---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_stream_encoder.c +1 -1
index 38a48983f663..0e9dce414641 100644
@@ -60,7 +60,7 @@ static void enc32_dp_set_odm_combine(
 }
 
 /* setup stream encoder in dvi mode */
-void enc32_stream_encoder_dvi_set_stream_attribute(
+static void enc32_stream_encoder_dvi_set_stream_attribute(
 	struct stream_encoder *enc,
 	struct dc_crtc_timing *crtc_timing,
 	bool is_dual_link)
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

PATCH 2/5 drm/amd/display: make dscl32_calc_lb_num_partitions static

This symbol is not used outside of dcn32_dpp.c, so marks it static.

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_dpp.c:34:6: warning: no previous prototype for ‘dscl32_calc_lb_num_partitions’.

---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dpp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dpp.c +1 -1
index f349cbe2a0f0..dcf12a0b031c 100644
@@ -31,7 +31,7 @@
 #include "dcn30/dcn30_cm_common.h"
 
 /* Compute the maximum number of lines that we can fit in the line buffer */
-void dscl32_calc_lb_num_partitions(
+static void dscl32_calc_lb_num_partitions(
 		const struct scaler_data *scl_data,
 		enum lb_memory_config lb_config,
 		int *num_part_y,
Signature · 1 line
2.20.1.7.g153144c
#2 lore raw

PATCH 3/5 drm/amd/display: make dcn32_link_encoder_is_in_alt_mode and dcn32_link_encoder_get_max_link_cap static

In reply to Jiapeng Chong

These two functions are not used outside the function dcn32_dio_link_encoder.c, so the modification is defined as static.

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_dio_link_encoder.c:121:6: warning: no previous prototype for ‘dcn32_link_encoder_is_in_alt_mode’. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_dio_link_encoder.c:136:6: warning: no previous prototype for ‘dcn32_link_encoder_get_max_link_cap’.

---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_dio_link_encoder.c +2 -2
index d6855d4f749b..fdae6aa89908 100644
@@ -118,7 +118,7 @@ void dcn32_link_encoder_enable_dp_output(
 	}
 }
 
-bool dcn32_link_encoder_is_in_alt_mode(struct link_encoder *enc)
+static bool dcn32_link_encoder_is_in_alt_mode(struct link_encoder *enc)
 {
 	struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
 	uint32_t dp_alt_mode_disable = 0;
@@ -133,7 +133,7 @@ bool dcn32_link_encoder_is_in_alt_mode(struct link_encoder *enc)
 	return is_usb_c_alt_mode;
 }
 
-void dcn32_link_encoder_get_max_link_cap(struct link_encoder *enc,
+static void dcn32_link_encoder_get_max_link_cap(struct link_encoder *enc,
 	struct dc_link_settings *link_settings)
 {
 	struct dcn10_link_encoder *enc10 = TO_DCN10_LINK_ENC(enc);
Signature · 1 line
2.20.1.7.g153144c
#3 lore raw

PATCH 4/5 drm/amd/display: make mpc32_program_shaper and mpc32_program_3dlut static

In reply to Jiapeng Chong

These two functions are not used outside the function dcn32_mpc.c, so the modification is defined as static.

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:704:6: warning: no previous prototype for ‘mpc32_program_shaper’. drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_mpc.c:900:6: warning: no previous prototype for ‘mpc32_program_3dlut’.

---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_mpc.c +2 -2
index 357bd2461bc9..f4bc77972c4e 100644
@@ -701,7 +701,7 @@ static void mpc32_power_on_shaper_3dlut(
 }
 
 
-bool mpc32_program_shaper(
+static bool mpc32_program_shaper(
 		struct mpc *mpc,
 		const struct pwl_params *params,
 		uint32_t mpcc_id)
@@ -897,7 +897,7 @@ static void mpc32_set_3dlut_mode(
 }
 
 
-bool mpc32_program_3dlut(
+static bool mpc32_program_3dlut(
 		struct mpc *mpc,
 		const struct tetrahedral_params *params,
 		int mpcc_id)
Signature · 1 line
2.20.1.7.g153144c
#4 lore raw

PATCH 5/5 drm/amd/display: Remove the unused function copy_stream_update_to_stream()

In reply to Jiapeng Chong

The function copy_stream_update_to_stream() is defined in the notif.c file, but not called elsewhere, so delete this unused function.

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2852:6: warning: no previous prototype for ‘dc_reset_state’.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -10
index 9860bf38c547..2ee0b5a2ce62 100644
@@ -2849,16 +2849,6 @@ static void copy_stream_update_to_stream(struct dc *dc,
 	}
 }
 
-void dc_reset_state(struct dc *dc, struct dc_state *context)
-{
-	dc_resource_state_destruct(context);
-
-	/* clear the structure, but don't reset the reference count */
-	memset(context, 0, offsetof(struct dc_state, refcount));
-
-	init_state(dc, context);
-}
-
 static bool update_planes_and_stream_state(struct dc *dc,
 		struct dc_surface_update *srf_updates, int surface_count,
 		struct dc_stream_state *stream,
Signature · 1 line
2.20.1.7.g153144c
Applied
#5 lore raw

Re: [PATCH 5/5] drm/amd/display: Remove the unused function copy_stream_update_to_stream()

Applied the series. Thanks!

Alex

Quoted 37 lines · Jiapeng Chong

The function copy_stream_update_to_stream() is defined in the notif.c file, but not called elsewhere, so delete this unused function.

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:2852:6: warning: no previous prototype for ‘dc_reset_state’.

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -11
index 9860bf38c547..2ee0b5a2ce62 100644
@@ -2849,16 +2849,6 @@ static void copy_stream_update_to_stream(struct dc *dc,
        }
 }
 
-void dc_reset_state(struct dc *dc, struct dc_state *context)
-{
-       dc_resource_state_destruct(context);
-
-       /* clear the structure, but don't reset the reference count */
-       memset(context, 0, offsetof(struct dc_state, refcount));
-
-       init_state(dc, context);
-}
-
 static bool update_planes_and_stream_state(struct dc *dc,
                struct dc_surface_update *srf_updates, int surface_count,
                struct dc_stream_state *stream,
--

2.20.1.7.g153144c