@@ -1816,29 +1816,28 @@ static void hsw_crtc_disable(struct intel_atomic_state *state,
1816
1816
const struct intel_crtc_state * old_crtc_state =
1817
1817
intel_atomic_get_old_crtc_state (state , crtc );
1818
1818
struct drm_i915_private * i915 = to_i915 (crtc -> base .dev );
1819
+ struct intel_crtc * pipe_crtc ;
1819
1820
1820
1821
/*
1821
1822
* FIXME collapse everything to one hook.
1822
1823
* Need care with mst->ddi interactions.
1823
1824
*/
1824
- if (!intel_crtc_is_bigjoiner_slave (old_crtc_state )) {
1825
- intel_encoders_disable (state , crtc );
1826
- intel_encoders_post_disable (state , crtc );
1827
- }
1828
-
1829
- intel_disable_shared_dpll (old_crtc_state );
1825
+ intel_encoders_disable (state , crtc );
1826
+ intel_encoders_post_disable (state , crtc );
1830
1827
1831
- if (!intel_crtc_is_bigjoiner_slave (old_crtc_state )) {
1832
- struct intel_crtc * slave_crtc ;
1828
+ for_each_intel_crtc_in_pipe_mask (& i915 -> drm , pipe_crtc ,
1829
+ intel_crtc_joined_pipe_mask (old_crtc_state )) {
1830
+ const struct intel_crtc_state * old_pipe_crtc_state =
1831
+ intel_atomic_get_old_crtc_state (state , pipe_crtc );
1833
1832
1834
- intel_encoders_post_pll_disable (state , crtc );
1833
+ intel_disable_shared_dpll (old_pipe_crtc_state );
1834
+ }
1835
1835
1836
- intel_dmc_disable_pipe ( i915 , crtc -> pipe );
1836
+ intel_encoders_post_pll_disable ( state , crtc );
1837
1837
1838
- for_each_intel_crtc_in_pipe_mask (& i915 -> drm , slave_crtc ,
1839
- intel_crtc_bigjoiner_slave_pipes (old_crtc_state ))
1840
- intel_dmc_disable_pipe (i915 , slave_crtc -> pipe );
1841
- }
1838
+ for_each_intel_crtc_in_pipe_mask (& i915 -> drm , pipe_crtc ,
1839
+ intel_crtc_joined_pipe_mask (old_crtc_state ))
1840
+ intel_dmc_disable_pipe (i915 , pipe_crtc -> pipe );
1842
1841
}
1843
1842
1844
1843
static void i9xx_pfit_enable (const struct intel_crtc_state * crtc_state )
@@ -6869,21 +6868,31 @@ static void intel_old_crtc_state_disables(struct intel_atomic_state *state,
6869
6868
struct intel_crtc * crtc )
6870
6869
{
6871
6870
struct drm_i915_private * dev_priv = to_i915 (state -> base .dev );
6872
- const struct intel_crtc_state * new_crtc_state =
6873
- intel_atomic_get_new_crtc_state (state , crtc );
6871
+ const struct intel_crtc_state * old_crtc_state =
6872
+ intel_atomic_get_old_crtc_state (state , crtc );
6873
+ struct intel_crtc * pipe_crtc ;
6874
6874
6875
6875
/*
6876
6876
* We need to disable pipe CRC before disabling the pipe,
6877
6877
* or we race against vblank off.
6878
6878
*/
6879
- intel_crtc_disable_pipe_crc (crtc );
6879
+ for_each_intel_crtc_in_pipe_mask (& dev_priv -> drm , pipe_crtc ,
6880
+ intel_crtc_joined_pipe_mask (old_crtc_state ))
6881
+ intel_crtc_disable_pipe_crc (pipe_crtc );
6880
6882
6881
6883
dev_priv -> display .funcs .display -> crtc_disable (state , crtc );
6882
- crtc -> active = false;
6883
- intel_fbc_disable (crtc );
6884
6884
6885
- if (!new_crtc_state -> hw .active )
6886
- intel_initial_watermarks (state , crtc );
6885
+ for_each_intel_crtc_in_pipe_mask (& dev_priv -> drm , pipe_crtc ,
6886
+ intel_crtc_joined_pipe_mask (old_crtc_state )) {
6887
+ const struct intel_crtc_state * new_pipe_crtc_state =
6888
+ intel_atomic_get_new_crtc_state (state , pipe_crtc );
6889
+
6890
+ pipe_crtc -> active = false;
6891
+ intel_fbc_disable (pipe_crtc );
6892
+
6893
+ if (!new_pipe_crtc_state -> hw .active )
6894
+ intel_initial_watermarks (state , pipe_crtc );
6895
+ }
6887
6896
}
6888
6897
6889
6898
static void intel_commit_modeset_disables (struct intel_atomic_state * state )
@@ -6923,29 +6932,34 @@ static void intel_commit_modeset_disables(struct intel_atomic_state *state)
6923
6932
if ((disable_pipes & BIT (crtc -> pipe )) == 0 )
6924
6933
continue ;
6925
6934
6935
+ if (intel_crtc_is_bigjoiner_slave (old_crtc_state ))
6936
+ continue ;
6937
+
6926
6938
/* In case of Transcoder port Sync master slave CRTCs can be
6927
6939
* assigned in any order and we need to make sure that
6928
6940
* slave CRTCs are disabled first and then master CRTC since
6929
6941
* Slave vblanks are masked till Master Vblanks.
6930
6942
*/
6931
6943
if (!is_trans_port_sync_slave (old_crtc_state ) &&
6932
- !intel_dp_mst_is_slave_trans (old_crtc_state ) &&
6933
- !intel_crtc_is_bigjoiner_slave (old_crtc_state ))
6944
+ !intel_dp_mst_is_slave_trans (old_crtc_state ))
6934
6945
continue ;
6935
6946
6936
6947
intel_old_crtc_state_disables (state , crtc );
6937
6948
6938
- disable_pipes &= ~BIT ( crtc -> pipe );
6949
+ disable_pipes &= ~intel_crtc_joined_pipe_mask ( old_crtc_state );
6939
6950
}
6940
6951
6941
6952
/* Disable everything else left on */
6942
6953
for_each_old_intel_crtc_in_state (state , crtc , old_crtc_state , i ) {
6943
6954
if ((disable_pipes & BIT (crtc -> pipe )) == 0 )
6944
6955
continue ;
6945
6956
6957
+ if (intel_crtc_is_bigjoiner_slave (old_crtc_state ))
6958
+ continue ;
6959
+
6946
6960
intel_old_crtc_state_disables (state , crtc );
6947
6961
6948
- disable_pipes &= ~BIT ( crtc -> pipe );
6962
+ disable_pipes &= ~intel_crtc_joined_pipe_mask ( old_crtc_state );
6949
6963
}
6950
6964
6951
6965
drm_WARN_ON (& i915 -> drm , disable_pipes );
0 commit comments