linux/drivers/gpu/drm/amd/display/dc
Nicholas Kazlauskas 21ffcc94d5 drm/amd/display: Copy GSL groups when committing a new context
[Why]
DC configures the GSL group for the pipe when pipe_split is enabled
and we're switching flip types (buffered <-> immediate flip) on DCN2.

In order to record what GSL group the pipe is using DC stores it in
the pipe's stream_res. DM is not aware of this internal grouping, nor
is DC resource.

So when DM creates a dc_state context and passes it to DC the current
GSL group is lost - DM never knew about it in the first place.

After 3 immediate flips we run out of GSL groups and we're no longer
able to correctly perform *any* flip for multi-pipe scenarios.

[How]
The gsl_group needs to be copied to the new context.

DM has no insight into GSL grouping and could even potentially create
a brand new context without referencing current hardware state. So this
makes the most sense to have happen in DC.

There are two places where DC can apply a new context:
- dc_commit_state
- dc_commit_updates_for_stream

But what's shared between both of these is apply_ctx_for_surface.

This logic only matters for DCN2, so it can be placed in
dcn20_apply_ctx_for_surface. Before doing any locking (where the GSL
group is setup) we can copy over the GSL groups before committing the
new context.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Hersen Wu <hersen.wu@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2019-07-18 14:27:26 -05:00
..
basics drm/amd: drop use of drmp.h in os_types.h 2019-06-10 22:59:45 +02:00
bios Merge branch 'drm-next' into drm-next-5.3 2019-06-25 08:42:25 -05:00
calcs drm/amd/display: add dcc programming for dual plane 2019-07-18 14:27:26 -05:00
clk_mgr drm/amd/display: support "dummy pstate" 2019-07-18 14:27:26 -05:00
core drm/amd/display: Add debug entry to destroy disconnected edp link 2019-07-18 14:27:26 -05:00
dce drm/amd/display: avoid power gate domains that doesn't exist 2019-07-18 14:27:26 -05:00
dce80 drm-misc-next for v5.3: 2019-06-14 11:44:24 +02:00
dce100 drm-misc-next for v5.3: 2019-06-14 11:44:24 +02:00
dce110 drm/amd/display: Set enabled to false at start of audio disable 2019-07-18 14:27:26 -05:00
dce112 drm-misc-next for v5.3: 2019-06-14 11:44:24 +02:00
dce120 Merge branch 'drm-next' into drm-next-5.3 2019-06-25 08:42:25 -05:00
dcn10 drm/amd/display: add dcc programming for dual plane 2019-07-18 14:27:26 -05:00
dcn20 drm/amd/display: Copy GSL groups when committing a new context 2019-07-18 14:27:26 -05:00
dml drm/amd/display: support "dummy pstate" 2019-07-18 14:27:26 -05:00
dsc drm/amd/display: Set one 4:2:0-related PPS field as recommended by DSC spec 2019-07-18 14:18:08 -05:00
gpio drm/amd/display: Change offset_to_id to reflect what id_to_offset returns 2019-07-18 14:27:25 -05:00
inc drm/amd/display: Add SMU version field to clk_mgr_internal 2019-07-18 14:27:26 -05:00
irq Merge branch 'drm-next' into drm-next-5.3 2019-06-25 08:42:25 -05:00
virtual Merge branch 'drm-next' into drm-next-5.3 2019-06-25 08:42:25 -05:00
dc_bios_types.h
dc_ddc_types.h drm/amd/display: add i2c over aux failure handling 2019-03-19 15:36:49 -05:00
dc_dp_types.h drm/amd/display: Add ability to set preferred link training parameters. 2019-07-18 14:18:08 -05:00
dc_dsc.h drm/amd/display: update DSC MST DP virtual DPCD peer device enumeration policy 2019-06-22 09:34:13 -05:00
dc_helper.c drm-misc-next for v5.3: 2019-06-14 11:44:24 +02:00
dc_hw_types.h drm/amd/display: add dcc programming for dual plane 2019-07-18 14:27:26 -05:00
dc_link.h drm/amd/display: Add ability to set preferred link training parameters. 2019-07-18 14:18:08 -05:00
dc_stream.h drm/amd/display: Expose audio inst from DC to DM 2019-07-11 14:37:24 -05:00
dc_types.h drm/amd/display: add set and get clock for testing purposes 2019-07-18 14:27:25 -05:00
dc.h drm/amd/display: Add debug entry to destroy disconnected edp link 2019-07-18 14:27:26 -05:00
dm_event_log.h
dm_helpers.h drm/amd/display: Add DSC support for Navi (v2) 2019-06-22 09:34:07 -05:00
dm_pp_smu.h drm/amd/display: Add DC core changes for DCN2 2019-06-21 18:59:35 -05:00
dm_services_types.h drm/amd/display: PPLIB Hookup 2019-03-05 15:09:32 -05:00
dm_services.h drm/amd/display: refactor dump_clk_registers 2019-07-18 14:18:09 -05:00
irq_types.h
Makefile drm/amd/display: move vmid determination logic to a module 2019-06-22 09:34:14 -05:00
os_types.h drm/amd: drop use of drmp.h in os_types.h 2019-06-10 22:59:45 +02:00