]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Fix compiler warnings in dml2
authorGaghik Khachatrian <gaghik.khachatrian@amd.com>
Sun, 26 Apr 2026 20:22:34 +0000 (16:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 11 May 2026 20:10:26 +0000 (16:10 -0400)
commit12b3bda41a9aa240b164e6cc882df49dce187ec9
tree196f0ac14b4348a532e50ca832f834c58ecb855e
parent55a79e4889bd62a7138d7bc3b9d70e1cfda2574b
drm/amd/display: Fix compiler warnings in dml2

[Why & How]
In dml2_translation_helper.c, rename the inner loop index inside
dml2_init_soc_states() for several project cases
to avoid shadowing the outer function-scope index variable.

In display_mode_core.c, replace shift-based power-of-two expressions
used to compute dpte_row_height and dpte_row_height_linear with an
equivalent floating-point power function, consistent with existing
usage elsewhere in the file.

Behavior for valid inputs is preserved in both cases.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Gaghik Khachatrian <gaghik.khachatrian@amd.com>
Signed-off-by: James Lin <pinglei.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2_0/display_mode_core.c