From 47f6cb9e890e09151b1ce5d0e209e39d24d0d32e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 1 Dec 2013 17:13:02 -0800 Subject: [PATCH] 3.4-stable patches added patches: drm-i915-flush-cursors-harder.patch drm-nouveau-when-bailing-out-of-a-pushbuf-ioctl-do-not-remove-previous-fence.patch drm-ttm-handle-in-memory-region-copies.patch --- queue-3.4/drm-i915-flush-cursors-harder.patch | 50 +++++++++++++++++++ ...f-ioctl-do-not-remove-previous-fence.patch | 28 +++++++++++ ...m-ttm-handle-in-memory-region-copies.patch | 33 ++++++++++++ queue-3.4/series | 3 ++ 4 files changed, 114 insertions(+) create mode 100644 queue-3.4/drm-i915-flush-cursors-harder.patch create mode 100644 queue-3.4/drm-nouveau-when-bailing-out-of-a-pushbuf-ioctl-do-not-remove-previous-fence.patch create mode 100644 queue-3.4/drm-ttm-handle-in-memory-region-copies.patch diff --git a/queue-3.4/drm-i915-flush-cursors-harder.patch b/queue-3.4/drm-i915-flush-cursors-harder.patch new file mode 100644 index 00000000000..eefc33eb9f4 --- /dev/null +++ b/queue-3.4/drm-i915-flush-cursors-harder.patch @@ -0,0 +1,50 @@ +From b2ea8ef559b4d94190009f3651b5b3ab7c05afd3 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Mon, 4 Nov 2013 08:13:45 +0100 +Subject: drm/i915: flush cursors harder + +From: Daniel Vetter + +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 +Cc: Thomas Richter +Cc: Ville Syrjälä +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + 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... */ diff --git a/queue-3.4/drm-nouveau-when-bailing-out-of-a-pushbuf-ioctl-do-not-remove-previous-fence.patch b/queue-3.4/drm-nouveau-when-bailing-out-of-a-pushbuf-ioctl-do-not-remove-previous-fence.patch new file mode 100644 index 00000000000..ea99fc708c5 --- /dev/null +++ b/queue-3.4/drm-nouveau-when-bailing-out-of-a-pushbuf-ioctl-do-not-remove-previous-fence.patch @@ -0,0 +1,28 @@ +From 9360bd1112d8874d21942e2ae74f5416b00a8db6 Mon Sep 17 00:00:00 2001 +From: Ben Skeggs +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 + +commit 9360bd1112d8874d21942e2ae74f5416b00a8db6 upstream. + +Signed-off-by: Ben Skeggs +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-3.4/drm-ttm-handle-in-memory-region-copies.patch b/queue-3.4/drm-ttm-handle-in-memory-region-copies.patch new file mode 100644 index 00000000000..c3ed5cd3136 --- /dev/null +++ b/queue-3.4/drm-ttm-handle-in-memory-region-copies.patch @@ -0,0 +1,33 @@ +From 9a0599ddeae012a771bba5e23393fc52d8a59d89 Mon Sep 17 00:00:00 2001 +From: Jakob Bornecrantz +Date: Wed, 30 Oct 2013 02:46:56 -0700 +Subject: drm/ttm: Handle in-memory region copies + +From: Jakob Bornecrantz + +commit 9a0599ddeae012a771bba5e23393fc52d8a59d89 upstream. + +Fix the case where the ttm pointer may be NULL causing +a NULL pointer dereference. + +Signed-off-by: Jakob Bornecrantz +Signed-off-by: Thomas Hellström +Signed-off-by: Greg Kroah-Hartman + +--- + 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; diff --git a/queue-3.4/series b/queue-3.4/series index 360e3171150..670d27d47e8 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -42,3 +42,6 @@ avr32-setup-crt-for-early-panic.patch 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 -- 2.47.3