drm/amd/display: clean up reversed type specifiers in dml2_core
PATCH 1/1 drm/amd/display: clean up reversed type specifiers in dml2_core
Replace non-standard reversed type specifiers with canonical C ordering:
- 'int unsigned' -> 'unsigned int'
- 'long int unsigned' cast -> 'unsigned long'
Affected sites:
- dml2_core_utils.c: function return type, parameter type, local variable, and two viewport height casts
- dml2_core_utils.h: matching declarations for the above functions
- dml2_core_dcn4.c: two viewport height casts and one local variable
No functional change.
Signed-off-by Adriano Vero <[email protected]>
--- .../dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c | 6 +++--- .../dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c | 12 +++++++----- .../dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h | 6 ++++-- 3 files changed, 14 insertions(+), 10 deletions(-)
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +3 -3
@@ -287,10 +287,10 @@ static void create_phantom_plane_from_main_plane(struct dml2_plane_parameters *p phantom->stream_index = phantom_stream_index; phantom->overrides.refresh_from_mall = dml2_refresh_from_mall_mode_override_force_disable; phantom->overrides.legacy_svp_config = dml2_svp_mode_override_phantom_pipe_no_data_return; - phantom->composition.viewport.plane0.height = (long int unsigned )math_min2 (math_ceil2 ( + phantom->composition.viewport.plane0.height = (unsigned long )math_min2 (math_ceil2 ( (double )main->composition.scaler_info.plane0.v_ratio * (double )phantom_stream->timing.v_active,16.0 ), (double )main->composition.viewport.plane0.height); - phantom->composition.viewport.plane1.height = (long int unsigned )math_min2 (math_ceil2 ( + phantom->composition.viewport.plane1.height = (unsigned long )math_min2 (math_ceil2 ( (double )main->composition.scaler_info.plane1.v_ratio * (double )phantom_stream->timing.v_active,16.0 ), (double )main->composition.viewport.plane1.height); phantom->immediate_flip = false;
@@ -527,7 +527,7 @@ bool core_dcn4_mode_support(struct dml2_core_mode_support_in_out *in_out)bool result;unsigned int i, stream_index, stream_bitmask; -int unsigned odm_count, num_odm_output_segments, dpp_count; +unsigned int odm_count, num_odm_output_segments, dpp_count;expand_implict_subvp (in_out->display_cfg, &l->svp_expanded_display_cfg, &core->scratch);
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c +7 -5
@@ -384,7 +384,9 @@ unsigned int dml2_core_utils_round_to_multiple(unsigned int num, unsigned int mureturn (num - remainder); } -unsigned int dml2_core_util_get_num_active_pipes (int unsigned num_planes,const struct core_display_cfg_support_info *cfg_support_info) +unsigned int +dml2_core_util_get_num_active_pipes (unsigned int num_planes, +const struct core_display_cfg_support_info *cfg_support_info) {unsigned int num_active_pipes =0 ;
@@ -480,9 +482,9 @@ bool dml2_core_utils_is_vertical_rotation(enum dml2_rotation_angle Scan)return is_vert; } -int unsigned dml2_core_utils_get_gfx_version (enum dml2_swizzle_mode sw_mode) +unsigned int dml2_core_utils_get_gfx_version (enum dml2_swizzle_mode sw_mode) { -int unsigned version =0 ; +unsigned int version =0 ; if (sw_mode == dml2_sw_linear || sw_mode == dml2_sw_256b_2d ||
@@ -594,10 +596,10 @@ static void create_phantom_plane_from_main_plane(struct dml2_plane_parameters *p phantom->stream_index = phantom_stream_index; phantom->overrides.refresh_from_mall = dml2_refresh_from_mall_mode_override_force_disable; phantom->overrides.legacy_svp_config = dml2_svp_mode_override_phantom_pipe_no_data_return; - phantom->composition.viewport.plane0.height = (long int unsigned )math_min2 (math_ceil2 ( + phantom->composition.viewport.plane0.height = (unsigned long )math_min2 (math_ceil2 ( (double )main->composition.scaler_info.plane0.v_ratio * (double )phantom_stream->timing.v_active,16.0 ), (double )main->composition.viewport.plane0.height); - phantom->composition.viewport.plane1.height = (long int unsigned )math_min2 (math_ceil2 ( + phantom->composition.viewport.plane1.height = (unsigned long )math_min2 (math_ceil2 ( (double )main->composition.scaler_info.plane1.v_ratio * (double )phantom_stream->timing.v_active,16.0 ), (double )main->composition.viewport.plane1.height); phantom->immediate_flip = false;
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h +4 -2
@@ -17,14 +17,16 @@ void dml2_core_utils_print_mode_support_info(const struct dml2_core_internal_modconst char *dml2_core_utils_internal_soc_state_type_str (enum dml2_core_internal_soc_state_type dml2_core_internal_soc_state_type);void dml2_core_utils_get_stream_output_bpp (double *out_bpp,const struct dml2_display_cfg *display_cfg);unsigned int dml2_core_utils_round_to_multiple (unsigned int num,unsigned int multiple,bool up); -unsigned int dml2_core_util_get_num_active_pipes (int unsigned num_planes,const struct core_display_cfg_support_info *cfg_support_info); +unsigned int +dml2_core_util_get_num_active_pipes (unsigned int num_planes, +const struct core_display_cfg_support_info *cfg_support_info);void dml2_core_utils_pipe_plane_mapping (const struct core_display_cfg_support_info *cfg_support_info,unsigned int *pipe_plane);bool dml2_core_utils_is_phantom_pipe (const struct dml2_plane_parameters *plane_cfg);unsigned int dml2_core_utils_get_tile_block_size_bytes (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel);bool dml2_core_utils_get_segment_horizontal_contiguous (enum dml2_swizzle_mode sw_mode,unsigned int byte_per_pixel);bool dml2_core_utils_is_vertical_rotation (enum dml2_rotation_angle Scan);bool dml2_core_utils_is_linear (enum dml2_swizzle_mode sw_mode); -int unsigned dml2_core_utils_get_gfx_version (enum dml2_swizzle_mode sw_mode); +unsigned int dml2_core_utils_get_gfx_version (enum dml2_swizzle_mode sw_mode);unsigned int dml2_core_utils_get_qos_param_index (unsigned long uclk_freq_khz,const struct dml2_dcn4_uclk_dpm_dependent_qos_params *per_uclk_dpm_params);unsigned int dml2_core_utils_get_active_min_uclk_dpm_index (unsigned long uclk_freq_khz,const struct dml2_soc_state_table *clk_table);bool dml2_core_utils_is_dual_plane (enum dml2_source_format_class source_format);
Signature · 1 line
2.53.0