lkml.org 
[lkml]   [2020]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.6 44/62] drm/amd/display: Update DCN2.1 DV Code Revision
    Date
    From: Sung Lee <sung.lee@amd.com>

    [ Upstream commit b95e51eb9f2ee7b6d6c3203a2f75122349aa77be ]

    [WHY & HOW]
    There is a problem in hscale_pixel_rate, the bug
    causes DCN to be more optimistic (more likely to underflow)
    in upscale cases during prefetch.
    This commit ports the fix from DV code to address these issues.

    Signed-off-by: Sung Lee <sung.lee@amd.com>
    Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@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>
    ---
    .../drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
    index a38baa73d4841..b8ec08e3b7a36 100644
    --- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
    +++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
    @@ -1200,7 +1200,7 @@ static void dml_rq_dlg_get_dlg_params(
    min_hratio_fact_l = 1.0;
    min_hratio_fact_c = 1.0;

    - if (htaps_l <= 1)
    + if (hratio_l <= 1)
    min_hratio_fact_l = 2.0;
    else if (htaps_l <= 6) {
    if ((hratio_l * 2.0) > 4.0)
    @@ -1216,7 +1216,7 @@ static void dml_rq_dlg_get_dlg_params(

    hscale_pixel_rate_l = min_hratio_fact_l * dppclk_freq_in_mhz;

    - if (htaps_c <= 1)
    + if (hratio_c <= 1)
    min_hratio_fact_c = 2.0;
    else if (htaps_c <= 6) {
    if ((hratio_c * 2.0) > 4.0)
    @@ -1522,8 +1522,8 @@ static void dml_rq_dlg_get_dlg_params(

    disp_dlg_regs->refcyc_per_vm_group_vblank = get_refcyc_per_vm_group_vblank(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
    disp_dlg_regs->refcyc_per_vm_group_flip = get_refcyc_per_vm_group_flip(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
    - disp_dlg_regs->refcyc_per_vm_req_vblank = get_refcyc_per_vm_req_vblank(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
    - disp_dlg_regs->refcyc_per_vm_req_flip = get_refcyc_per_vm_req_flip(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz;
    + disp_dlg_regs->refcyc_per_vm_req_vblank = get_refcyc_per_vm_req_vblank(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz * dml_pow(2, 10);
    + disp_dlg_regs->refcyc_per_vm_req_flip = get_refcyc_per_vm_req_flip(mode_lib, e2e_pipe_param, num_pipes, pipe_idx) * refclk_freq_in_mhz * dml_pow(2, 10);

    // Clamp to max for now
    if (disp_dlg_regs->refcyc_per_vm_group_vblank >= (unsigned int)dml_pow(2, 23))
    --
    2.20.1
    \
     
     \ /
      Last update: 2020-05-14 21:10    [W:4.145 / U:0.480 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site