[Intel-gfx] [PATCH v6 17/20] drm/i915: Watchdog timeout: Ringbuffer command emission for gen8+
Chris Wilson
chris at chris-wilson.co.uk
Tue Apr 18 21:20:24 UTC 2017
On Tue, Apr 18, 2017 at 01:23:32PM -0700, Michel Thierry wrote:
> @@ -1329,10 +1331,29 @@ static int gen8_emit_bb_start(struct drm_i915_gem_request *req,
> req->ctx->ppgtt->pd_dirty_rings &= ~intel_engine_flag(req->engine);
> }
>
> - cs = intel_ring_begin(req, 4);
> + /* bb_start only */
> + num_dwords = 4;
> +
> + /* check if watchdog will be required */
> + if (req->ctx->engine[req->engine->id].watchdog_threshold != 0) {
> + if (!req->engine->emit_start_watchdog ||
> + !req->engine->emit_stop_watchdog)
> + return -EINVAL;
This is still a bug in the context setparam to get to this point without
a watchdog.
> +
> + /* + start_watchdog (6) + stop_watchdog (4) */
> + num_dwords += 10;
> + watchdog_running = true;
> + }
> +static u32 *gen8_emit_stop_watchdog(struct drm_i915_gem_request *req, u32 *cs)
> +{
> + struct intel_engine_cs *engine = req->engine;
> +
> + /* XXX: no watchdog support in BCS engine */
> + GEM_BUG_ON(engine->id == BCS);
> +
> + *cs++ = MI_LOAD_REGISTER_IMM(2);
> + *cs++ = i915_mmio_reg_offset(RING_CNTR(engine->mmio_base));
> + *cs++ = get_watchdog_disable(engine);
> + *cs++ = MI_NOOP;
Oops.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list