lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.7 127/274] drm/amd/display: Do not disable pipe split if mode is not supported
    Date
    From: Sung Lee <sung.lee@amd.com>

    [ Upstream commit 1dfedb39d38f813357885e19badd1971c17f79a7 ]

    [WHY]
    If mode is not supported, pipe split should not be disabled.
    This may cause more modes to fail.

    [HOW]
    Check for mode support before disabling pipe split.

    This commit was previously reverted as it was thought to
    have problems, but those issues have been resolved.

    Signed-off-by: Sung Lee <sung.lee@amd.com>
    Reviewed-by: Yongqiang Sun <yongqiang.sun@amd.com>
    Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 9 +++++++--
    1 file changed, 7 insertions(+), 2 deletions(-)

    diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
    index e4348e3b6389..2719cdecc1cb 100644
    --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
    +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
    @@ -2597,19 +2597,24 @@ int dcn20_validate_apply_pipe_split_flags(

    /* Avoid split loop looks for lowest voltage level that allows most unsplit pipes possible */
    if (avoid_split) {
    + int max_mpc_comb = context->bw_ctx.dml.vba.maxMpcComb;
    +
    for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
    if (!context->res_ctx.pipe_ctx[i].stream)
    continue;

    for (vlevel_split = vlevel; vlevel <= context->bw_ctx.dml.soc.num_states; vlevel++)
    - if (context->bw_ctx.dml.vba.NoOfDPP[vlevel][0][pipe_idx] == 1)
    + if (context->bw_ctx.dml.vba.NoOfDPP[vlevel][0][pipe_idx] == 1 &&
    + context->bw_ctx.dml.vba.ModeSupport[vlevel][0])
    break;
    /* Impossible to not split this pipe */
    if (vlevel > context->bw_ctx.dml.soc.num_states)
    vlevel = vlevel_split;
    + else
    + max_mpc_comb = 0;
    pipe_idx++;
    }
    - context->bw_ctx.dml.vba.maxMpcComb = 0;
    + context->bw_ctx.dml.vba.maxMpcComb = max_mpc_comb;
    }

    /* Split loop sets which pipe should be split based on dml outputs and dc flags */
    --
    2.25.1
    \
     
     \ /
      Last update: 2020-06-09 02:57    [W:2.575 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site