diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0b90443f1eb3..1bd0c672ec90 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4864,15 +4864,6 @@ static void intel_crtc_destroy(struct drm_crtc *crtc) | |||
4864 | kfree(intel_crtc); | 4864 | kfree(intel_crtc); |
4865 | } | 4865 | } |
4866 | 4866 | ||
4867 | struct intel_unpin_work { | ||
4868 | struct work_struct work; | ||
4869 | struct drm_device *dev; | ||
4870 | struct drm_gem_object *old_fb_obj; | ||
4871 | struct drm_gem_object *pending_flip_obj; | ||
4872 | struct drm_pending_vblank_event *event; | ||
4873 | int pending; | ||
4874 | }; | ||
4875 | |||
4876 | static void intel_unpin_work_fn(struct work_struct *__work) | 4867 | static void intel_unpin_work_fn(struct work_struct *__work) |
4877 | { | 4868 | { |
4878 | struct intel_unpin_work *work = | 4869 | struct intel_unpin_work *work = |
@@ -4960,7 +4951,8 @@ void intel_prepare_page_flip(struct drm_device *dev, int plane) | |||
4960 | 4951 | ||
4961 | spin_lock_irqsave(&dev->event_lock, flags); | 4952 | spin_lock_irqsave(&dev->event_lock, flags); |
4962 | if (intel_crtc->unpin_work) { | 4953 | if (intel_crtc->unpin_work) { |
4963 | intel_crtc->unpin_work->pending = 1; | 4954 | if ((++intel_crtc->unpin_work->pending) > 1) |
4955 | DRM_ERROR("Prepared flip multiple times\n"); | ||
4964 | } else { | 4956 | } else { |
4965 | DRM_DEBUG_DRIVER("preparing flip with no unpin work?\n"); | 4957 | DRM_DEBUG_DRIVER("preparing flip with no unpin work?\n"); |
4966 | } | 4958 | } |
@@ -5044,6 +5036,8 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc, | |||
5044 | ADVANCE_LP_RING(); | 5036 | ADVANCE_LP_RING(); |
5045 | } | 5037 | } |
5046 | 5038 | ||
5039 | work->enable_stall_check = true; | ||
5040 | |||
5047 | /* Offset into the new buffer for cases of shared fbs between CRTCs */ | 5041 | /* Offset into the new buffer for cases of shared fbs between CRTCs */ |
5048 | offset = crtc->y * fb->pitch + crtc->x * fb->bits_per_pixel/8; | 5042 | offset = crtc->y * fb->pitch + crtc->x * fb->bits_per_pixel/8; |
5049 | 5043 | ||