diff options
author | Wyatt Wood <wyatt.wood@amd.com> | 2021-05-06 16:11:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-06-08 12:18:37 -0400 |
commit | 60df84418c0a9dc1a40c1de8bb1be3676ee96f14 (patch) | |
tree | f68e12c4b4fb2ac13525a279c0cbfaf742f21504 /drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | |
parent | 2259918e087d9967e6c8f9b621d67d5968019724 (diff) | |
download | linux-60df84418c0a9dc1a40c1de8bb1be3676ee96f14.tar.bz2 |
drm/amd/display: Refactor visual confirm
[Why + How]
Visual confirm has no asic-specific logic,
so we can refactor and unify these functions
that are currently spread out across multiple
dcn files.
Add a new hw sequencer interface update_visual_confirm_color,
and a new mpc function pointer set_bg_color.
This will allow visual confirm to updated independently
of MPCC blending updates.
v2: squash in DCN3.1 fixes
Signed-off-by: Wyatt Wood <wyatt.wood@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Stylon Wang <stylon.wang@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c index b096011acb49..11019c2c62cc 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c +++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_mpc.c @@ -45,6 +45,8 @@ void mpc1_set_bg_color(struct mpc *mpc, struct mpcc *bottommost_mpcc = mpc1_get_mpcc(mpc, mpcc_id); uint32_t bg_r_cr, bg_g_y, bg_b_cb; + bottommost_mpcc->blnd_cfg.black_color = *bg_color; + /* find bottommost mpcc. */ while (bottommost_mpcc->mpcc_bot) { bottommost_mpcc = bottommost_mpcc->mpcc_bot; @@ -81,7 +83,6 @@ static void mpc1_update_blending( MPCC_GLOBAL_ALPHA, blnd_cfg->global_alpha, MPCC_GLOBAL_GAIN, blnd_cfg->global_gain); - mpc1_set_bg_color(mpc, &blnd_cfg->black_color, mpcc_id); mpcc->blnd_cfg = *blnd_cfg; } @@ -495,6 +496,7 @@ static const struct mpc_funcs dcn10_mpc_funcs = { .set_output_csc = NULL, .set_output_gamma = NULL, .get_mpc_out_mux = mpc1_get_mpc_out_mux, + .set_bg_color = mpc1_set_bg_color, }; void dcn10_mpc_construct(struct dcn10_mpc *mpc10, |