1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/amd/display/dc
hersen wu 31f34d19f8 drm/amd/display: dchubbub p-state warning during surface planes switch
[Why]
ramp_up_dispclk_with_dpp is to change dispclk, dppclk and dprefclk
according to bandwidth requirement. call stack: rv1_update_clocks -->
update_clocks --> dcn10_prepare_bandwidth / dcn10_optimize_bandwidth
--> prepare_bandwidth / optimize_bandwidth. before change dcn hw,
prepare_bandwidth will be called first to allow enough clock,
watermark for change, after end of dcn hw change, optimize_bandwidth
is executed to lower clock to save power for new dcn hw settings.

below is sequence of commit_planes_for_stream:
step 1: prepare_bandwidth - raise clock to have enough bandwidth
step 2: lock_doublebuffer_enable
step 3: pipe_control_lock(true) - make dchubp register change will
not take effect right way
step 4: apply_ctx_for_surface - program dchubp
step 5: pipe_control_lock(false) - dchubp register change take effect
step 6: optimize_bandwidth --> dc_post_update_surfaces_to_stream
for full_date, optimize clock to save power

at end of step 1, dcn clocks (dprefclk, dispclk, dppclk) may be
changed for new dchubp configuration. but real dcn hub dchubps are
still running with old configuration until end of step 5. this need
clocks settings at step 1 should not less than that before step 1.
this is checked by two conditions: 1. if (should_set_clock(safe_to_lower
, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) ||
new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz)
2. request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz

the second condition is based on new dchubp configuration. dppclk
for new dchubp may be different from dppclk before step 1.
for example, before step 1, dchubps are as below:
pipe 0: recout=(0,40,1920,980) viewport=(0,0,1920,979)
pipe 1: recout=(0,0,1920,1080) viewport=(0,0,1920,1080)
for dppclk for pipe0 need dppclk = dispclk

new dchubp pipe split configuration:
pipe 0: recout=(0,0,960,1080) viewport=(0,0,960,1080)
pipe 1: recout=(960,0,960,1080) viewport=(960,0,960,1080)
dppclk only needs dppclk = dispclk /2.

dispclk, dppclk are not lock by otg master lock. they take effect
after step 1. during this transition, dispclk are the same, but
dppclk is changed to half of previous clock for old dchubp
configuration between step 1 and step 6. This may cause p-state
warning intermittently.

[How]
for new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz, we
need make sure dppclk are not changed to less between step 1 and 6.
for new_clocks->dispclk_khz > clk_mgr_base->clks.dispclk_khz,
new display clock is raised, but we do not know ratio of
new_clocks->dispclk_khz and clk_mgr_base->clks.dispclk_khz,
new_clocks->dispclk_khz /2 does not guarantee equal or higher than
old dppclk. we could ignore power saving different between
dppclk = displck and dppclk = dispclk / 2 between step 1 and step 6.
as long as safe_to_lower = false, set dpclk = dispclk to simplify
condition check.

CC: Stable <stable@vger.kernel.org>
Signed-off-by: Hersen Wu <hersenxs.wu@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Eryk Brol <eryk.brol@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-07-30 14:13:27 -04:00
..
basics drm/amd/dc: Kill dc_conn_log_hex_linux() 2020-04-01 14:44:59 -04:00
bios drm/amd/display: dc/bios: add support for DCE6 2020-07-27 16:45:58 -04:00
calcs drm/amd/display: Fix DML failures caused by doubled stereo viewport 2020-07-01 01:59:25 -04:00
clk_mgr drm/amd/display: dchubbub p-state warning during surface planes switch 2020-07-30 14:13:27 -04:00
core drm/amd/display: Allow asic specific FSFT timing optimization 2020-07-30 14:13:04 -04:00
dce drm/amd/display: dce_transform: DCE6 Scaling Horizontal Filter Init (v2) 2020-07-27 16:46:34 -04:00
dce60 drm/amd/display: dc/dce60: use DCE6 headers (v6) 2020-07-27 16:46:45 -04:00
dce80 drm/amd/display: change from panel to panel cntl 2020-04-22 18:11:48 -04:00
dce100 drm/amd/display: change from panel to panel cntl 2020-04-22 18:11:48 -04:00
dce110 drm/amd/display: interface to obtain minimum plane size caps 2020-07-21 15:37:39 -04:00
dce112 drm/amd/display: remove redundant initialization of variable result 2020-07-27 16:21:11 -04:00
dce120 drm/amd/display: Enable fp16 also on DCE-11.0 - DCE-12. (v2) 2020-05-21 12:46:51 -04:00
dcn10 drm/amd/display: Rename bytes_pp to the correct bits_pp 2020-07-27 16:23:21 -04:00
dcn20 drm/amd/display: Allow asic specific FSFT timing optimization 2020-07-30 14:13:04 -04:00
dcn21 drm/amd/display: Allow asic specific FSFT timing optimization 2020-07-30 14:13:04 -04:00
dcn30 drm/amd/display: Use proper abm/backlight functions for DCN3 2020-07-27 16:24:22 -04:00
dml drm/amd/display: Clean up global sync param retrieval 2020-07-27 16:23:14 -04:00
dsc drm/amd/display: rename dsc extended caps as dsc branch decoder caps 2020-07-21 15:37:39 -04:00
gpio drm/amd/display: dc/gpio: add support for DCE6 (v2) 2020-07-27 16:46:00 -04:00
hdcp drm/amd/display: query hdcp capability during link detect 2020-04-09 10:43:17 -04:00
inc drm/amd/display: Allow asic specific FSFT timing optimization 2020-07-30 14:13:04 -04:00
irq drm/amd/display: dc/irq: add support for DCE6 (v4) 2020-07-27 16:46:02 -04:00
virtual drm/amd/display: determine USB C DP2 mode only when USB DP Alt is enabled 2020-04-09 10:43:17 -04:00
dc.h drm/amd/display: 3.2.95 2020-07-21 15:37:39 -04:00
dc_bios_types.h drm/amd/display: Get num_chans from VBIOS table 2020-07-01 01:59:21 -04:00
dc_ddc_types.h drm/amd/display: Proper return of result when aux engine acquire fails 2019-10-25 16:50:09 -04:00
dc_dmub_srv.c Revert "drm/amd/display: add mechanism to skip DCN init" 2020-07-10 17:41:25 -04:00
dc_dmub_srv.h Revert "drm/amd/display: add mechanism to skip DCN init" 2020-07-10 17:41:25 -04:00
dc_dp_types.h drm/amd/display: rename dsc extended caps as dsc branch decoder caps 2020-07-21 15:37:39 -04:00
dc_dsc.h drm/amd/display: Add debug option to override DSC target bpp increment 2019-12-18 16:09:11 -05:00
dc_helper.c drm/amd/display: Pass command instead of header into DMUB service 2020-04-28 16:19:05 -04:00
dc_hw_types.h drm/amd/display: Implement AMD VSIF V3 2020-07-21 15:37:39 -04:00
dc_link.h drm/amd/display: DP link layer test 4.2.1.1 fix due to specs update 2020-07-01 01:59:26 -04:00
dc_stream.h drm/amd/display: Allow asic specific FSFT timing optimization 2020-07-30 14:13:04 -04:00
dc_types.h drm/amd/display: Add register key and status for edid 2020-07-02 12:02:54 -04:00
dm_cp_psp.h drm/amd/display: enable assr 2020-07-01 01:59:25 -04:00
dm_event_log.h drm/amd/display: Add customizable tracing event 2018-11-30 12:02:49 -05:00
dm_helpers.h drm/amd/display: Add DCN3 Support in DM (v2) 2020-07-01 01:59:15 -04:00
dm_pp_smu.h drm/amd/display: Drop CONFIG_DRM_AMD_DC_DCN2_1 flag 2019-11-13 15:29:44 -05:00
dm_services.h drm/amd/display: Handle persistence in DM 2020-05-28 14:00:47 -04:00
dm_services_types.h drm/amd/display: Add definition for number of backlight data points 2019-12-18 16:09:08 -05:00
irq_types.h drm/amd/display: Add Vline1 interrupt source to InterruptManager 2019-01-28 11:44:10 -05:00
Makefile drm/amd/display: dc/dce: add initial DCE6 support (v10) 2020-07-27 16:45:51 -04:00
os_types.h drm/amd/display: Only actually breakpoint if DEBUG_KERNEL_DC is enabled 2020-07-01 01:59:16 -04:00