Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1624311
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.9 24/31] [PATCH] Revert "drm/i915/execlists: Reset RING registers upon resume" |
| Date | 2017-04-16 13:10 +0200 |
| Message-ID | <twQe5-2WB-13@gated-at.bofh.it> (permalink) |
| References | <twNpT-1je-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.9-stable review patch. If anyone has any objections, please let me know.
------------------
This reverts commit f2a0409a08502d64fbe3990354dff5902b08d2fb which is
commit bafb2f7d4755bf1571bd5e9a03b97f3fc4fe69ae upstream.
It was reported to have problems.
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Eric Blau <eblau1@gmail.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
---
drivers/gpu/drm/i915/intel_lrc.c | 58 +++++++++++++++------------------------
1 file changed, 23 insertions(+), 35 deletions(-)
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2152,42 +2152,30 @@ error_deref_obj:
void intel_lr_context_resume(struct drm_i915_private *dev_priv)
{
+ struct i915_gem_context *ctx = dev_priv->kernel_context;
struct intel_engine_cs *engine;
- struct i915_gem_context *ctx;
- /* Because we emit WA_TAIL_DWORDS there may be a disparity
- * between our bookkeeping in ce->ring->head and ce->ring->tail and
- * that stored in context. As we only write new commands from
- * ce->ring->tail onwards, everything before that is junk. If the GPU
- * starts reading from its RING_HEAD from the context, it may try to
- * execute that junk and die.
- *
- * So to avoid that we reset the context images upon resume. For
- * simplicity, we just zero everything out.
- */
- list_for_each_entry(ctx, &dev_priv->context_list, link) {
- for_each_engine(engine, dev_priv) {
- struct intel_context *ce = &ctx->engine[engine->id];
- u32 *reg;
-
- if (!ce->state)
- continue;
-
- reg = i915_gem_object_pin_map(ce->state->obj,
- I915_MAP_WB);
- if (WARN_ON(IS_ERR(reg)))
- continue;
-
- reg += LRC_STATE_PN * PAGE_SIZE / sizeof(*reg);
- reg[CTX_RING_HEAD+1] = 0;
- reg[CTX_RING_TAIL+1] = 0;
-
- ce->state->obj->dirty = true;
- i915_gem_object_unpin_map(ce->state->obj);
-
- ce->ring->head = ce->ring->tail = 0;
- ce->ring->last_retired_head = -1;
- intel_ring_update_space(ce->ring);
- }
+ for_each_engine(engine, dev_priv) {
+ struct intel_context *ce = &ctx->engine[engine->id];
+ void *vaddr;
+ uint32_t *reg_state;
+
+ if (!ce->state)
+ continue;
+
+ vaddr = i915_gem_object_pin_map(ce->state->obj, I915_MAP_WB);
+ if (WARN_ON(IS_ERR(vaddr)))
+ continue;
+
+ reg_state = vaddr + LRC_STATE_PN * PAGE_SIZE;
+
+ reg_state[CTX_RING_HEAD+1] = 0;
+ reg_state[CTX_RING_TAIL+1] = 0;
+
+ ce->state->obj->dirty = true;
+ i915_gem_object_unpin_map(ce->state->obj);
+
+ ce->ring->head = 0;
+ ce->ring->tail = 0;
}
}
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.9 00/31] 4.9.23-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:10 +0200 [PATCH 4.9 10/31] orangefs: fix buffer size mis-match between kernel space and user space. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:10 +0200 [PATCH 4.9 19/31] MIPS: Switch to the irq_stack in interrupts Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:10 +0200 [PATCH 4.9 06/31] drm/i915: Stop using RP_DOWN_EI on Baytrail Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:10 +0200 [PATCH 4.9 17/31] MIPS: Stack unwinding while on IRQ stack Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:10 +0200 [PATCH 4.9 13/31] rt2x00usb: do not anchor rx and tx urbs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:10 +0200 [PATCH 4.9 29/31] net/mlx4_core: Fix racy CQ (Completion Queue) free Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 21/31] MIPS: IRQ Stack: Fix erroneous jal to plat_irq_dispatch Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 28/31] net/mlx4_en: Fix bad WQE issue Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 25/31] net/packet: fix overflow in check for priv area size Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 20/31] MIPS: Select HAVE_IRQ_EXIT_ON_IRQ_STACK Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 07/31] drm/i915: Avoid rcu_barrier() from reclaim paths (shrinker) Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 18/31] MIPS: Only change $28 to thread_info if coming from user mode Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 08/31] orangefs: fix memory leak of string new on exit path Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 12/31] rt2x00usb: fix anchor initialization Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 16/31] MIPS: Introduce irq_stack Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 05/31] drm/i915: Drop support for I915_EXEC_CONSTANTS_* execbuf parameters. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 09/31] orangefs: Dan Carpenter influenced cleanups... Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 26/31] blk-mq: Avoid memory reclaim when remapping queues Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 10:20 +0200 [PATCH 4.9 24/31] [PATCH] Revert "drm/i915/execlists: Reset RING registers upon resume" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-04-16 13:10 +0200 Re: [PATCH 4.9 00/31] 4.9.23-stable review Guenter Roeck <linux@roeck-us.net> - 2017-04-16 23:30 +0200 Re: [PATCH 4.9 00/31] 4.9.23-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-04-17 20:30 +0200
csiph-web