Skip to content

Commit

Permalink
drm/i915/gt: Ensure that all new contexts clear STOP_RING
Browse files Browse the repository at this point in the history
Set up the RING_MI_MODE in new contexts to clear the STOP_RING bit, just
in case they find it still set after a reset (as they are the first
contexts to be run).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Dec 30, 2019
1 parent a9e395a commit 987281a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions drivers/gpu/drm/i915/gt/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3030,10 +3030,8 @@ static void reset_csb_pointers(struct intel_engine_cs *engine)
&execlists->csb_status[reset_value]);
}

static void __execlists_reset_reg_state(const struct intel_context *ce,
const struct intel_engine_cs *engine)
static void __reset_stop_ring(u32 *regs, const struct intel_engine_cs *engine)
{
u32 *regs = ce->lrc_reg_state;
int x;

x = lrc_ring_mi_mode(engine);
Expand All @@ -3043,6 +3041,14 @@ static void __execlists_reset_reg_state(const struct intel_context *ce,
}
}

static void __execlists_reset_reg_state(const struct intel_context *ce,
const struct intel_engine_cs *engine)
{
u32 *regs = ce->lrc_reg_state;

__reset_stop_ring(regs, engine);
}

static void __execlists_reset(struct intel_engine_cs *engine, bool stalled)
{
struct intel_engine_execlists * const execlists = &engine->execlists;
Expand Down Expand Up @@ -4043,6 +4049,8 @@ static void execlists_init_reg_state(u32 *regs,
INTEL_GEN(engine->i915) >= 12 ?
GEN12_CTX_BB_PER_CTX_PTR :
CTX_BB_PER_CTX_PTR);

__reset_stop_ring(regs, engine);
}

static int
Expand Down

0 comments on commit 987281a

Please sign in to comment.