Re: [Intel-gfx] [PATCH 1/7] drm/i915/gt: Ensure that all new contexts clear STOP_RING

2019-12-30 Thread Matthew Auld
On Sun, 29 Dec 2019 at 18:32, Chris Wilson  wrote:
>
> Set up the RING_MI_NODE 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 
Reviewed-by: Matthew Auld 
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 1/7] drm/i915/gt: Ensure that all new contexts clear STOP_RING

2019-12-29 Thread Chris Wilson
Set up the RING_MI_NODE 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 
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c 
b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 4fb70a7716e3..723914a41ef4 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3030,10 +3030,8 @@ static void reset_csb_pointers(struct intel_engine_cs 
*engine)
   >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);
@@ -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 = >execlists;
@@ -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
-- 
2.25.0.rc0

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx