--- /dev/null
+From b2ea8ef559b4d94190009f3651b5b3ab7c05afd3 Mon Sep 17 00:00:00 2001
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+Date: Mon, 4 Nov 2013 08:13:45 +0100
+Subject: drm/i915: flush cursors harder
+
+From: Daniel Vetter <daniel.vetter@ffwll.ch>
+
+commit b2ea8ef559b4d94190009f3651b5b3ab7c05afd3 upstream.
+
+Apparently they need the same treatment as primary planes. This fixes
+modesetting failures because of stuck cursors (!) on Thomas' i830M
+machine.
+
+I've figured while at it I'll also roll it out for the ivb 3 pipe
+version of this function. I didn't do this for i845/i865 since Bspec
+says the update mechanism works differently, and there's some
+additional rules about what can be updated in which order.
+
+Tested-by: Thomas Richter <thor@math.tu-berlin.de>
+Cc: Thomas Richter <thor@math.tu-berlin.de>
+Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
+Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/i915/intel_display.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -6377,7 +6377,9 @@ static void i9xx_update_cursor(struct dr
+ intel_crtc->cursor_visible = visible;
+ }
+ /* and commit changes on next vblank */
++ POSTING_READ(CURCNTR(pipe));
+ I915_WRITE(CURBASE(pipe), base);
++ POSTING_READ(CURBASE(pipe));
+ }
+
+ static void ivb_update_cursor(struct drm_crtc *crtc, u32 base)
+@@ -6402,7 +6404,9 @@ static void ivb_update_cursor(struct drm
+ intel_crtc->cursor_visible = visible;
+ }
+ /* and commit changes on next vblank */
++ POSTING_READ(CURCNTR_IVB(pipe));
+ I915_WRITE(CURBASE_IVB(pipe), base);
++ POSTING_READ(CURBASE_IVB(pipe));
+ }
+
+ /* If no-part of the cursor is visible on the framebuffer, then the GPU may hang... */
--- /dev/null
+From 9360bd1112d8874d21942e2ae74f5416b00a8db6 Mon Sep 17 00:00:00 2001
+From: Ben Skeggs <bskeggs@redhat.com>
+Date: Wed, 13 Nov 2013 15:18:32 +1000
+Subject: drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
+
+From: Ben Skeggs <bskeggs@redhat.com>
+
+commit 9360bd1112d8874d21942e2ae74f5416b00a8db6 upstream.
+
+Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/nouveau/nouveau_gem.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
++++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
+@@ -281,7 +281,8 @@ validate_fini_list(struct list_head *lis
+ list_for_each_safe(entry, tmp, list) {
+ nvbo = list_entry(entry, struct nouveau_bo, entry);
+
+- nouveau_bo_fence(nvbo, fence);
++ if (likely(fence))
++ nouveau_bo_fence(nvbo, fence);
+
+ if (unlikely(nvbo->validate_mapped)) {
+ ttm_bo_kunmap(&nvbo->kmap);
--- /dev/null
+From 9a0599ddeae012a771bba5e23393fc52d8a59d89 Mon Sep 17 00:00:00 2001
+From: Jakob Bornecrantz <jakob@vmware.com>
+Date: Wed, 30 Oct 2013 02:46:56 -0700
+Subject: drm/ttm: Handle in-memory region copies
+
+From: Jakob Bornecrantz <jakob@vmware.com>
+
+commit 9a0599ddeae012a771bba5e23393fc52d8a59d89 upstream.
+
+Fix the case where the ttm pointer may be NULL causing
+a NULL pointer dereference.
+
+Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
+Signed-off-by: Thomas Hellström <thellstrom@vmware.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/gpu/drm/ttm/ttm_bo_util.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
++++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
+@@ -342,7 +342,9 @@ int ttm_bo_move_memcpy(struct ttm_buffer
+ if (old_iomap == NULL && ttm == NULL)
+ goto out2;
+
+- if (ttm->state == tt_unpopulated) {
++ /* TTM might be null for moves within the same region.
++ */
++ if (ttm && ttm->state == tt_unpopulated) {
+ ret = ttm->bdev->driver->ttm_tt_populate(ttm);
+ if (ret)
+ goto out1;
avr32-fix-out-of-range-jump-in-large-kernels.patch
prism54-set-netdev-type-to-wlan.patch
ftrace-fix-function-graph-with-loading-of-modules.patch
+drm-ttm-handle-in-memory-region-copies.patch
+drm-i915-flush-cursors-harder.patch
+drm-nouveau-when-bailing-out-of-a-pushbuf-ioctl-do-not-remove-previous-fence.patch