From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BC3636EAB9 for ; Wed, 29 Apr 2026 21:04:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777496654; cv=none; b=Q0pnI9Izd+k0r+QMxYD2jfOxN9eMbIH/sZEiBTRNJLTs8M+3daYXUEhdF9kMjV+UGfLG+3cXC9RIgDiYmOfC2hFk50izE7lZJxXeREDJSj/Sq9+U+grwiWh4PqUuF6YCAFuuH7SXpOp2tcjmFKi3TsJ9RTQTz1h0tl0FnZDihBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777496654; c=relaxed/simple; bh=1JgnTo9DQfF61cyb4RwG0VCrtnkTDkFCfnrlA1O6hcc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Gm+bV+jNMiSleXZVMHpPXRm68/NDphTxMXSliC7G4ckpAqR+2U4QDfLfXyoEuZ3wWTxkx8fYLNGrkRMyHjuxcF+9Wl7+kNQ5LOuNdjpJ4FBMmwttsqB4cGbjLkfIY4um3/1dvrhkQwq/BgRQPwHi28bruqDh/YxjfY0bIrb50ow= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eS+0NAEZ; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eS+0NAEZ" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-488ba840146so1477425e9.1 for ; Wed, 29 Apr 2026 14:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777496651; x=1778101451; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=87wY3atp/xRru7rN04VKTsllcBHojWcPtTLSUldgpCk=; b=eS+0NAEZ4atqBdcB0YdKG/ldYd3vDYKgLAe2VjNUics5wBRut/L43p36ENgOIe7KmC kVnBTkagH2qpz+OJ9OnkTvMk9PasmMoap1RCw/olqIEeM7W660XRTqcZZIt0f5CtTJSk 26Md7eu0nsAoI6wdD72BK3KCnL1DyqhG1+bjNql+0mZOO7m2usCe9Q+o5l9Je1MuSJAs ju7Nk/gBtwwo4gxJ9iQgwxXJrFWEeMnkLN86kQpvQAd2VcFowwf1i8bTryNsNYl81EoJ r46Q3nheh9IatxGfC8WU097YCbk9L035nR+CSgvhm0mquDVLzTtMA+lEkY4J2pU6sLv6 5JUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777496651; x=1778101451; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=87wY3atp/xRru7rN04VKTsllcBHojWcPtTLSUldgpCk=; b=l0Rp90bYrs+eQXriPd+z7lUaQkpPiPCA023/LwXiaPXJWdLqWzSKWr6LeJEIhcVBPg KN/aG0VWi0oIL0izhc1V+4bqCooFLn/HsHrZCXX79XXQB4RBMeq4daSeiKs6k5/aBOPk 8Sf12GrT4YnuCnCuydj69/K0cTrAMTmEL7FKzB5WS6YSKMTL7dq3qe+ROaNVoUBIiPZw EJWU2Mm1Lwf+dlaALSiLu25VK7KzEuOXi+asH50BGPGc2IuldSjeOEpPZK/q326XW0Uv X4drx5XmeDlIYwatnoOLjs+itG3TpItfIk04sXtC/EdylQJzbdvOUlzKBANuBrkXu98m DCvA== X-Forwarded-Encrypted: i=1; AFNElJ+QOSEAIIz7/dclCJuD2C7yWniVMpDxGxkxkLOth1of/iOf1nYdRPWdenPyGV4BwPXMdXK5lyvAf5ijfbk=@vger.kernel.org X-Gm-Message-State: AOJu0YxBBY7e+Uo7lBqJKurm+BqUyRu+wc7XCN6dmt4hIC3u76clLR2o CkX0ORn9GIDWQeWe+wjvSNM0plt9LV0UMu/wdXc4M08Gkkk5Y/O2aALB X-Gm-Gg: AeBDies5FAYKmHcKED1aKa8YDkY0Mhel8MguBsv+GHv0By52lZvmAJMvFwIm1tPiKKc 2uF62irsPRWPb1DuPDEVhgeonFiPxXp611Hf49E6RQXy7pbNOwJzppuimQED1fYLJ/WgGHJ4VtC hYxDpF8Leg5SvKW05qDB6yIQIBxU2Qxt2vUZoqJrqK/bSA6HNRKiUhogQRJn0O02WfLtEYwIAZG J+K52n2H86HfN88I3hxcqqbjhxhLDVGQ2/HuKWc1M5SAxxtptS15QPX/yzrhzMvmO7/MrMFy+jI xEOYp5wmWHH5+C2DhL7E1zCWFtY+giWvtevNWZ9OHK8yX8H3GeyrhJwyp/5Jl0TCHoAIKVFInCK ixCeFa+og4gKLEgUu53NAXnnqB5ZGk4IBw7t4lqOjLkv/CpDkmdsUSe9BgcJyiF/v+GoinLyST/ bEPJjGf9UFcqOv+XCZ7dNCmnPpMgY2vSnmhRVgFw8ujZtGOGctaHBrfNOyS0XuU25+SKx2EaYrj eJVQQh1nj5SW1Nzvxov3rwY9T55+lg7d9bCk7YmLL7qGw== X-Received: by 2002:a05:600c:5254:b0:486:fbdb:b718 with SMTP id 5b1f17b1804b1-48a8445f451mr3880135e9.25.1777496650606; Wed, 29 Apr 2026 14:04:10 -0700 (PDT) Received: from fedora.homenet.telecomitalia.it (host-79-27-7-133.retail.telecomitalia.it. [79.27.7.133]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a7b91b2bdsm29382575e9.7.2026.04.29.14.04.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 14:04:10 -0700 (PDT) From: Adriano Vero To: austin.zheng@amd.com, jun.lei@amd.com, harry.wentland@amd.com, sunpeng.li@amd.com Cc: siqueira@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com, airlied@gmail.com, simona@ffwll.ch, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Adriano Vero Subject: [PATCH] drm/amd/display: clean up reversed type specifiers in dml2_core Date: Wed, 29 Apr 2026 23:02:09 +0200 Message-ID: <20260429210209.42737-1-adri.vero.dev@gmail.com> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- .../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(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c index 858e7bbc511f..ad03e66f963d 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_dcn4.c @@ -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); diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c index 4f5533dc0430..77044c77fa44 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.c @@ -384,7 +384,9 @@ unsigned int dml2_core_utils_round_to_multiple(unsigned int num, unsigned int mu return (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; diff --git a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h index 60fa2abfef85..2a2177ad7cd9 100644 --- a/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h +++ b/drivers/gpu/drm/amd/display/dc/dml2_0/dml21/src/dml2_core/dml2_core_utils.h @@ -17,14 +17,16 @@ void dml2_core_utils_print_mode_support_info(const struct dml2_core_internal_mod const 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); -- 2.53.0