@@ -1743,7 +1743,7 @@ void dcn32_retain_phantom_pipes(struct dc *dc, struct dc_state *context)
1743
1743
}
1744
1744
1745
1745
// return true if removed piped from ctx, false otherwise
1746
- bool dcn32_remove_phantom_pipes (struct dc * dc , struct dc_state * context )
1746
+ bool dcn32_remove_phantom_pipes (struct dc * dc , struct dc_state * context , bool fast_update )
1747
1747
{
1748
1748
int i ;
1749
1749
bool removed_pipe = false;
@@ -1770,14 +1770,23 @@ bool dcn32_remove_phantom_pipes(struct dc *dc, struct dc_state *context)
1770
1770
removed_pipe = true;
1771
1771
}
1772
1772
1773
- // Clear all phantom stream info
1774
- if (pipe -> stream ) {
1775
- pipe -> stream -> mall_stream_config .type = SUBVP_NONE ;
1776
- pipe -> stream -> mall_stream_config .paired_stream = NULL ;
1777
- }
1773
+ /* For non-full updates, a shallow copy of the current state
1774
+ * is created. In this case we don't want to erase the current
1775
+ * state (there can be 2 HIRQL threads, one in flip, and one in
1776
+ * checkMPO) that can cause a race condition.
1777
+ *
1778
+ * This is just a workaround, needs a proper fix.
1779
+ */
1780
+ if (!fast_update ) {
1781
+ // Clear all phantom stream info
1782
+ if (pipe -> stream ) {
1783
+ pipe -> stream -> mall_stream_config .type = SUBVP_NONE ;
1784
+ pipe -> stream -> mall_stream_config .paired_stream = NULL ;
1785
+ }
1778
1786
1779
- if (pipe -> plane_state ) {
1780
- pipe -> plane_state -> is_phantom = false;
1787
+ if (pipe -> plane_state ) {
1788
+ pipe -> plane_state -> is_phantom = false;
1789
+ }
1781
1790
}
1782
1791
}
1783
1792
return removed_pipe ;
@@ -1950,23 +1959,28 @@ int dcn32_populate_dml_pipes_from_context(
1950
1959
pipes [pipe_cnt ].pipe .src .unbounded_req_mode = false;
1951
1960
pipes [pipe_cnt ].pipe .scale_ratio_depth .lb_depth = dm_lb_19 ;
1952
1961
1953
- switch (pipe -> stream -> mall_stream_config .type ) {
1954
- case SUBVP_MAIN :
1955
- pipes [pipe_cnt ].pipe .src .use_mall_for_pstate_change = dm_use_mall_pstate_change_sub_viewport ;
1956
- subvp_in_use = true;
1957
- break ;
1958
- case SUBVP_PHANTOM :
1959
- pipes [pipe_cnt ].pipe .src .use_mall_for_pstate_change = dm_use_mall_pstate_change_phantom_pipe ;
1960
- pipes [pipe_cnt ].pipe .src .use_mall_for_static_screen = dm_use_mall_static_screen_disable ;
1961
- // Disallow unbounded req for SubVP according to DCHUB programming guide
1962
- pipes [pipe_cnt ].pipe .src .unbounded_req_mode = false;
1963
- break ;
1964
- case SUBVP_NONE :
1965
- pipes [pipe_cnt ].pipe .src .use_mall_for_pstate_change = dm_use_mall_pstate_change_disable ;
1966
- pipes [pipe_cnt ].pipe .src .use_mall_for_static_screen = dm_use_mall_static_screen_disable ;
1967
- break ;
1968
- default :
1969
- break ;
1962
+ /* Only populate DML input with subvp info for full updates.
1963
+ * This is just a workaround -- needs a proper fix.
1964
+ */
1965
+ if (!fast_validate ) {
1966
+ switch (pipe -> stream -> mall_stream_config .type ) {
1967
+ case SUBVP_MAIN :
1968
+ pipes [pipe_cnt ].pipe .src .use_mall_for_pstate_change = dm_use_mall_pstate_change_sub_viewport ;
1969
+ subvp_in_use = true;
1970
+ break ;
1971
+ case SUBVP_PHANTOM :
1972
+ pipes [pipe_cnt ].pipe .src .use_mall_for_pstate_change = dm_use_mall_pstate_change_phantom_pipe ;
1973
+ pipes [pipe_cnt ].pipe .src .use_mall_for_static_screen = dm_use_mall_static_screen_disable ;
1974
+ // Disallow unbounded req for SubVP according to DCHUB programming guide
1975
+ pipes [pipe_cnt ].pipe .src .unbounded_req_mode = false;
1976
+ break ;
1977
+ case SUBVP_NONE :
1978
+ pipes [pipe_cnt ].pipe .src .use_mall_for_pstate_change = dm_use_mall_pstate_change_disable ;
1979
+ pipes [pipe_cnt ].pipe .src .use_mall_for_static_screen = dm_use_mall_static_screen_disable ;
1980
+ break ;
1981
+ default :
1982
+ break ;
1983
+ }
1970
1984
}
1971
1985
1972
1986
pipes [pipe_cnt ].dout .dsc_input_bpc = 0 ;
0 commit comments