drm/amd/display: Refactor reg_set and reg_update.
authorYongqiang Sun <yongqiang.sun@amd.com>
Wed, 13 Feb 2019 15:35:43 +0000 (10:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:49 +0000 (15:36 -0500)
commit148cccf267531ca5165ae3a637e48948e6c26697
tree880c04308d8f2ce9d033a64b5d44a0a7849340de
parent929c3aaa26ef69abdb5e5ec7af5eacd6f6687836
drm/amd/display: Refactor reg_set and reg_update.

[Why]
Current reg update and reg set use same functions and
only delta is update reads reg value and call update function.

[How]
Refactor reg update and reg set functions.
1.Implement different functions for reg update and reg set.
2.Wrap same process to a help function, both reg update and
reg set will call it.

Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_helper.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
drivers/gpu/drm/amd/display/dc/dm_services.h
drivers/gpu/drm/amd/display/dc/inc/reg_helper.h