linux_dsm_epyc7002/drivers/gpu/drm/amd/display/dc
David Francis 8c20a1ed9b drm/amd/display: MST DSC compute fair share
If there is limited link bandwidth on a MST network,
it must be divided fairly between the streams on that network

Implement an algorithm to determine the correct DSC config
for each stream

The algorithm:
This
     [                   ]          ( )
represents the range of bandwidths possible for a given stream.
The [] area represents the range of DSC configs, and the ()
represents no DSC. The bandwidth used increases from left to right.

First, try disabling DSC on all streams
     [                  ]          (|)
     [                     ]            (|)
Check this against the bandwidth limits of the link and each branch
(including each endpoint). If it passes, the job is done

Second, try maximum DSC compression on all streams
that support DSC
     [|         ]        ( )
     [|                ]         ( )
If this does not pass, then enabling this combination of streams
is impossible

Otherwise, divide the remaining bandwidth evenly amongst the streams
     [        |  ]         ( )
     [        |      ]        ( )

If one or more of the streams reach minimum compression, evenly
divide the reamining bandwidth amongst the remaining streams
     [    |] ( )
     [       |]   ( )
     [                 |   ]               ( )
     [                 |      ]                  ( )

If all streams can reach minimum compression, disable compression
greedily
     [      |]  ( )
     [        |]    ( )
     [                 ]                                (|)

Perform this algorithm on each full update, on each MST link
with at least one DSC stream on it

After the configs are computed, call
dcn20_add_dsc_to_stream_resource on each stream with DSC enabled.
It is only after all streams are created that we can know which
of them will need DSC.

Do all of this at the end of amdgpu atomic check.  If it fails,
fail check; This combination of timings cannot be supported.

v2: Use drm_dp_mst_atomic_check to validate bw for certain dsc
configurations

v3: Use dc_dsc_policy structure to get min and max bpp rate
for DSC configuration

Acked-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Wenjing Liu <Wenjing.Liu@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2020-01-09 18:07:47 -05:00
..
basics drm/amd/display: cleanup of function pointer tables 2019-11-19 10:12:53 -05:00
bios drm/amd/display: populate bios integrated info for renoir 2019-12-05 18:16:19 -05:00
calcs drm/amd/display: use true, false for bool variable in dce_calcs.c 2020-01-07 11:56:31 -05:00
clk_mgr drm/amd/display: Remove unneeded semicolon 2019-12-18 16:09:11 -05:00
core drm/amd/display: Initialize DSC PPS variables to 0 2020-01-09 18:07:47 -05:00
dce drm/amdgpu/display: add fallthrough comment 2019-12-09 17:03:45 -05:00
dce80 drm/amd/display: add separate of private hwss functions 2019-12-05 16:26:46 -05:00
dce100 drm/amd/display: add separate of private hwss functions 2019-12-05 16:26:46 -05:00
dce110 drm/amd/display: add separate of private hwss functions 2019-12-05 16:26:46 -05:00
dce112 drm/amd/display: add separate of private hwss functions 2019-12-05 16:26:46 -05:00
dce120 drm/amd/display: add separate of private hwss functions 2019-12-05 16:26:46 -05:00
dcn10 drm/amd/display: use true, false for bool variable in dcn10_hw_sequencer.c 2020-01-07 11:56:23 -05:00
dcn20 drm/amd/display: MST DSC compute fair share 2020-01-09 18:07:47 -05:00
dcn21 drm/amd/display: Update extended timeout support for DCN20 and DCN21 2019-12-18 16:09:10 -05:00
dml drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_21.c 2020-01-07 11:56:40 -05:00
dsc drm/amd/display: Add debug option to override DSC target bpp increment 2019-12-18 16:09:11 -05:00
gpio drm/amd/display: cleanup of construct and destruct funcs 2019-11-19 10:12:52 -05:00
hdcp drm/amd/display: remove redundant null pointer check before kfree 2019-10-30 11:07:13 -04:00
inc drm/amd/display: Add warmup escape call support 2019-12-18 16:09:09 -05:00
irq drm/amd/display: rename core_dc to dc 2019-12-05 16:26:39 -05:00
virtual drm/amd/display: Drop CONFIG_DRM_AMD_DC_DCN2_0 and DSC_SUPPORTED 2019-11-13 15:29:44 -05:00
dc_bios_types.h drm/amd/display: make firmware info only load once during dc_bios create 2019-08-15 10:53:36 -05: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 drm/amd/display: Spin for DMCUB PHY init in DC 2019-11-19 10:12:53 -05:00
dc_dmub_srv.h drm/amd/display: Add DMUB support to DC 2019-11-13 15:29:42 -05:00
dc_dp_types.h drm/amd/display: add color space option when sending link test pattern 2019-11-19 10:12:52 -05: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: Split DMUB cmd type into type/subtype 2019-12-05 16:30:35 -05:00
dc_hw_types.h drm/amd/display: Drop AMD_EDID_UTILITY defines 2019-12-02 17:38:21 -05:00
dc_link.h drm/amd/display: Specified VR patch skip to reset segment to 0 2019-12-18 16:09:09 -05:00
dc_stream.h drm/amd/display: Add warmup escape call support 2019-12-18 16:09:09 -05:00
dc_types.h drm/amd/display: support virtual DCN 2019-12-18 16:09:10 -05:00
dc.h drm/amd/display: Add debug option to override DSC target bpp increment 2019-12-18 16:09:11 -05:00
dm_cp_psp.h drm/amd/display: Update hdcp display config 2019-10-03 09:10:58 -05: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: Drop CONFIG_DRM_AMD_DC_DCN2_0 and DSC_SUPPORTED 2019-11-13 15:29:44 -05: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_types.h drm/amd/display: Add definition for number of backlight data points 2019-12-18 16:09:08 -05:00
dm_services.h drm/amd/display: Drop CONFIG_DRM_AMD_DC_DMUB guards 2019-11-13 15:29:42 -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: rename DCN1_0 kconfig to DCN 2019-11-13 15:29:44 -05:00
os_types.h amdgpu: Enable initial DCN support on POWER 2019-12-18 16:09:05 -05:00