diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index fdeff435372..dc65a1de5f0 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4680,6 +4680,7 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, | |||
4680 | unsigned long flags; | 4680 | unsigned long flags; |
4681 | int pipesrc_reg = (intel_crtc->pipe == 0) ? PIPEASRC : PIPEBSRC; | 4681 | int pipesrc_reg = (intel_crtc->pipe == 0) ? PIPEASRC : PIPEBSRC; |
4682 | int ret, pipesrc; | 4682 | int ret, pipesrc; |
4683 | u32 flip_mask; | ||
4683 | 4684 | ||
4684 | work = kzalloc(sizeof *work, GFP_KERNEL); | 4685 | work = kzalloc(sizeof *work, GFP_KERNEL); |
4685 | if (work == NULL) | 4686 | if (work == NULL) |
@@ -4733,6 +4734,16 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, | |||
4733 | atomic_inc(&obj_priv->pending_flip); | 4734 | atomic_inc(&obj_priv->pending_flip); |
4734 | work->pending_flip_obj = obj; | 4735 | work->pending_flip_obj = obj; |
4735 | 4736 | ||
4737 | if (intel_crtc->plane) | ||
4738 | flip_mask = I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT; | ||
4739 | else | ||
4740 | flip_mask = I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT; | ||
4741 | |||
4742 | /* Wait for any previous flip to finish */ | ||
4743 | if (IS_GEN3(dev)) | ||
4744 | while (I915_READ(ISR) & flip_mask) | ||
4745 | ; | ||
4746 | |||
4736 | BEGIN_LP_RING(4); | 4747 | BEGIN_LP_RING(4); |
4737 | OUT_RING(MI_DISPLAY_FLIP | | 4748 | OUT_RING(MI_DISPLAY_FLIP | |
4738 | MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); | 4749 | MI_DISPLAY_FLIP_PLANE(intel_crtc->plane)); |