]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 19:12:32 +0000 (12:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Apr 2013 19:12:32 +0000 (12:12 -0700)
added patches:
drm-i915-don-t-clobber-crtc-fb-when-queue_flip-fails.patch

queue-3.4/drm-i915-don-t-clobber-crtc-fb-when-queue_flip-fails.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/drm-i915-don-t-clobber-crtc-fb-when-queue_flip-fails.patch b/queue-3.4/drm-i915-don-t-clobber-crtc-fb-when-queue_flip-fails.patch
new file mode 100644 (file)
index 0000000..cf64a7b
--- /dev/null
@@ -0,0 +1,71 @@
+From 4a35f83b2b7c6aae3fc0d1c4554fdc99dc33ad07 Mon Sep 17 00:00:00 2001
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Date: Fri, 22 Feb 2013 16:53:38 +0200
+Subject: drm/i915: Don't clobber crtc->fb when queue_flip fails
+
+From: Ville Syrjälä <ville.syrjala@linux.intel.com>
+
+commit 4a35f83b2b7c6aae3fc0d1c4554fdc99dc33ad07 upstream.
+
+Restore crtc->fb to the old framebuffer if queue_flip fails.
+
+While at it, kill the pointless intel_fb temp variable.
+
+v2: Update crtc->fb before queue_flip and restore it back
+    after a failure.
+
+Backported for 3.4-stable. Adjusted context only.
+
+Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
+Reported-and-Tested-by: Mika Kuoppala <mika.kuoppala@intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Lingzhu Xiang <lxiang@redhat.com>
+Reviewed-by: CAI Qian <caiqian@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_display.c |   11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -7567,8 +7567,8 @@ static int intel_crtc_page_flip(struct d
+ {
+       struct drm_device *dev = crtc->dev;
+       struct drm_i915_private *dev_priv = dev->dev_private;
+-      struct intel_framebuffer *intel_fb;
+-      struct drm_i915_gem_object *obj;
++      struct drm_framebuffer *old_fb = crtc->fb;
++      struct drm_i915_gem_object *obj = to_intel_framebuffer(fb)->obj;
+       struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+       struct intel_unpin_work *work;
+       unsigned long flags;
+@@ -7580,8 +7580,7 @@ static int intel_crtc_page_flip(struct d
+       work->event = event;
+       work->dev = crtc->dev;
+-      intel_fb = to_intel_framebuffer(crtc->fb);
+-      work->old_fb_obj = intel_fb->obj;
++      work->old_fb_obj = to_intel_framebuffer(old_fb)->obj;
+       INIT_WORK(&work->work, intel_unpin_work_fn);
+       ret = drm_vblank_get(dev, intel_crtc->pipe);
+@@ -7601,9 +7600,6 @@ static int intel_crtc_page_flip(struct d
+       intel_crtc->unpin_work = work;
+       spin_unlock_irqrestore(&dev->event_lock, flags);
+-      intel_fb = to_intel_framebuffer(fb);
+-      obj = intel_fb->obj;
+-
+       mutex_lock(&dev->struct_mutex);
+       /* Reference the objects for the scheduled work. */
+@@ -7634,6 +7630,7 @@ static int intel_crtc_page_flip(struct d
+ cleanup_pending:
+       atomic_sub(1 << intel_crtc->plane, &work->old_fb_obj->pending_flip);
++      crtc->fb = old_fb;
+       drm_gem_object_unreference(&work->old_fb_obj->base);
+       drm_gem_object_unreference(&obj->base);
+       mutex_unlock(&dev->struct_mutex);
index 012414525962311122dc3c656e16c2c970d9d94c..c0e6597fc747403ed362db284f49d24749c3f939 100644 (file)
@@ -33,3 +33,4 @@ usb-gadget-udc-core-fix-a-regression-during-gadget-driver-unbinding.patch
 loop-prevent-bdev-freeing-while-device-in-use.patch
 arm-cns3xxx-fix-mapping-of-private-memory-region.patch
 nfsd4-reject-negative-acl-lengths.patch
+drm-i915-don-t-clobber-crtc-fb-when-queue_flip-fails.patch