drm/amd/display: Fix overlapping copy within dml_core_mode_programming
authorHersen Wu <hersenxs.wu@amd.com>
Tue, 23 Apr 2024 14:57:37 +0000 (10:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Apr 2024 21:22:44 +0000 (17:22 -0400)
commitf1fd8a0a54e6d23a6d16ee29159f247862460fd1
tree0d206f2dc12cbab3e10c26d49016887e59902ef9
parent1357b2165d9ad94faa4c4a20d5e2ce29c2ff29c3
drm/amd/display: Fix overlapping copy within dml_core_mode_programming

[WHY]
&mode_lib->mp.Watermark and &locals->Watermark are
the same address. memcpy may lead to unexpected behavior.

[HOW]
memmove should be used.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml2/display_mode_core.c