@@ -7707,35 +7707,37 @@ static void kill_bigjoiner_slave(struct intel_atomic_state *state,
7707
7707
* correspond to the last vblank and have no relation to the actual time when
7708
7708
* the flip done event was sent.
7709
7709
*/
7710
- static int intel_atomic_check_async (struct intel_atomic_state * state )
7710
+ static int intel_atomic_check_async (struct intel_atomic_state * state , struct intel_crtc * crtc )
7711
7711
{
7712
7712
struct drm_i915_private * i915 = to_i915 (state -> base .dev );
7713
7713
const struct intel_crtc_state * old_crtc_state , * new_crtc_state ;
7714
7714
const struct intel_plane_state * new_plane_state , * old_plane_state ;
7715
- struct intel_crtc * crtc ;
7716
7715
struct intel_plane * plane ;
7717
7716
int i ;
7718
7717
7719
- for_each_oldnew_intel_crtc_in_state (state , crtc , old_crtc_state ,
7720
- new_crtc_state , i ) {
7721
- if (intel_crtc_needs_modeset (new_crtc_state )) {
7722
- drm_dbg_kms (& i915 -> drm , "Modeset Required. Async flip not supported\n" );
7723
- return - EINVAL ;
7724
- }
7718
+ old_crtc_state = intel_atomic_get_old_crtc_state (state , crtc );
7719
+ new_crtc_state = intel_atomic_get_new_crtc_state (state , crtc );
7725
7720
7726
- if (!new_crtc_state -> hw .active ) {
7727
- drm_dbg_kms (& i915 -> drm , "CRTC inactive\n" );
7728
- return - EINVAL ;
7729
- }
7730
- if (old_crtc_state -> active_planes != new_crtc_state -> active_planes ) {
7731
- drm_dbg_kms (& i915 -> drm ,
7732
- "Active planes cannot be changed during async flip\n" );
7733
- return - EINVAL ;
7734
- }
7721
+ if (intel_crtc_needs_modeset (new_crtc_state )) {
7722
+ drm_dbg_kms (& i915 -> drm , "Modeset Required. Async flip not supported\n" );
7723
+ return - EINVAL ;
7724
+ }
7725
+
7726
+ if (!new_crtc_state -> hw .active ) {
7727
+ drm_dbg_kms (& i915 -> drm , "CRTC inactive\n" );
7728
+ return - EINVAL ;
7729
+ }
7730
+ if (old_crtc_state -> active_planes != new_crtc_state -> active_planes ) {
7731
+ drm_dbg_kms (& i915 -> drm ,
7732
+ "Active planes cannot be changed during async flip\n" );
7733
+ return - EINVAL ;
7735
7734
}
7736
7735
7737
7736
for_each_oldnew_intel_plane_in_state (state , plane , old_plane_state ,
7738
7737
new_plane_state , i ) {
7738
+ if (plane -> pipe != crtc -> pipe )
7739
+ continue ;
7740
+
7739
7741
/*
7740
7742
* TODO: Async flip is only supported through the page flip IOCTL
7741
7743
* as of now. So support currently added for primary plane only.
@@ -8054,7 +8056,7 @@ static int intel_atomic_check(struct drm_device *dev,
8054
8056
for_each_oldnew_intel_crtc_in_state (state , crtc , old_crtc_state ,
8055
8057
new_crtc_state , i ) {
8056
8058
if (new_crtc_state -> uapi .async_flip ) {
8057
- ret = intel_atomic_check_async (state );
8059
+ ret = intel_atomic_check_async (state , crtc );
8058
8060
if (ret )
8059
8061
goto fail ;
8060
8062
}
0 commit comments