diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4700-drm-amd-display-Modify-logic-for-when-to-wait-for-mp.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4700-drm-amd-display-Modify-logic-for-when-to-wait-for-mp.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4700-drm-amd-display-Modify-logic-for-when-to-wait-for-mp.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4700-drm-amd-display-Modify-logic-for-when-to-wait-for-mp.patch new file mode 100644 index 00000000..7e61a4b0 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4700-drm-amd-display-Modify-logic-for-when-to-wait-for-mp.patch @@ -0,0 +1,54 @@ +From 1cfb31a1c8f703da4269ad762e6c42961149f361 Mon Sep 17 00:00:00 2001 +From: Noah Abradjian <noah.abradjian@amd.com> +Date: Wed, 13 Nov 2019 16:56:06 -0500 +Subject: [PATCH 4700/4736] drm/amd/display: Modify logic for when to wait for + mpcc idle + +[Why] +I was advised that we may need to check for mpcc idle in more cases +than just when opp_changed is true. Also, mpcc_inst is equal to +pipe_idx, so remove for loop. + +[How] +Remove opp_changed flag check and mpcc_inst loop. + +Signed-off-by: Noah Abradjian <noah.abradjian@amd.com> +Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> +Acked-by: Leo Li <sunpeng.li@amd.com> +--- + .../gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +index 53b719c75071..036a43717a47 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c +@@ -1353,16 +1353,16 @@ static void dcn20_update_dchubp_dpp( + if (pipe_ctx->update_flags.bits.mpcc + || plane_state->update_flags.bits.global_alpha_change + || plane_state->update_flags.bits.per_pixel_alpha_change) { +- /* Need mpcc to be idle if changing opp */ +- if (pipe_ctx->update_flags.bits.opp_changed) { +- struct pipe_ctx *old_pipe_ctx = &dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx]; +- int mpcc_inst; +- +- for (mpcc_inst = 0; mpcc_inst < MAX_PIPES; mpcc_inst++) { +- if (!old_pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_inst]) +- continue; ++ // MPCC inst is equal to pipe index in practice ++ int mpcc_inst = pipe_ctx->pipe_idx; ++ int opp_inst; ++ int opp_count = dc->res_pool->res_cap->num_opp; ++ ++ for (opp_inst = 0; opp_inst < opp_count; opp_inst++) { ++ if (dc->res_pool->opps[opp_inst]->mpcc_disconnect_pending[mpcc_inst]) { + dc->res_pool->mpc->funcs->wait_for_idle(dc->res_pool->mpc, mpcc_inst); +- old_pipe_ctx->stream_res.opp->mpcc_disconnect_pending[mpcc_inst] = false; ++ dc->res_pool->opps[opp_inst]->mpcc_disconnect_pending[mpcc_inst] = false; ++ break; + } + } + hws->funcs.update_mpcc(dc, pipe_ctx); +-- +2.17.1 + |