diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/2521-drm-amd-display-DCHUB-requestors-numbers-for-Navi.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.19.8/2521-drm-amd-display-DCHUB-requestors-numbers-for-Navi.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/2521-drm-amd-display-DCHUB-requestors-numbers-for-Navi.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/2521-drm-amd-display-DCHUB-requestors-numbers-for-Navi.patch new file mode 100644 index 00000000..6e1dd4ba --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/2521-drm-amd-display-DCHUB-requestors-numbers-for-Navi.patch @@ -0,0 +1,74 @@ +From 43d451c6b8a6681757fbccab5433fd28780d2c96 Mon Sep 17 00:00:00 2001 +From: Yongqiang Sun <yongqiang.sun@amd.com> +Date: Fri, 12 Apr 2019 15:50:55 -0400 +Subject: [PATCH 2521/2940] drm/amd/display: DCHUB requestors numbers for Navi. + +[Why] +The DCHub arbiter has a mechanism to dynamically rate limit the DCHub +request stream to the fabric. If the memory controller is fully utilized +and the DCHub requestors are well ahead of their amortized schedule, +then it is safe to prevent the next winner from being committed and sent +to the fabric. The utilization of the memory controller is approximated +by ensuring that the number of outstanding requests is greater than a +threshold specified by the ARB_MIN_REQ_OUTSTANDING. To determine that +the DCHub requestors are well ahead of the amortized schedule, the slack +of the next winner is compared with the ARB_SAT_LEVEL in DLG RefClk +cycles. + +[How] +The recommended settings to enable thise dynamic limiting for Navi is +180 requests. + +Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com> +Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> +Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + .../drm/amd/display/dc/dcn20/dcn20_hubbub.c | 24 ++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c +index d6705b40a57c..a851574f118a 100644 +--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c ++++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubbub.c +@@ -493,6 +493,28 @@ void hubbub2_get_dchub_ref_freq(struct hubbub *hubbub, + } + } + ++static void hubbub2_program_watermarks( ++ struct hubbub *hubbub, ++ struct dcn_watermark_set *watermarks, ++ unsigned int refclk_mhz, ++ bool safe_to_lower) ++{ ++ struct dcn20_hubbub *hubbub1 = TO_DCN20_HUBBUB(hubbub); ++ /* ++ * Need to clamp to max of the register values (i.e. no wrap) ++ * for dcn1, all wm registers are 21-bit wide ++ */ ++ hubbub1_program_urgent_watermarks(hubbub, watermarks, refclk_mhz, safe_to_lower); ++ hubbub1_program_stutter_watermarks(hubbub, watermarks, refclk_mhz, safe_to_lower); ++ hubbub1_program_pstate_watermarks(hubbub, watermarks, refclk_mhz, safe_to_lower); ++ ++ REG_SET(DCHUBBUB_ARB_SAT_LEVEL, 0, ++ DCHUBBUB_ARB_SAT_LEVEL, 60 * refclk_mhz); ++ REG_UPDATE(DCHUBBUB_ARB_DF_REQ_OUTSTAND, DCHUBBUB_ARB_MIN_REQ_OUTSTAND, 180); ++ ++ hubbub1_allow_self_refresh_control(hubbub, !hubbub->ctx->dc->debug.disable_stutter); ++} ++ + static const struct hubbub_funcs hubbub2_funcs = { + .update_dchub = hubbub2_update_dchub, + .init_dchub = hubbub2_init_dchub, +@@ -502,7 +524,7 @@ static const struct hubbub_funcs hubbub2_funcs = { + .get_dcc_compression_cap = hubbub2_get_dcc_compression_cap, + .wm_read_state = hubbub2_wm_read_state, + .get_dchub_ref_freq = hubbub2_get_dchub_ref_freq, +- .program_watermarks = hubbub1_program_watermarks, ++ .program_watermarks = hubbub2_program_watermarks, + }; + + void hubbub2_construct(struct dcn20_hubbub *hubbub, +-- +2.17.1 + |